@primer/css 0.0.0-20220420170139 → 0.0.0-20220420193352

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/CHANGELOG.md +3 -9
  2. package/actionlist/action-list-item.scss +7 -10
  3. package/alerts/banner.scss +142 -0
  4. package/alerts/index.scss +1 -0
  5. package/autocomplete/autocomplete.scss +7 -3
  6. package/base/base.scss +3 -63
  7. package/base/normalize.scss +52 -12
  8. package/buttons/button.scss +27 -54
  9. package/buttons/misc.scss +19 -25
  10. package/dist/actionlist.css +1 -1
  11. package/dist/actionlist.css.map +1 -1
  12. package/dist/alerts.css +1 -1
  13. package/dist/alerts.css.map +1 -1
  14. package/dist/autocomplete.css +1 -1
  15. package/dist/autocomplete.css.map +1 -1
  16. package/dist/avatars.css.map +1 -1
  17. package/dist/base.css +1 -1
  18. package/dist/base.css.map +1 -1
  19. package/dist/blankslate.css.map +1 -1
  20. package/dist/box.css.map +1 -1
  21. package/dist/branch-name.css.map +1 -1
  22. package/dist/breadcrumb.css.map +1 -1
  23. package/dist/buttons.css +1 -1
  24. package/dist/buttons.css.map +1 -1
  25. package/dist/core.css +1 -1
  26. package/dist/core.css.map +1 -1
  27. package/dist/dropdown.css +1 -1
  28. package/dist/dropdown.css.map +1 -1
  29. package/dist/forms.css +1 -1
  30. package/dist/forms.css.map +1 -1
  31. package/dist/header.css.map +1 -1
  32. package/dist/labels.css.map +1 -1
  33. package/dist/layout.css.map +1 -1
  34. package/dist/links.css +1 -1
  35. package/dist/links.css.map +1 -1
  36. package/dist/loaders.css.map +1 -1
  37. package/dist/markdown.css.map +1 -1
  38. package/dist/marketing-buttons.css +1 -1
  39. package/dist/marketing-buttons.css.map +1 -1
  40. package/dist/marketing-links.css +1 -1
  41. package/dist/marketing-links.css.map +1 -1
  42. package/dist/marketing-type.css +1 -1
  43. package/dist/marketing-type.css.map +1 -1
  44. package/dist/marketing-utilities.css.map +1 -1
  45. package/dist/marketing.css +1 -1
  46. package/dist/marketing.css.map +1 -1
  47. package/dist/meta.json +33 -33
  48. package/dist/navigation.css +1 -1
  49. package/dist/navigation.css.map +1 -1
  50. package/dist/pagination.css +1 -1
  51. package/dist/pagination.css.map +1 -1
  52. package/dist/popover.css.map +1 -1
  53. package/dist/primer.css +3 -3
  54. package/dist/primer.css.map +1 -1
  55. package/dist/product.css +1 -1
  56. package/dist/product.css.map +1 -1
  57. package/dist/progress.css.map +1 -1
  58. package/dist/select-menu.css.map +1 -1
  59. package/dist/stats/actionlist.json +1 -1
  60. package/dist/stats/alerts.json +1 -1
  61. package/dist/stats/autocomplete.json +1 -1
  62. package/dist/stats/base.json +1 -1
  63. package/dist/stats/buttons.json +1 -1
  64. package/dist/stats/core.json +1 -1
  65. package/dist/stats/dropdown.json +1 -1
  66. package/dist/stats/forms.json +1 -1
  67. package/dist/stats/links.json +1 -1
  68. package/dist/stats/marketing-buttons.json +1 -1
  69. package/dist/stats/marketing-links.json +1 -1
  70. package/dist/stats/marketing-type.json +1 -1
  71. package/dist/stats/marketing.json +1 -1
  72. package/dist/stats/navigation.json +1 -1
  73. package/dist/stats/pagination.json +1 -1
  74. package/dist/stats/primer.json +1 -1
  75. package/dist/stats/product.json +1 -1
  76. package/dist/stats/toasts.json +1 -1
  77. package/dist/stats/utilities.json +1 -1
  78. package/dist/subhead.css.map +1 -1
  79. package/dist/timeline.css.map +1 -1
  80. package/dist/toasts.css +1 -1
  81. package/dist/toasts.css.map +1 -1
  82. package/dist/tooltips.css.map +1 -1
  83. package/dist/truncate.css.map +1 -1
  84. package/dist/utilities.css +1 -1
  85. package/dist/utilities.css.map +1 -1
  86. package/dropdown/dropdown.scss +2 -0
  87. package/forms/form-control.scss +5 -23
  88. package/forms/form-group.scss +13 -38
  89. package/forms/input-group.scss +0 -8
  90. package/links/link.scss +0 -5
  91. package/marketing/buttons/button.scss +26 -32
  92. package/marketing/links/link.scss +5 -5
  93. package/marketing/type/typography.scss +29 -0
  94. package/navigation/filter-list.scss +0 -18
  95. package/navigation/menu.scss +8 -6
  96. package/navigation/sidenav.scss +10 -1
  97. package/navigation/subnav.scss +0 -18
  98. package/navigation/tabnav.scss +2 -7
  99. package/navigation/underline-nav.scss +28 -79
  100. package/package.json +4 -5
  101. package/pagination/pagination.scss +3 -24
  102. package/support/mixins/misc.scss +1 -47
  103. package/toasts/toasts.scss +4 -7
  104. package/utilities/details.scss +4 -81
