|
20 | 20 |
|
21 | 21 | $primary: $ux-emerald-600; |
22 | 22 | $danger: $ux-red; |
23 | | -$warning: $ux-yellow-400; |
| 23 | +$warning: $ux-yellow-400; |
| 24 | + |
| 25 | +@mixin btn-focus-outline { |
| 26 | + box-shadow: none !important; |
| 27 | + outline: 0.125rem solid $ux-blue-500; |
| 28 | + outline-offset: 0.125rem; |
| 29 | +} |
24 | 30 |
|
25 | 31 | @mixin btn-primary { |
26 | 32 | $btn-primary-background: $primary; |
@@ -48,6 +54,10 @@ $warning: $ux-yellow-400; |
48 | 54 | $btn-primary-active-border, |
49 | 55 | $btn-primary-active-color, |
50 | 56 | ); |
| 57 | + |
| 58 | + &:focus, &:active { |
| 59 | + @include btn-focus-outline; |
| 60 | + } |
51 | 61 | } |
52 | 62 |
|
53 | 63 | @mixin btn-outline-primary { |
@@ -77,6 +87,10 @@ $warning: $ux-yellow-400; |
77 | 87 | background-color: $btn-outline-primary-active-background; |
78 | 88 | border-color: $btn-outline-primary-active-border-color; |
79 | 89 | } |
| 90 | + |
| 91 | + &:focus, &:active { |
| 92 | + @include btn-focus-outline; |
| 93 | + } |
80 | 94 | } |
81 | 95 |
|
82 | 96 | @mixin btn-danger { |
@@ -105,6 +119,10 @@ $warning: $ux-yellow-400; |
105 | 119 | $btn-danger-active-border, |
106 | 120 | $btn-danger-active-color, |
107 | 121 | ); |
| 122 | + |
| 123 | + &:focus, &:active { |
| 124 | + @include btn-focus-outline; |
| 125 | + } |
108 | 126 | } |
109 | 127 |
|
110 | 128 | @mixin btn-outline-danger { |
@@ -134,6 +152,10 @@ $warning: $ux-yellow-400; |
134 | 152 | background-color: $btn-outline-danger-active-background; |
135 | 153 | border-color: $btn-outline-danger-active-border-color; |
136 | 154 | } |
| 155 | + |
| 156 | + &:focus, &:active { |
| 157 | + @include btn-focus-outline; |
| 158 | + } |
137 | 159 | } |
138 | 160 |
|
139 | 161 | @mixin btn-warning { |
@@ -162,6 +184,10 @@ $warning: $ux-yellow-400; |
162 | 184 | $btn-warning-active-border, |
163 | 185 | $btn-warning-active-color, |
164 | 186 | ); |
| 187 | + |
| 188 | + &:focus, &:active { |
| 189 | + @include btn-focus-outline; |
| 190 | + } |
165 | 191 | } |
166 | 192 |
|
167 | 193 | @mixin btn-outline-warning { |
@@ -191,6 +217,10 @@ $warning: $ux-yellow-400; |
191 | 217 | background-color: $btn-outline-warning-active-background; |
192 | 218 | border-color: $btn-outline-warning-active-border-color; |
193 | 219 | } |
| 220 | + |
| 221 | + &:focus, &:active { |
| 222 | + @include btn-focus-outline; |
| 223 | + } |
194 | 224 | } |
195 | 225 |
|
196 | 226 | @mixin btn-transparent { |
@@ -223,6 +253,10 @@ $warning: $ux-yellow-400; |
223 | 253 | &:disabled { |
224 | 254 | color: $ux-gray-500; |
225 | 255 | } |
| 256 | + |
| 257 | + &:focus, &:active { |
| 258 | + @include btn-focus-outline; |
| 259 | + } |
226 | 260 | } |
227 | 261 |
|
228 | 262 | @mixin btn-outline-transparent { |
@@ -252,6 +286,10 @@ $warning: $ux-yellow-400; |
252 | 286 | background-color: $btn-outline-transparent-active-background; |
253 | 287 | border-color: $btn-outline-transparent-active-border-color; |
254 | 288 | } |
| 289 | + |
| 290 | + &:focus, &:active { |
| 291 | + @include btn-focus-outline; |
| 292 | + } |
255 | 293 | } |
256 | 294 |
|
257 | 295 | @mixin btn-brand-google { |
@@ -284,6 +322,10 @@ $warning: $ux-yellow-400; |
284 | 322 | &:disabled { |
285 | 323 | color: $ux-white; |
286 | 324 | } |
| 325 | + |
| 326 | + &:focus, &:active { |
| 327 | + @include btn-focus-outline; |
| 328 | + } |
287 | 329 | } |
288 | 330 |
|
289 | 331 | @mixin btn-brand-facebook { |
@@ -316,6 +358,10 @@ $warning: $ux-yellow-400; |
316 | 358 | &:disabled { |
317 | 359 | color: $ux-white; |
318 | 360 | } |
| 361 | + |
| 362 | + &:focus, &:active { |
| 363 | + @include btn-focus-outline; |
| 364 | + } |
319 | 365 | } |
320 | 366 |
|
321 | 367 | @mixin btn-brand-linkedin { |
@@ -348,6 +394,10 @@ $warning: $ux-yellow-400; |
348 | 394 | &:disabled { |
349 | 395 | color: $ux-white; |
350 | 396 | } |
| 397 | + |
| 398 | + &:focus, &:active { |
| 399 | + @include btn-focus-outline; |
| 400 | + } |
351 | 401 | } |
352 | 402 |
|
353 | 403 | @mixin btn-brand-twitter { |
@@ -380,5 +430,9 @@ $warning: $ux-yellow-400; |
380 | 430 | &:disabled { |
381 | 431 | color: $ux-white; |
382 | 432 | } |
| 433 | + |
| 434 | + &:focus, &:active { |
| 435 | + @include btn-focus-outline; |
| 436 | + } |
383 | 437 | } |
384 | 438 |
|
0 commit comments