@primer/css 0.0.0-20220114013357 → 0.0.0-20220114215001

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 (89) hide show
  1. package/CHANGELOG.md +5 -1
  2. package/actionlist/action-list-item.scss +6 -11
  3. package/base/base.scss +56 -2
  4. package/base/normalize.scss +12 -52
  5. package/buttons/button.scss +0 -25
  6. package/buttons/misc.scss +12 -19
  7. package/core/index.scss +1 -1
  8. package/dist/actionlist.css +1 -1
  9. package/dist/actionlist.css.map +1 -1
  10. package/dist/alerts.css.map +1 -1
  11. package/dist/autocomplete.css.map +1 -1
  12. package/dist/avatars.css.map +1 -1
  13. package/dist/base.css +1 -1
  14. package/dist/base.css.map +1 -1
  15. package/dist/blankslate.css.map +1 -1
  16. package/dist/box.css.map +1 -1
  17. package/dist/branch-name.css.map +1 -1
  18. package/dist/breadcrumb.css.map +1 -1
  19. package/dist/buttons.css +1 -1
  20. package/dist/buttons.css.map +1 -1
  21. package/dist/core.css +1 -1
  22. package/dist/core.css.map +1 -1
  23. package/dist/dropdown.css +1 -1
  24. package/dist/dropdown.css.map +1 -1
  25. package/dist/forms.css +1 -1
  26. package/dist/forms.css.map +1 -1
  27. package/dist/header.css.map +1 -1
  28. package/dist/labels.css.map +1 -1
  29. package/dist/layout.css.map +1 -1
  30. package/dist/links.css.map +1 -1
  31. package/dist/loaders.css.map +1 -1
  32. package/dist/markdown.css.map +1 -1
  33. package/dist/marketing-buttons.css +1 -1
  34. package/dist/marketing-buttons.css.map +1 -1
  35. package/dist/marketing-links.css +1 -1
  36. package/dist/marketing-links.css.map +1 -1
  37. package/dist/marketing-type.css.map +1 -1
  38. package/dist/marketing-utilities.css.map +1 -1
  39. package/dist/marketing.css +1 -1
  40. package/dist/marketing.css.map +1 -1
  41. package/dist/meta.json +31 -31
  42. package/dist/navigation.css +1 -1
  43. package/dist/navigation.css.map +1 -1
  44. package/dist/pagination.css.map +1 -1
  45. package/dist/popover.css.map +1 -1
  46. package/dist/primer.css +3 -3
  47. package/dist/primer.css.map +1 -1
  48. package/dist/product.css +1 -1
  49. package/dist/product.css.map +1 -1
  50. package/dist/progress.css.map +1 -1
  51. package/dist/select-menu.css.map +1 -1
  52. package/dist/stats/actionlist.json +1 -1
  53. package/dist/stats/base.json +1 -1
  54. package/dist/stats/buttons.json +1 -1
  55. package/dist/stats/core.json +1 -1
  56. package/dist/stats/dropdown.json +1 -1
  57. package/dist/stats/forms.json +1 -1
  58. package/dist/stats/marketing-buttons.json +1 -1
  59. package/dist/stats/marketing-links.json +1 -1
  60. package/dist/stats/marketing.json +1 -1
  61. package/dist/stats/navigation.json +1 -1
  62. package/dist/stats/primer.json +1 -1
  63. package/dist/stats/product.json +1 -1
  64. package/dist/stats/toasts.json +1 -1
  65. package/dist/stats/utilities.json +1 -1
  66. package/dist/subhead.css.map +1 -1
  67. package/dist/timeline.css.map +1 -1
  68. package/dist/toasts.css +1 -1
  69. package/dist/toasts.css.map +1 -1
  70. package/dist/tooltips.css.map +1 -1
  71. package/dist/truncate.css.map +1 -1
  72. package/dist/utilities.css +1 -1
  73. package/dist/utilities.css.map +1 -1
  74. package/dropdown/dropdown.scss +0 -2
  75. package/forms/form-control.scss +0 -8
  76. package/forms/form-group.scss +38 -13
  77. package/forms/input-group.scss +8 -0
  78. package/marketing/buttons/button.scss +4 -30
  79. package/marketing/links/link.scss +1 -4
  80. package/navigation/menu.scss +6 -8
  81. package/navigation/sidenav.scss +1 -10
  82. package/navigation/tabnav.scss +6 -2
  83. package/package.json +1 -1
  84. package/support/mixins/misc.scss +7 -0
  85. package/toasts/toasts.scss +7 -4
  86. package/utilities/details.scss +40 -3
  87. package/button-refactor/ButtonsLinksAPI.md +0 -68
  88. package/button-refactor/button.scss +0 -181
  89. package/button-refactor/link.scss +0 -0