package/CHANGELOG.md CHANGED
@@ -1,16 +1,10 @@
1
1
  # @primer/css
2
2
 
3
- ## 0.0.0-20220420170139
3
+ ## 0.0.0-20220420193352
4
4
 
5
- ### Major Changes
6
-
7
- - [#1744](https://github.com/primer/css/pull/1744) [`942f65a4`](https://github.com/primer/css/commit/942f65a45a18b7042ba1ce2703688b62d874cf18) Thanks [@langermank](https://github.com/langermank)! - Global CSS focus styles
8
-
9
- * [#1767](https://github.com/primer/css/pull/1767) [`7e01db97`](https://github.com/primer/css/commit/7e01db97f3f2b9d9383f66385ca16f0bdc06abd1) Thanks [@tobiasahlin](https://github.com/tobiasahlin)! - Marketing: Remove unused pullquote selector
5
+ ### Minor Changes
10
6
 
11
- - [#1821](https://github.com/primer/css/pull/1821) [`daa2685c`](https://github.com/primer/css/commit/daa2685c596d894b3bae1896bf97c3319cd9816c) Thanks [@jonrohan](https://github.com/jonrohan)! - UnderlineNav `:focus` styles
12
- Refactor selected state and spacing
13
- Add selected bold state override from github/github
7
+ - [#1979](https://github.com/primer/css/pull/1979) [`753e7db2`](https://github.com/primer/css/commit/753e7db2dbdafa34dbd68bfdbe809f1d3b05ad6f) Thanks [@vdepizzol](https://github.com/vdepizzol)! - Add new flash alert `.Banner` to replace `.flash`.
14
8
 
15
9
  ### Patch Changes
16
10
 
@@ -1,5 +1,12 @@
1
1
  // stylelint-disable max-nesting-depth, selector-max-specificity, selector-max-compound-selectors
2
2
 
3
+ @mixin focusOutline {
4
+ position: relative;
5
+ z-index: 1;
6
+ outline: none;
7
+ box-shadow: 0 0 0 2px var(--color-accent-fg); // this color breaks convention
8
+ }
9
+
3
10
  @mixin activeIndicatorLine {
4
11
  position: absolute;
5
12
  top: calc(50% - 12px);
@@ -307,16 +314,6 @@
307
314
  text-decoration: none;
308
315
  }
309
316
 
310
- &:focus {
311
- @include focusOutline;
312
-
313
- // remove fallback :focus if :focus-visible is supported
314
- &:not(:focus-visible) {
315
- outline: solid 1px transparent;
316
- }
317
- }
318
-
319
- // default focus state
320
317
  &:focus-visible {
321
318
  @include focusOutline;
322
319
  }
@@ -0,0 +1,142 @@
1
+ // stylelint-disable selector-max-type
2
+
3
+ // Banner alert
4
+
5
+ .Banner {
6
+ position: relative;
7
+ display: grid;
8
+ padding: $spacer-2;
9
+ color: var(--color-fg-default);
10
+ background-image: linear-gradient(var(--color-accent-subtle), var(--color-accent-subtle));
11
+ border: $border-width $border-style var(--color-accent-muted);
12
+ border-radius: $border-radius;
13
+ grid-auto-flow: column;
14
+ grid-template-areas: 'visual message actions close';
15
+ grid-template-columns: min-content 1fr min-content min-content;
16
+ grid-template-rows: min-content;
17
+
18
+ // `sm` breakpoint variantion
19
+ @media (max-width: #{map-get($breakpoints, 'sm') - 0.02px}) {
20
+ grid-template-areas:
21
+ 'visual message close'
22
+ ' . actions actions';
23
+ grid-template-columns: min-content 1fr min-content;
24
+ grid-template-rows: min-content min-content;
25
+
26
+ .Banner-actions {
27
+ margin: $spacer-2 0 0 $spacer-2;
28
+ }
29
+ }
30
+
31
+ // Elements
32
+
33
+ .Banner-visual {
34
+ display: grid;
35
+ // Migrate to design tokens when available
36
+ // calc((var(--gh-control-medium-size) - var(--gh-text-body-medium-lineBoxHeight)) / 2)
37
+ // stylelint-disable-next-line primer/spacing
38
+ padding: calc((#{$spacer-5} - 20px) / 2) $spacer-2;
39
+ grid-area: visual;
40
+ align-self: start;
41
+
42
+ > .octicon {
43
+ margin-block: calc((#{$spacer-1}) / 2);
44
+ }
45
+
46
+ > * {
47
+ align-self: center;
48
+ }
49
+ }
50
+
51
+ .Banner-message {
52
+ // Migrate to design tokens when available
53
+ // calc((var(--gh-control-medium-size) - var(--gh-text-body-medium-lineBoxHeight)) / 2)
54
+ // stylelint-disable-next-line primer/spacing
55
+ padding: calc((#{$spacer-5} - 20px) / 2) $spacer-2;
56
+ grid-area: message;
57
+ align-self: center;
58
+
59
+ p:last-child {
60
+ margin-bottom: 0;
61
+ }
62
+
63
+ .Banner-title:not(:only-child) {
64
+ margin-bottom: 0;
65
+ font-weight: $font-weight-bold;
66
+ }
67
+ }
68
+
69
+ .Banner-actions {
70
+ grid-area: actions;
71
+
72
+ &:last-child {
73
+ align-self: end;
74
+ }
75
+ }
76
+
77
+ .Banner-close {
78
+ grid-area: close;
79
+ margin: 0 0 0 $spacer-2;
80
+
81
+ button {
82
+ &:hover {
83
+ background-color: var(--color-action-list-item-default-hover-bg);
84
+ }
85
+ }
86
+ }
87
+
88
+ .Banner-visual .octicon {
89
+ color: var(--color-accent-fg);
90
+ }
91
+
92
+ &.Banner--warning {
93
+ color: var(--color-fg-default);
94
+ background-image: linear-gradient(var(--color-attention-subtle), var(--color-attention-subtle));
95
+ border-color: var(--color-attention-muted);
96
+
97
+ .Banner-visual .octicon {
98
+ color: var(--color-attention-fg);
99
+ }
100
+ }
101
+
102
+ &.Banner--error {
103
+ color: var(--color-fg-default);
104
+ background-image: linear-gradient(var(--color-danger-subtle), var(--color-danger-subtle));
105
+ border-color: var(--color-danger-muted);
106
+
107
+ .Banner-visual .octicon {
108
+ color: var(--color-danger-fg);
109
+ }
110
+ }
111
+
112
+ &.Banner--success {
113
+ color: var(--color-fg-default);
114
+ background-image: linear-gradient(var(--color-success-subtle), var(--color-success-subtle));
115
+ border-color: var(--color-success-muted);
116
+
117
+ .Banner-visual .octicon {
118
+ color: var(--color-success-fg);
119
+ }
120
+ }
121
+
122
+ // Full-width
123
+
124
+ &.Banner--full {
125
+ // stylelint-disable-next-line primer/spacing
126
+ margin-top: ($border-width * -1);
127
+ border-right: 0;
128
+ border-left: 0;
129
+ border-radius: 0;
130
+ }
131
+
132
+ // Replace with Primitives' Narrow viewport range
133
+ @media (max-width: #{map-get($breakpoints, 'md') - 0.02px}) {
134
+ &.Banner--full-whenNarrow {
135
+ // stylelint-disable-next-line primer/spacing
136
+ margin-top: ($border-width * -1);
137
+ border-right: 0;
138
+ border-left: 0;
139
+ border-radius: 0;
140
+ }
141
+ }
142
+ }
package/alerts/index.scss CHANGED
@@ -1,3 +1,4 @@
1
1
  // support files
2
2
  @import '../support/index.scss';
3
3
  @import './flash.scss';
4
+ @import './banner.scss';
@@ -31,9 +31,9 @@
31
31
  align-items: center;
32
32
 
33
33
  &:focus-within {
34
- border-color: var(--color-accent-fg);
35
-
36
- @include focusBoxShadowInset;
34
+ border-color: var(--color-accent-emphasis);
35
+ outline: none;
36
+ box-shadow: var(--color-primer-shadow-focus);
37
37
  }
38
38
 
39
39
  .form-control {
@@ -42,6 +42,10 @@
42
42
  // stylelint-disable-next-line
43
43
  border: none;
44
44
  box-shadow: none;
45
+
46
+ &:focus {
47
+ box-shadow: none;
48
+ }
45
49
  }
46
50
  }
47
51
 
package/base/base.scss CHANGED
@@ -1,4 +1,4 @@
1
- // stylelint-disable selector-max-type, selector-no-qualifying-type
1
+ // stylelint-disable selector-max-type
2
2
  * {
3
3
  box-sizing: border-box;
4
4
  }
@@ -77,70 +77,10 @@ button {
77
77
  }
78
78
 
79
79
  details {
80
- summary {
81
- cursor: pointer;
82
- }
80
+ summary { cursor: pointer; }
83
81
 
84
82
  &:not([open]) {
85
83
  // Set details content hidden by default for browsers that don't do this
86
- > *:not(summary) {
87
- display: none !important;
88
- }
89
- }
90
- }
91
-
92
- // global focus styles
93
-
94
- a,
95
- button,
96
- [role='button'],
97
- input[type='radio'],
98
- input[type='checkbox'] {
99
- transition: 80ms cubic-bezier(0.33, 1, 0.68, 1);
100
- transition-property: color, background-color, box-shadow, border-color;
101
- // fallback :focus state
102
- &:focus {
103
- @include focusOutline;
104
-
105
- // remove fallback :focus if :focus-visible is supported
106
- &:not(:focus-visible) {
107
- outline: solid 1px transparent;
108
- }
109
- }
110
-
111
- // default focus state
112
- &:focus-visible {
113
- @include focusOutline;
114
- }
115
- }
116
-
117
- a:not([class]),
118
- input[type='radio'],
119
- input[type='checkbox'] {
120
- &:focus,
121
- &:focus-visible {
122
- outline-offset: 0;
123
- }
124
- }
125
-
126
- // for handling focus conditionally
127
- .focus {
128
- @include focusBoxShadowInset;
129
- }
130
-
131
- // Windows High Contrast mode
132
- @media (forced-colors: active) {
133
- *:focus,
134
- *:focus-visible {
135
- outline: solid 1px transparent;
136
- }
137
-
138
- input:not([type='radio'], [type='checkbox']),
139
- textarea,
140
- select {
141
- &:focus,
142
- &:focus-visible {
143
- outline-offset: 2px;
144
- }
84
+ > *:not(summary) { display: none !important; }
145
85
  }
146
86
  }
@@ -39,8 +39,7 @@ header,
39
39
  main, /* 2 */
40
40
  menu,
41
41
  nav,
42
- section {
43
- /* 1 */
42
+ section { /* 1 */
44
43
  display: block;
45
44
  }
46
45
 
@@ -97,6 +96,16 @@ a {
97
96
  background-color: transparent; /* 1 */
98
97
  }
99
98
 
99
+ /**
100
+ * Remove the outline on focused links when they are also active or hovered
101
+ * in all browsers (opinionated).
102
+ */
103
+
104
+ a:active,
105
+ a:hover {
106
+ outline-width: 0;
107
+ }
108
+
100
109
  /* Text-level semantics
101
110
  ========================================================================== */
102
111
 
@@ -269,8 +278,7 @@ optgroup {
269
278
  */
270
279
 
271
280
  button,
272
- input {
273
- /* 1 */
281
+ input { /* 1 */
274
282
  overflow: visible;
275
283
  }
276
284
 
@@ -280,8 +288,7 @@ input {
280
288
  */
281
289
 
282
290
  button,
283
- select {
284
- /* 1 */
291
+ select { /* 1 */
285
292
  text-transform: none;
286
293
  }
287
294
 
@@ -298,6 +305,29 @@ html [type="button"], /* 1 */
298
305
  -webkit-appearance: button; /* 2 */
299
306
  }
300
307
 
308
+ /**
309
+ * Remove the inner border and padding in Firefox.
310
+ */
311
+
312
+ button::-moz-focus-inner,
313
+ [type="button"]::-moz-focus-inner,
314
+ [type="reset"]::-moz-focus-inner,
315
+ [type="submit"]::-moz-focus-inner {
316
+ border-style: none;
317
+ padding: 0;
318
+ }
319
+
320
+ /**
321
+ * Restore the focus styles unset by the previous rule.
322
+ */
323
+
324
+ button:-moz-focusring,
325
+ [type="button"]:-moz-focusring,
326
+ [type="reset"]:-moz-focusring,
327
+ [type="submit"]:-moz-focusring {
328
+ outline: 1px dotted ButtonText;
329
+ }
330
+
301
331
  /**
302
332
  * Change the border, margin, and padding in all browsers (opinionated).
303
333
  */
@@ -337,8 +367,8 @@ textarea {
337
367
  * 2. Remove the padding in IE 10-.
338
368
  */
339
369
 
340
- [type='checkbox'],
341
- [type='radio'] {
370
+ [type="checkbox"],
371
+ [type="radio"] {
342
372
  box-sizing: border-box; /* 1 */
343
373
  padding: 0; /* 2 */
344
374
  }
@@ -347,17 +377,27 @@ textarea {
347
377
  * Correct the cursor style of increment and decrement buttons in Chrome.
348
378
  */
349
379
 
350
- [type='number']::-webkit-inner-spin-button,
351
- [type='number']::-webkit-outer-spin-button {
380
+ [type="number"]::-webkit-inner-spin-button,
381
+ [type="number"]::-webkit-outer-spin-button {
352
382
  height: auto;
353
383
  }
354
384
 
385
+ /**
386
+ * 1. Correct the odd appearance in Chrome and Safari.
387
+ * 2. Correct the outline style in Safari.
388
+ */
389
+
390
+ [type="search"] {
391
+ -webkit-appearance: textfield; /* 1 */
392
+ outline-offset: -2px; /* 2 */
393
+ }
394
+
355
395
  /**
356
396
  * Remove the inner padding and cancel buttons in Chrome and Safari on OS X.
357
397
  */
358
398
 
359
- [type='search']::-webkit-search-cancel-button,
360
- [type='search']::-webkit-search-decoration {
399
+ [type="search"]::-webkit-search-cancel-button,
400
+ [type="search"]::-webkit-search-decoration {
361
401
  -webkit-appearance: none;
362
402
  }
363
403
 
@@ -66,8 +66,8 @@
66
66
  background-color: var(--color-btn-bg);
67
67
  border-color: var(--color-btn-border);
68
68
  box-shadow: var(--color-btn-shadow), var(--color-btn-inset-shadow);
69
- transition: 80ms cubic-bezier(0.33, 1, 0.68, 1);
70
- transition-property: color, background-color, box-shadow, border-color;
69
+ transition: 0.2s cubic-bezier(0.3, 0, 0.5, 1);
70
+ transition-property: color, background-color, border-color;
71
71
 
72
72
  &:hover,
73
73
  &.hover,
@@ -100,6 +100,14 @@
100
100
  color: var(--color-primer-fg-disabled);
101
101
  }
102
102
  }
103
+
104
+ // Keep :focus after :disabled. Allows to see the focus ring even on disabled buttons
105
+ &:focus,
106
+ &.focus {
107
+ border-color: var(--color-btn-focus-border);
108
+ outline: none;
109
+ box-shadow: var(--color-btn-focus-shadow);
110
+ }
103
111
  }
104
112
 
105
113
  // Primary button
@@ -117,22 +125,6 @@
117
125
  border-color: var(--color-btn-primary-hover-border);
118
126
  }
119
127
 
120
- // fallback :focus state
121
- &:focus {
122
- @include focusOutlineOnEmphasis;
123
-
124
- // remove fallback :focus if :focus-visible is supported
125
- &:not(:focus-visible) {
126
- outline: solid 1px transparent;
127
- box-shadow: none;
128
- }
129
- }
130
-
131
- // default focus state
132
- &:focus-visible {
133
- @include focusOutlineOnEmphasis;
134
- }
135
-
136
128
  &:active,
137
129
  &.selected,
138
130
  &[aria-selected='true'] {
@@ -152,6 +144,13 @@
152
144
  }
153
145
  }
154
146
 
147
+ &:focus,
148
+ &.focus {
149
+ background-color: var(--color-btn-primary-focus-bg);
150
+ border-color: var(--color-btn-primary-focus-border);
151
+ box-shadow: var(--color-btn-primary-focus-shadow);
152
+ }
153
+
155
154
  .Counter {
156
155
  color: inherit;
157
156
  background-color: var(--color-btn-primary-counter-bg);
@@ -162,26 +161,6 @@
162
161
  }
163
162
  }
164
163
 
165
- // ensure links styled as button primary gets proper focus style
166
- // stylelint-disable-next-line selector-no-qualifying-type
167
- a.btn-primary {
168
- // fallback :focus state
169
- &:focus {
170
- @include focusOutlineOnEmphasis;
171
-
172
- // remove fallback :focus if :focus-visible is supported
173
- &:not(:focus-visible) {
174
- outline: solid 1px transparent;
175
- box-shadow: none;
176
- }
177
- }
178
-
179
- // default focus state
180
- &:focus-visible {
181
- @include focusOutlineOnEmphasis;
182
- }
183
- }
184
-
185
164
  // Outline button
186
165
 
187
166
  .btn-outline {
@@ -210,22 +189,6 @@ a.btn-primary {
210
189
  background-color: var(--color-btn-outline-selected-bg);
211
190
  border-color: var(--color-btn-outline-selected-border);
212
191
  box-shadow: var(--color-btn-outline-selected-shadow);
213
-
214
- // fallback :focus state
215
- &:focus {
216
- @include focusOutlineOnEmphasis;
217
-
218
- // remove fallback :focus if :focus-visible is supported
219
- &:not(:focus-visible) {
220
- outline: solid 1px transparent;
221
- box-shadow: none;
222
- }
223
- }
224
-
225
- // default focus state
226
- &:focus-visible {
227
- @include focusOutlineOnEmphasis;
228
- }
229
192
  }
230
193
 
231
194
  &:disabled,
@@ -241,6 +204,11 @@ a.btn-primary {
241
204
  }
242
205
  }
243
206
 
207
+ &:focus {
208
+ border-color: var(--color-btn-outline-focus-border);
209
+ box-shadow: var(--color-btn-outline-focus-shadow);
210
+ }
211
+
244
212
  .Counter {
245
213
  color: inherit;
246
214
  background-color: var(--color-btn-outline-counter-bg);
@@ -298,6 +266,11 @@ a.btn-primary {
298
266
  }
299
267
  }
300
268
 
269
+ &:focus {
270
+ border-color: var(--color-btn-danger-focus-border);
271
+ box-shadow: var(--color-btn-danger-focus-shadow);
272
+ }
273
+
301
274
  .Counter {
302
275
  color: inherit;
303
276
  background-color: var(--color-btn-danger-counter-bg);
package/buttons/misc.scss CHANGED
@@ -28,14 +28,6 @@
28
28
  cursor: default;
29
29
  }
30
30
  }
31
-
32
- &:not(.dropdown-item) {
33
- &:focus,
34
- &:focus-visible {
35
- border-radius: $border-radius;
36
- outline-offset: 0;
37
- }
38
- }
39
31
  }
40
32
 
41
33
  // Invisible button
@@ -45,7 +37,6 @@
45
37
  color: var(--color-accent-fg);
46
38
  background-color: transparent; // Reset default gradient backgrounds and colors
47
39
  border: 0;
48
- border-radius: $border-radius;
49
40
  box-shadow: none;
50
41
 
51
42
  &:hover,
@@ -57,14 +48,15 @@
57
48
  }
58
49
 
59
50
  &:active,
51
+ &:focus,
60
52
  &.selected,
61
53
  &[aria-selected='true'],
62
54
  &.zeroclipboard-is-active {
63
55
  color: var(--color-accent-fg);
64
- background: none;
56
+ background-color: none;
65
57
  border-color: var(--color-btn-active-border);
66
-
67
- @include focusOutline;
58
+ outline: none;
59
+ box-shadow: var(--color-btn-focus-shadow);
68
60
  }
69
61
 
70
62
  &:active &.zeroclipboard-is-active {
@@ -97,23 +89,14 @@
97
89
  border: 0;
98
90
  box-shadow: none;
99
91
 
100
- &:hover {
101
- color: var(--color-accent-fg);
102
- }
103
-
104
- &:focus,
105
- &:focus-visible {
106
- border-radius: $border-radius;
107
- }
92
+ &:hover { color: var(--color-accent-fg); }
108
93
 
109
94
  &.disabled,
110
95
  &[aria-disabled='true'] {
111
96
  color: var(--color-primer-fg-disabled);
112
97
  cursor: default;
113
98
 
114
- &:hover {
115
- color: var(--color-primer-fg-disabled);
116
- }
99
+ &:hover { color: var(--color-primer-fg-disabled); }
117
100
  }
118
101
  }
119
102
 
@@ -129,13 +112,18 @@
129
112
  color: var(--color-fg-muted);
130
113
  background: transparent;
131
114
  border: 0;
115
+ outline: none;
132
116
 
133
117
  &:hover {
134
118
  color: var(--color-fg-default);
135
119
  }
136
120
 
137
- &:active {
138
- @include focusOutline;
121
+ &:active,
122
+ &:focus {
123
+ color: var(--color-fg-muted);
124
+ border-color: var(--color-btn-active-border);
125
+ outline: none;
126
+ box-shadow: var(--color-btn-focus-shadow);
139
127
  }
140
128
  }
141
129
 
@@ -228,4 +216,10 @@
228
216
  color: var(--color-accent-fg);
229
217
  cursor: pointer;
230
218
  }
219
+
220
+ &:focus {
221
+ z-index: 1;
222
+ outline: 0;
223
+ box-shadow: var(--color-primer-shadow-focus);
224
+ }
231
225
  }