|
22 | 22 | justify-content: center;
|
23 | 23 |
|
24 | 24 | width: 100%;
|
| 25 | + |
| 26 | + .button--sm & { |
| 27 | + /* Offset to better align text in small button */ |
| 28 | + transform: translateY(-1px); |
| 29 | + } |
25 | 30 | }
|
26 | 31 |
|
27 | 32 | .button__text.button--is-loading {
|
|
70 | 75 | min-width: 3rem;
|
71 | 76 | max-width: 12rem;
|
72 | 77 | max-height: 1.5rem;
|
| 78 | + |
73 | 79 | }
|
74 | 80 |
|
75 | 81 | .button--full-width {
|
|
78 | 84 |
|
79 | 85 | /**
|
80 | 86 | * Anatomy and iconLayout (w/ size)
|
| 87 | + * lg=40, md=32, sm=24 when layout is icon-only |
81 | 88 | */
|
82 | 89 | .button--layout-icon-only {
|
83 | 90 | min-width: unset;
|
|
93 | 100 |
|
94 | 101 | .button--lg.button--layout-icon-only {
|
95 | 102 | padding: 0.5rem;
|
| 103 | + width: 2.5rem; |
96 | 104 | }
|
97 | 105 |
|
98 | 106 | .button--md.button--layout-icon-only {
|
99 |
| - padding: 0.5rem |
| 107 | + padding: 0.5rem; |
| 108 | + width: 2rem; |
100 | 109 | }
|
101 | 110 |
|
102 | 111 | .button--sm.button--layout-icon-only {
|
103 | 112 | padding: 0.25rem;
|
| 113 | + width: 1.5rem; |
104 | 114 | }
|
105 | 115 |
|
106 | 116 | .button:focus-visible {
|
|
116 | 126 |
|
117 | 127 | /**
|
118 | 128 | * Rank & Emphasis
|
| 129 | + * TODO-AH: nest the states under the relevant variants/ranks |
119 | 130 | */
|
120 | 131 | .button--primary.button--variant-default {
|
121 | 132 | color: var(--eds-theme-color-text-utility-inverse);
|
|
151 | 162 | .button--secondary.button--variant-critical {
|
152 | 163 | color: var(--eds-theme-color-background-utility-critical-high-emphasis);
|
153 | 164 | border-color: currentColor;
|
154 |
| - background-color: var(--eds-theme-color-background-utility-inverse-high-emphasis); |
| 165 | + background-color: var(--eds-theme-color-background-utility-interactive-no-emphasis) |
155 | 166 | }
|
156 | 167 |
|
157 | 168 | .button--tertiary.button--variant-critical {
|
158 | 169 | color: var(--eds-theme-color-background-utility-critical-high-emphasis);
|
159 | 170 | border-color: var(--eds-theme-color-background-utility-inverse-high-emphasis);
|
160 | 171 | }
|
161 | 172 |
|
| 173 | +.button--primary.button--variant-neutral { |
| 174 | + color: var(--eds-theme-color-text-utility-inverse); |
| 175 | + border-color: var(--eds-theme-color-background-utility-default-medium-emphasis); |
| 176 | + background-color: var(--eds-theme-color-background-utility-default-medium-emphasis); |
| 177 | + |
| 178 | + &:hover { |
| 179 | + border-color: var(--eds-theme-color-background-utility-default-medium-emphasis-hover); |
| 180 | + background-color: var(--eds-theme-color-background-utility-default-medium-emphasis-hover); |
| 181 | + } |
| 182 | + |
| 183 | + &:active { |
| 184 | + border-color: var(--eds-theme-color-background-utility-default-medium-emphasis-active); |
| 185 | + background-color: var(--eds-theme-color-background-utility-default-medium-emphasis-active); |
| 186 | + } |
| 187 | +} |
| 188 | + |
| 189 | +.button--secondary.button--variant-neutral { |
| 190 | + color: var(--eds-theme-color-text-utility-default-secondary); |
| 191 | + border-color: currentColor; |
| 192 | + background-color: var(--eds-theme-color-background-utility-default-no-emphasis); |
| 193 | + |
| 194 | + &:hover { |
| 195 | + border-color: var(--eds-theme-color-border-utility-default-medium-emphasis-hover); |
| 196 | + background-color: var(--eds-theme-color-background-utility-default-no-emphasis-hover); |
| 197 | + } |
| 198 | + |
| 199 | + &:active { |
| 200 | + border-color: var(--eds-theme-color-border-utility-default-medium-emphasis-active); |
| 201 | + background-color: var(--eds-theme-color-background-utility-default-no-emphasis-active); |
| 202 | + } |
| 203 | +} |
| 204 | + |
| 205 | +.button--tertiary.button--variant-neutral { |
| 206 | + color: var(--eds-theme-color-text-utility-default-secondary); |
| 207 | + border-color: transparent; |
| 208 | + background-color: var(--eds-theme-color-background-utility-default-no-emphasis); |
| 209 | + |
| 210 | + &:hover { |
| 211 | + border-color: var(--eds-theme-color-background-utility-default-no-emphasis-hover); |
| 212 | + background-color: var(--eds-theme-color-background-utility-default-no-emphasis-hover); |
| 213 | + } |
| 214 | + |
| 215 | + &:active { |
| 216 | + border-color: var(--eds-theme-color-background-utility-default-no-emphasis-active); |
| 217 | + background-color: var(--eds-theme-color-background-utility-default-no-emphasis-active); |
| 218 | + } |
| 219 | +} |
| 220 | + |
162 | 221 | /**
|
163 | 222 | * Inverse
|
164 | 223 | */
|
|
185 | 244 | * Disabled
|
186 | 245 | */
|
187 | 246 |
|
188 |
| -.button--variant-default.button--disabled, |
189 |
| -.button--variant-critical.button--disabled { |
| 247 | +.button--primary.button--variant-default.button--disabled, |
| 248 | +.button--primary.button--variant-critical.button--disabled, |
| 249 | +.button--primary.button--variant-neutral.button--disabled { |
190 | 250 | color: var(--eds-theme-color-text-utility-disabled-primary);
|
191 | 251 | border-color: var(--eds-theme-color-background-utility-disabled-medium-emphasis);
|
192 | 252 | background-color: var(--eds-theme-color-background-utility-disabled-medium-emphasis);
|
193 | 253 |
|
194 | 254 | pointer-events: none;
|
195 | 255 | }
|
196 | 256 |
|
197 |
| -.button--variant-inverse.button--disabled { |
| 257 | +.button--primary.button--variant-inverse.button--disabled { |
198 | 258 | color: var(--eds-theme-color-text-utility-inverse-disabled);
|
199 | 259 | border-color: var(--eds-theme-color-background-utility-inverse-disabled);
|
200 | 260 | background-color: var(--eds-theme-color-background-utility-inverse-disabled);
|
201 | 261 |
|
202 | 262 | pointer-events: none;
|
203 | 263 | }
|
204 | 264 |
|
| 265 | +.button--secondary.button--variant-default.button--disabled, |
| 266 | +.button--secondary.button--variant-critical.button--disabled, |
| 267 | +.button--secondary.button--variant-neutral.button--disabled { |
| 268 | + color: var(--eds-theme-color-text-utility-disabled-primary); |
| 269 | + border-color: var(--eds-theme-color-border-disabled); |
| 270 | + background-color: var(--eds-theme-color-background-utility-default-no-emphasis); |
| 271 | + |
| 272 | + pointer-events: none; |
| 273 | +} |
| 274 | + |
| 275 | +.button--tertiary.button--variant-default.button--disabled, |
| 276 | +.button--tertiary.button--variant-critical.button--disabled, |
| 277 | +.button--tertiary.button--variant-neutral.button--disabled { |
| 278 | + color: var(--eds-theme-color-text-utility-disabled-primary); |
| 279 | + background-color: var(--eds-theme-color-background-utility-default-no-emphasis); |
| 280 | + |
| 281 | + pointer-events: none; |
| 282 | +} |
| 283 | + |
205 | 284 | /**
|
206 | 285 | * States
|
207 | 286 | */
|
|
0 commit comments