@@ -82,12 +82,10 @@
82
82
  text-overflow: ellipsis;
83
83
  white-space: nowrap;
84
84
 
85
- &:focus,
86
85
  &:hover {
87
86
  color: var(--color-fg-on-emphasis);
88
87
  text-decoration: none;
89
88
  background-color: var(--color-accent-emphasis);
90
- outline: none;
91
89
 
92
90
  > .octicon {
93
91
  color: inherit;
@@ -29,16 +29,8 @@ label {
29
29
  background-position: right 8px center; // For form validation. This keeps images 8px from right and centered vertically.
30
30
  border: $border-width $border-style var(--color-border-default);
31
31
  border-radius: $border-radius;
32
- outline: none;
33
32
  box-shadow: var(--color-primer-shadow-inset);
34
33
 
35
- &.focus,
36
- &:focus {
37
- border-color: var(--color-accent-emphasis);
38
- outline: none;
39
- box-shadow: var(--color-primer-shadow-focus);
40
- }
41
-
42
34
  &[disabled] {
43
35
  color: var(--color-primer-fg-disabled);
44
36
  background-color: var(--color-input-disabled-bg);
@@ -26,11 +26,17 @@
26
26
  background-color: var(--color-canvas-default);
27
27
  }
28
28
 
29
- &.shorter { width: 130px; }
29
+ &.shorter {
30
+ width: 130px;
31
+ }
30
32
 
31
- &.short { width: 250px; }
33
+ &.short {
34
+ width: 250px;
35
+ }
32
36
 
33
- &.long { width: 100%; }
37
+ &.long {
38
+ width: 100%;
39
+ }
34
40
  }
35
41
 
36
42
  // Textarea
@@ -81,9 +87,13 @@
81
87
  h4 {
82
88
  margin: $spacer-1 0 0;
83
89
 
84
- &.is-error { color: var(--color-danger-fg); }
90
+ &.is-error {
91
+ color: var(--color-danger-fg);
92
+ }
85
93
 
86
- &.is-success { color: var(--color-success-fg); }
94
+ &.is-success {
95
+ color: var(--color-success-fg);
96
+ }
87
97
 
88
98
  + .note {
89
99
  margin-top: 0;
@@ -195,13 +205,18 @@
195
205
  background-image: linear-gradient(var(--color-success-subtle), var(--color-success-subtle));
196
206
  border-color: var(--color-success-muted);
197
207
 
198
- &::after { border-bottom-color: var(--color-success-subtle); }
199
- &::before { border-bottom-color: var(--color-success-muted); }
208
+ &::after {
209
+ border-bottom-color: var(--color-success-subtle);
210
+ }
211
+
212
+ &::before {
213
+ border-bottom-color: var(--color-success-muted);
214
+ }
200
215
  }
201
216
  }
202
217
 
203
218
  &.warn {
204
- .form-control {
219
+ .form-control:not(:focus, :focus-visible) {
205
220
  border-color: var(--color-attention-emphasis);
206
221
  }
207
222
 
@@ -211,13 +226,18 @@
211
226
  background-image: linear-gradient(var(--color-attention-subtle), var(--color-attention-subtle));
212
227
  border-color: var(--color-attention-muted);
213
228
 
214
- &::after { border-bottom-color: var(--color-attention-subtle); }
215
- &::before { border-bottom-color: var(--color-attention-muted); }
229
+ &::after {
230
+ border-bottom-color: var(--color-attention-subtle);
231
+ }
232
+
233
+ &::before {
234
+ border-bottom-color: var(--color-attention-muted);
235
+ }
216
236
  }
217
237
  }
218
238
 
219
239
  &.errored {
220
- .form-control {
240
+ .form-control:not(:focus, :focus-visible) {
221
241
  border-color: var(--color-danger-emphasis);
222
242
  }
223
243
 
@@ -231,8 +251,13 @@
231
251
  background-image: linear-gradient(var(--color-danger-subtle), var(--color-danger-subtle));
232
252
  border-color: var(--color-danger-muted);
233
253
 
234
- &::after { border-bottom-color: var(--color-danger-subtle); }
235
- &::before { border-bottom-color: var(--color-danger-muted); }
254
+ &::after {
255
+ border-bottom-color: var(--color-danger-subtle);
256
+ }
257
+
258
+ &::before {
259
+ border-bottom-color: var(--color-danger-muted);
260
+ }
236
261
  }
237
262
  }
238
263
  }
@@ -18,6 +18,14 @@
18
18
  &.inline {
19
19
  display: inline-table;
20
20
  }
21
+
22
+ // within input group, if button exists change focus styles to match input (no offset)
23
+ &:focus-within {
24
+ // stylelint-disable-next-line selector-max-type
25
+ button {
26
+ outline-offset: 0;
27
+ }
28
+ }
21
29
  }
