|
1 |
| -/* based on Fomantic UI checkbox module, with just the parts extracted that we use. If you find any |
2 |
| - unused rules here after refactoring, please remove them. */ |
3 |
| - |
4 | 1 | .ui.button {
|
5 | 2 | cursor: pointer;
|
6 |
| - display: inline-block; |
7 |
| - min-height: 1em; |
| 3 | + display: inline-flex; |
8 | 4 | outline: none;
|
9 |
| - vertical-align: baseline; |
10 | 5 | font-family: var(--fonts-regular);
|
11 | 6 | margin: 0 0.25em 0 0;
|
12 |
| - padding: 0.78571429em 1.5em; |
13 | 7 | font-weight: var(--font-weight-normal);
|
| 8 | + font-size: 1rem; |
14 | 9 | text-align: center;
|
15 | 10 | text-decoration: none;
|
16 | 11 | line-height: 1;
|
17 |
| - border-radius: 0.28571429rem; |
| 12 | + border-radius: var(--border-radius); |
18 | 13 | user-select: none;
|
19 | 14 | -webkit-tap-highlight-color: transparent;
|
20 | 15 | justify-content: center;
|
|
58 | 53 | pointer-events: none !important;
|
59 | 54 | }
|
60 | 55 |
|
| 56 | +/* there is no "ui labeled icon button" support" because it is not used */ |
61 | 57 | .ui.labeled.button:not(.icon) {
|
62 |
| - display: inline-flex; |
63 | 58 | flex-direction: row;
|
64 | 59 | background: none;
|
65 |
| - padding: 0 !important; |
| 60 | + padding: 0; |
66 | 61 | border: none;
|
| 62 | + min-height: unset; |
67 | 63 | }
|
68 | 64 | .ui.labeled.button > .button {
|
69 | 65 | margin: 0;
|
|
102 | 98 | margin: 0 -0.21428571em 0 0.42857143em;
|
103 | 99 | }
|
104 | 100 |
|
| 101 | +/* reference sizes (not exactly at the moment): normal: padding-x=21, height=38 ; compact: padding-x=15, height=32 */ |
| 102 | +.ui.button { /* stylelint-disable-line no-duplicate-selectors */ |
| 103 | + min-height: 38px; |
| 104 | + padding: 0.57em /* around 8px */ 1.43em /* around 20px */; |
| 105 | +} |
105 | 106 | .ui.compact.buttons .button,
|
106 | 107 | .ui.compact.button {
|
107 |
| - padding: 0.58928571em 1.125em; |
| 108 | + padding: 0.42em /* around 8px */ 1.07em /* around 15px */; |
| 109 | + min-height: 32px; |
108 | 110 | }
|
109 | 111 | .ui.compact.icon.buttons .button,
|
110 | 112 | .ui.compact.icon.button {
|
111 |
| - padding: 0.58928571em; |
112 |
| -} |
113 |
| -.ui.compact.labeled.icon.button { |
114 |
| - padding: 0.58928571em 3.69642857em; |
115 |
| -} |
116 |
| -.ui.compact.labeled.icon.button > .icon { |
117 |
| - padding: 0.58928571em 0; |
| 113 | + padding: 0.57em /* around 8px */; |
118 | 114 | }
|
119 | 115 |
|
120 |
| -.ui.buttons .button, |
121 |
| -.ui.button { |
122 |
| - font-size: 1rem; |
123 |
| -} |
| 116 | +/* reference size: mini: padding-x=16, height=30 ; compact: padding-x=12, height=26 */ |
124 | 117 | .ui.mini.buttons .dropdown,
|
125 | 118 | .ui.mini.buttons .dropdown .menu > .item,
|
126 | 119 | .ui.mini.buttons .button,
|
127 | 120 | .ui.ui.ui.ui.mini.button {
|
128 |
| - font-size: 0.78571429rem; |
| 121 | + font-size: 11px; |
| 122 | + min-height: 30px; |
| 123 | +} |
| 124 | +.ui.ui.ui.ui.mini.button.compact { |
| 125 | + min-height: 26px; |
129 | 126 | }
|
| 127 | + |
| 128 | +/* reference size: tiny: padding-x=18, height=32 ; compact: padding-x=13, height=28 */ |
130 | 129 | .ui.tiny.buttons .dropdown,
|
131 | 130 | .ui.tiny.buttons .dropdown .menu > .item,
|
132 | 131 | .ui.tiny.buttons .button,
|
133 | 132 | .ui.ui.ui.ui.tiny.button {
|
134 |
| - font-size: 0.85714286rem; |
| 133 | + font-size: 12px; |
| 134 | + min-height: 32px; |
| 135 | +} |
| 136 | +.ui.ui.ui.ui.tiny.button.compact { |
| 137 | + min-height: 28px; |
135 | 138 | }
|
| 139 | + |
| 140 | +/* reference size: small: padding-x=19, height=34 ; compact: padding-x=14, height=30 */ |
136 | 141 | .ui.small.buttons .dropdown,
|
137 | 142 | .ui.small.buttons .dropdown .menu > .item,
|
138 | 143 | .ui.small.buttons .button,
|
139 | 144 | .ui.ui.ui.ui.small.button {
|
140 |
| - font-size: 0.92857143rem; |
| 145 | + font-size: 13px; |
| 146 | + padding: 0.42em /* around 8px */ 1.07em /* around 15px */; |
| 147 | + min-height: 34px; |
| 148 | +} |
| 149 | +.ui.ui.ui.ui.small.button.compact { |
| 150 | + min-height: 30px; |
141 | 151 | }
|
142 | 152 |
|
143 | 153 | .ui.icon.buttons .button,
|
144 | 154 | .ui.icon.button:not(.compact) {
|
145 |
| - padding: 0.78571429em; |
| 155 | + padding: 0.57em 1.07em 0.57em 0.57em; |
146 | 156 | }
|
147 | 157 | .ui.icon.buttons .button > .icon,
|
148 | 158 | .ui.icon.button > .icon {
|
|
152 | 162 |
|
153 | 163 | .ui.basic.buttons .button,
|
154 | 164 | .ui.basic.button {
|
155 |
| - border-radius: 0.28571429rem; |
| 165 | + border-radius: var(--border-radius); |
156 | 166 | background: none;
|
157 | 167 | }
|
158 | 168 | .ui.basic.buttons {
|
159 | 169 | border: 1px solid var(--color-secondary);
|
160 |
| - border-radius: 0.28571429rem; |
| 170 | + border-radius: var(--border-radius); |
161 | 171 | }
|
162 | 172 | .ui.basic.buttons .button {
|
163 | 173 | border-radius: 0;
|
|
188 | 198 | background: var(--color-active);
|
189 | 199 | }
|
190 | 200 |
|
191 |
| -.ui.labeled.icon.button { |
192 |
| - position: relative; |
193 |
| - padding-left: 4.07142857em !important; |
194 |
| - padding-right: 1.5em !important; |
195 |
| -} |
196 |
| - |
197 |
| -.ui.labeled.icon.button > .icon { |
198 |
| - position: absolute; |
199 |
| - top: 0; |
200 |
| - left: 0; |
201 |
| - height: 100%; |
202 |
| - line-height: 1; |
203 |
| - border-radius: 0; |
204 |
| - border-top-left-radius: inherit; |
205 |
| - border-bottom-left-radius: inherit; |
206 |
| - text-align: center; |
207 |
| - animation: none; |
208 |
| - padding: 0.78571429em 0; |
209 |
| - margin: 0; |
210 |
| - width: 2.57142857em; |
211 |
| - background: var(--color-hover); |
212 |
| -} |
213 |
| - |
214 | 201 | .ui.button.toggle.active {
|
215 | 202 | background-color: var(--color-green);
|
216 | 203 | color: var(--color-white);
|
@@ -379,12 +366,12 @@ It needs some tricks to tweak the left/right borders with active state */
|
379 | 366 | .ui.buttons .button:first-child {
|
380 | 367 | border-left: none;
|
381 | 368 | margin-left: 0;
|
382 |
| - border-top-left-radius: 0.28571429rem; |
383 |
| - border-bottom-left-radius: 0.28571429rem; |
| 369 | + border-top-left-radius: var(--border-radius); |
| 370 | + border-bottom-left-radius: var(--border-radius); |
384 | 371 | }
|
385 | 372 | .ui.buttons .button:last-child {
|
386 |
| - border-top-right-radius: 0.28571429rem; |
387 |
| - border-bottom-right-radius: 0.28571429rem; |
| 373 | + border-top-right-radius: var(--border-radius); |
| 374 | + border-bottom-right-radius: var(--border-radius); |
388 | 375 | }
|
389 | 376 |
|
390 | 377 | .ui.buttons .button:hover {
|
@@ -414,10 +401,3 @@ It needs some tricks to tweak the left/right borders with active state */
|
414 | 401 | .ui.buttons .button.active + .button {
|
415 | 402 | border-left: none;
|
416 | 403 | }
|
417 |
| - |
418 |
| -/* apply the vertical padding of .compact to non-compact buttons when they contain a svg as they |
419 |
| - would otherwise appear too large. Seen on "RSS Feed" button on repo releases tab. */ |
420 |
| -.ui.small.button:not(.compact):has(.svg) { |
421 |
| - padding-top: 0.58928571em; |
422 |
| - padding-bottom: 0.58928571em; |
423 |
| -} |
0 commit comments