22
30
 
23
31
  .input-group .form-control,
@@ -13,7 +13,9 @@
13
13
  white-space: nowrap;
14
14
  vertical-align: middle;
15
15
  user-select: none;
16
- background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 100%), var(--color-mktg-btn-bg) !important;
16
+ background:
17
+ linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 100%),
18
+ var(--color-mktg-btn-bg) !important;
17
19
  border: 0;
18
20
  // stylelint-disable-next-line primer/borders
19
21
  border-radius: 0.375rem;
@@ -42,29 +44,16 @@
42
44
  box-shadow: var(--color-mktg-btn-shadow-hover) !important;
43
45
  }
44
46
 
45
- &:focus,
46
- &.focus {
47
- outline: 0;
48
- box-shadow: var(--color-mktg-btn-shadow-focus), var(--color-mktg-btn-shadow-hover) !important;
49
- }
50
-
51
47
  &:hover,
52
48
  &:focus,
49
+ &:focus-visible,
53
50
  &.focus {
54
51
  &::before {
55
52
  opacity: 1;
56
53
  }
57
-
58
- &:disabled {
59
- box-shadow: none !important;
60
- }
61
54
  }
62
55
 
63
56
  &:active {
64
- outline: none;
65
- // stylelint-disable-next-line primer/box-shadow
66
- box-shadow: 0 0 0 transparent;
67
-
68
57
  &::before {
69
58
  opacity: 0.5 !important;
70
59
  }
@@ -91,11 +80,6 @@
91
80
  box-shadow: var(--color-mktg-btn-shadow-hover-muted) !important;
92
81
  }
93
82
 
94
- &:focus,
95
- &.focus {
96
- box-shadow: var(--color-mktg-btn-shadow-hover-muted), var(--color-mktg-btn-shadow-focus) !important;
97
- }
98
-
99
83
  &:active {
100
84
  // stylelint-disable-next-line primer/box-shadow
101
85
  box-shadow: var(--color-fg-default) 0 0 0 3px inset !important;
@@ -119,11 +103,6 @@
119
103
  &:hover {
120
104
  box-shadow: var(--color-mktg-btn-shadow-hover-muted) !important;
121
105
  }
122
-
123
- &:focus,
124
- .focus {
125
- box-shadow: var(--color-mktg-btn-shadow-hover-muted), var(--color-mktg-btn-shadow-focus) !important;
126
- }
127
106
  }
128
107
 
129
108
  .btn-signup-mktg {
@@ -136,11 +115,6 @@
136
115
  // stylelint-disable-next-line primer/colors
137
116
  background: linear-gradient(180deg, rgba(52, 183, 89, 0.15) 0%, rgba(46, 164, 79, 0) 100%) !important;
138
117
  }
139
-
140
- &:focus {
141
- // stylelint-disable-next-line primer/box-shadow
142
- box-shadow: rgba(46, 164, 79, 0.45) 0 0 0 4px !important;
143
- }
144
118
  }
145
119
 
146
120
  // Size modifiers
@@ -6,10 +6,6 @@
6
6
  text-decoration: none;
7
7
  }
8
8
 
9
- &:active {
10
- outline: none;
11
- }
12
-
13
9
  &::after,
14
10
  &.link-emphasis-mktg::before {
15
11
  position: absolute;
@@ -36,6 +32,7 @@
36
32
 
37
33
  &:hover,
38
34
  &:focus,
35
+ &:focus-visible,
39
36
  &:active {
40
37
  &::after {
41
38
  transform: scaleX(1);
@@ -22,7 +22,9 @@
22
22
  border-top-left-radius: $border-radius;
23
23
  border-top-right-radius: $border-radius;
24
24
 
25
- &::before { border-top-left-radius: $border-radius; }
25
+ &::before {
26
+ border-top-left-radius: $border-radius;
27
+ }
26
28
  }
27
29
 
28
30
  &:last-child {
@@ -30,13 +32,9 @@
30
32
  border-bottom-right-radius: $border-radius;
31
33
  border-bottom-left-radius: $border-radius;
32
34
 
33
- &::before { border-bottom-left-radius: $border-radius; }
34
- }
35
-
36
- &:focus {
37
- z-index: 1;
38
- outline: none;
39
- box-shadow: var(--color-primer-shadow-focus);
35
+ &::before {
36
+ border-bottom-left-radius: $border-radius;
37
+ }
40
38
  }
41
39
 
42
40
  &:hover {
@@ -43,16 +43,9 @@
43
43
 
44
44
  // States
45
45
 
46
- .SideNav-item:focus {
47
- z-index: 1;
48
- outline: none;
49
- box-shadow: var(--color-primer-shadow-focus);
50
- }
51
-
52
46
  .SideNav-item:hover {
53
47
  text-decoration: none;
54
48
  background-color: var(--color-neutral-subtle);
55
- outline: none;
56
49
  }
57
50
 
58
51
  .SideNav-item:active {
@@ -94,11 +87,9 @@
94
87
  border: 0;
95
88
  }
96
89
 
97
- .SideNav-subItem:hover,
98
- .SideNav-subItem:focus {
90
+ .SideNav-subItem:hover {
99
91
  color: var(--color-fg-default);
100
92
  text-decoration: none;
101
- outline: none;
102
93
  }
103
94
 
104
95
  .SideNav-subItem[aria-current]:not([aria-current='false']),
@@ -40,13 +40,17 @@
40
40
  }
41
41
  }
42
42
 
43
- &:hover,
44
- &:focus {
43
+ &:hover {
45
44
  color: var(--color-fg-default);
46
45
  text-decoration: none;
47
46
  transition-duration: 0.1s;
48
47
  }
49
48
 
49
+ &:focus,
50
+ &:focus-visible {
51
+ outline-offset: -2px;
52
+ }
53
+
50
54
  &:active {
51
55
  color: var(--color-fg-muted);
52
56
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/css",
3
- "version": "0.0.0-20220114013357",
3
+ "version": "0.0.0-20220114215001",
4
4
  "description": "The CSS implementation of GitHub's Primer Design System",
5
5
  "homepage": "https://primer.style/css",
6
6
  "author": "GitHub, Inc.",
@@ -24,3 +24,10 @@
24
24
  background-color: $border;
25
25
  }
26
26
  }
27
+
28
+ // global focus styles
29
+
30
+ @mixin focusOutline {
31
+ outline: 2px solid var(--color-accent-fg);
32
+ outline-offset: 2px;
33
+ }
@@ -40,9 +40,7 @@
40
40
  background-color: transparent;
41
41
  border: 0;
42
42
 
43
- &:focus,
44
43
  &:hover {
45
- outline: none;
46
44
  opacity: 0.7;
47
45
  }
48
46
 
@@ -119,6 +117,11 @@
119
117
  }
120
118
 
121
119
  @keyframes Toast--spinner {
122
- from { transform: rotate(0deg); }
123
- to { transform: rotate(360deg); }
120
+ from {
121
+ transform: rotate(0deg);
122
+ }
123
+
124
+ to {
125
+ transform: rotate(360deg);
126
+ }
124
127
  }
@@ -20,9 +20,46 @@
20
20
 
21
21
  .details-reset {
22
22
  // Remove marker added by the display: list-item browser default
23
- > summary { list-style: none; }
23
+ > summary {
24
+ list-style: none;
25
+ // fallback :focus state
26
+ &:focus {
27
+ @include focusOutline;
28
+
29
+ // remove fallback :focus if :focus-visible is supported
30
+ &:not(:focus-visible) {
31
+ outline: solid 1px transparent;
32
+ }
33
+ }
34
+
35
+ // default focus state
36
+ &:focus-visible {
37
+ @include focusOutline;
38
+ }
39
+ }
24
40
  // Remove marker added by details polyfill
25
- > summary::before { display: none; }
41
+ > summary::before {
42
+ display: none;
43
+ }
26
44
  // Remove marker added by Chrome
27
- > summary::-webkit-details-marker { display: none; }
45
+ > summary::-webkit-details-marker {
46
+ display: none;
47
+ }
48
+ }
49
+
50
+ .details-overlay > summary {
51
+ // fallback :focus state
52
+ &:focus {
53
+ @include focusOutline;
54
+
55
+ // remove fallback :focus if :focus-visible is supported
56
+ &:not(:focus-visible) {
57
+ outline: solid 1px transparent;
58
+ }
59
+ }
60
+
61
+ // default focus state
62
+ &:focus-visible {
63
+ @include focusOutline;
64
+ }
28
65
  }
@@ -1,68 +0,0 @@
1
- # Button and Link component APIs
2
- Button and Link has been discussed in a number of issues and discussions over past few years. I went through the list below, took note of their purpose and started compiling a new API spec. This doc is is meant to be collaborative and accompany Storybook docs while we work through a final API recommendation. Once we have a solid plan, this can move into an issue and be delegated across frameworks.
3
-
4
- Existing issues
5
- [x] https://github.com/github/primer/issues/141
6
- - Accessory button component, should reconcile with reaction button (sister component to Button)
7
- [x] https://github.com/github/primer/issues/220
8
- - Tracking issue, mentions Button in the context of API consistency
9
- [x] https://github.com/github/primer/issues/253
10
- - Button audit, anatomy spec, design considerations, some button link discussion, icon buttons (this issue is very informative!)
11
- [x] https://github.com/github/primer/issues/263
12
- - More design discussion, particularly focused on outline button
13
- [x] https://github.com/github/primer/issues/272
14
- - Make icon only buttons square
15
- [x] https://github.com/github/primer/issues/321
16
- - Super specific button use case?
17
- [x] https://github.com/github/primer/issues/350
18
- - a11y audit with task list for PVC
19
- [x] https://github.com/github/primer/issues/382
20
- - React button refactor
21
- [x] https://github.com/github/primer/issues/468
22
- - Visual bugs (colors, state)
23
- [x] https://github.com/github/primer/discussions/87
24
- - Discussion about accessory buttons
25
- [x] https://github.com/github/primer/discussions/211
26
- - Open ended discussion about primary button as dropdown
27
- [x] https://github.com/github/primer/discussions/459
28
- - Allie's thoughts on limiting icon only buttons and working towards encouraging visual labels
29
- [x] https://github.com/github/primer/discussions/477
30
- - Buttons styled as links, links styled as buttons
31
-
32
- ## Specific notes from previous bugs to keep in mind
33
- [] Check all button variants have shadow present
34
- [] Ensure icon colors are consistent in hover states
35
- [] Ensure icon colors are consistent with variants in all states
36
- [] Ensure disabled colors are consistent across frameworks
37
-
38
- ## Component list
39
- A few discussions were about naming and prop drilling (source here). We found that for Button to handle all of its use cases, we would need a large number of props– some conditional and dependent on one another. When that happens, it's typically a sign that the logic should be separated into another component.
40
-
41
- | Component | Description |
42
- | -- | -- |
43
- | Button | standard `button` with variants, size, visual slots |
44
- | IconButton | `button` with icon only (square) and required `aria-label` |
45
- | ButtonStyledAsLink | `button` that visually looks like a link |
46
- | ReactionButton | `button` snowflake with specific styles/interaction design |
47
- | ButtonGroup | wrapper to handle grouping buttons |
48
- | Link | `a` with variants, optional trailing visuals |
49
- | LinkStyledAsButton | `a` with button variants, required trailing visuals |
50
-
51
- ## Component API breakdown
52
-
53
- ### Button
54
-
55
- | prop | type | options | default | notes |
56
- | -- | -- | -- | -- | -- |
57
- | `variant` | one-of string | `primary` `secondary` `danger` `outline`? | `secondary` | |
58
- | `size` | one-of string | `small` `default` `large` | `default | |
59
- | `label` | string | button description | null | |
60
- | `aria-label` | string | button description for screen readers | null | |
61
- | `aria-pressed` | boolean | `true/false` | `false` | |
62
- | `leadingVisual` | children (slot) | octicon | null | |
63
- | `trailingVisual` | children (slot) | octicon | null | |
64
- | `trailingAction` | children (slot) | octicon | null | slot for caret to maintain leading/trailing visuals if they exist |
65
- | `fullWidth` | boolean | `true/false` | `false` | |
66
- | `visualPosition` | one-of string | `fixed` `some-other-word` | `fixed` | lock icon to the text label or to the button container |
67
-
68
- ## Component design specs
@@ -1,181 +0,0 @@
1
- .Button {
2
- position: relative;
3
- font-size: $body-font-size;
4
- font-weight: $font-weight-semibold;
5
- cursor: pointer;
6
- user-select: none;
7
- border: $border-width $border-style;
8
- border-radius: $border-radius;
9
- color: var(--color-btn-text);
10
- background-color: var(--color-btn-bg);
11
- border-color: var(--color-btn-border);
12
- box-shadow: var(--color-btn-shadow), var(--color-btn-inset-shadow);
13
- transition: 0.2s cubic-bezier(0.3, 0, 0.5, 1);
14
- transition-property: color, background-color, border-color;
15
- height: 32px;
16
- padding: 0 16px;
17
- display: grid;
18
- grid-template-areas: 'leadingIcon text trailingIcon trailingAction';
19
- grid-template-columns: min-content minmax(0, auto) min-content min-content;
20
- align-items: center;
21
-
22
- // column-gap persists with empty grid-areas, margin applies only when children exist
23
- > :not(:last-child) {
24
- margin-right: $spacer-2;
25
- }
26
-
27
- &:hover,
28
- &.hover,
29
- [open] > & {
30
- background-color: var(--color-btn-hover-bg);
31
- border-color: var(--color-btn-hover-border);
32
- transition-duration: 0.1s;
33
- }
34
-
35
- &:active {
36
- background-color: var(--color-btn-active-bg);
37
- border-color: var(--color-btn-active-border);
38
- transition: none;
39
- }
40
-
41
- &.Button--pressed,
42
- &[aria-pressed='true'] {
43
- background-color: var(--color-btn-selected-bg);
44
- box-shadow: var(--color-primer-shadow-inset);
45
- }
46
-
47
- &:disabled,
48
- &.disabled,
49
- &[aria-disabled='true'] {
50
- color: var(--color-primer-fg-disabled);
51
- background-color: var(--color-btn-bg);
52
- border-color: var(--color-btn-border);
53
- fill: var(--color-primer-fg-disabled);
54
- }
55
-
56
- &.Button-small {
57
- height: 28px;
58
- font-size: $font-size-small;
59
- }
60
-
61
- &.Button-large {
62
- }
63
-
64
- &.Button-primary {
65
- color: var(--color-btn-primary-text);
66
- background-color: var(--color-btn-primary-bg);
67
- border-color: var(--color-btn-primary-border);
68
- box-shadow: var(--color-btn-primary-shadow), var(--color-btn-primary-inset-shadow);
69
-
70
- &:hover,
71
- &.hover,
72
- [open] > & {
73
- background-color: var(--color-btn-primary-hover-bg);
74
- border-color: var(--color-btn-primary-hover-border);
75
- }
76
-
77
- &:active,
78
- &.Button--pressed,
79
- &[aria-pressed='true'] {
80
- background-color: var(--color-btn-primary-selected-bg);
81
- box-shadow: var(--color-btn-primary-selected-shadow);
82
- }
83
-
84
- &:disabled,
85
- &.disabled,
86
- &[aria-disabled='true'] {
87
- color: var(--color-btn-primary-disabled-text);
88
- background-color: var(--color-btn-primary-disabled-bg);
89
- border-color: var(--color-btn-primary-disabled-border);
90
- fill: var(--color-btn-primary-disabled-text);
91
- }
92
- }
93
-
94
- &.Button-secondary {
95
- }
96
-
97
- &.Button-outline {
98
- color: var(--color-btn-outline-text);
99
-
100
- &:hover,
101
- [open] > & {
102
- color: var(--color-btn-outline-hover-text);
103
- background-color: var(--color-btn-outline-hover-bg);
104
- border-color: var(--color-btn-outline-hover-border);
105
- box-shadow: var(--color-btn-outline-hover-shadow), var(--color-btn-outline-hover-inset-shadow);
106
- }
107
-
108
- &:active,
109
- &.Button--pressed,
110
- &[aria-pressed='true'] {
111
- color: var(--color-btn-outline-selected-text);
112
- background-color: var(--color-btn-outline-selected-bg);
113
- border-color: var(--color-btn-outline-selected-border);
114
- box-shadow: var(--color-btn-outline-selected-shadow);
115
- }
116
-
117
- &:disabled,
118
- &.disabled,
119
- &[aria-disabled='true'] {
120
- color: var(--color-btn-outline-disabled-text);
121
- background-color: var(--color-btn-outline-disabled-bg);
122
- border-color: var(--color-btn-border);
123
- box-shadow: none;
124
- }
125
- }
126
-
127
- &.Button-danger {
128
- color: var(--color-btn-danger-text);
129
-
130
- .octicon {
131
- color: var(--color-btn-danger-icon);
132
- }
133
-
134
- &:hover,
135
- [open] > & {
136
- color: var(--color-btn-danger-hover-text);
137
- background-color: var(--color-btn-danger-hover-bg);
138
- border-color: var(--color-btn-danger-hover-border);
139
- box-shadow: var(--color-btn-danger-hover-shadow), var(--color-btn-danger-hover-inset-shadow);
140
- }
141
-
142
- &:active,
143
- &.Button--pressed,
144
- &[aria-pressed='true'] {
145
- color: var(--color-btn-danger-selected-text);
146
- background-color: var(--color-btn-danger-selected-bg);
147
- border-color: var(--color-btn-danger-selected-border);
148
- box-shadow: var(--color-btn-danger-selected-shadow);
149
- }
150
-
151
- &:disabled,
152
- &.disabled,
153
- &[aria-disabled='true'] {
154
- color: var(--color-btn-danger-disabled-text);
155
- background-color: var(--color-btn-danger-disabled-bg);
156
- border-color: var(--color-btn-border);
157
- box-shadow: none;
158
- }
159
- }
160
- }
161
-
162
- .Button--label {
163
- grid-area: 'text';
164
- white-space: nowrap;
165
- }
166
-
167
- .Button--visual {
168
- display: flex;
169
- }
170
-
171
- .Button--leadingVisual {
172
- grid-area: 'leadingVisual';
173
- }
174
-
175
- .Button--trailingVisual {
176
- grid-area: 'trailingVisual';
177
- }
178
-
179
- .Button--trailingAction {
180
- grid-area: 'leadingAction';
181
- }
File without changes