@primer/css 18.1.0-rc.f690f20f → 18.2.0-rc.cc99e801

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 (125) hide show
  1. package/CHANGELOG.md +24 -2
  2. package/actionlist/action-list-item-divider.scss +42 -0
  3. package/actionlist/action-list-item.scss +444 -0
  4. package/actionlist/action-list-variables.scss +8 -0
  5. package/actionlist/action-list.scss +33 -0
  6. package/actionlist/index.scss +5 -0
  7. package/alerts/index.scss +2 -2
  8. package/autocomplete/index.scss +3 -3
  9. package/autocomplete/suggester.scss +1 -1
  10. package/avatars/avatar-stack.scss +1 -1
  11. package/avatars/circle-badge.scss +1 -1
  12. package/avatars/index.scss +5 -5
  13. package/base/index.scss +6 -6
  14. package/blankslate/index.scss +2 -2
  15. package/box/index.scss +2 -2
  16. package/branch-name/index.scss +2 -2
  17. package/breadcrumb/index.scss +2 -2
  18. package/buttons/index.scss +4 -4
  19. package/color-modes/index.scss +7 -7
  20. package/color-modes/themes/dark_colorblind.scss +2 -2
  21. package/color-modes/themes/light_colorblind.scss +2 -2
  22. package/core/index.scss +15 -14
  23. package/dist/actionlist.css +2 -0
  24. package/dist/actionlist.css.map +1 -0
  25. package/dist/actionlist.js +1 -0
  26. package/dist/alerts.css.map +1 -1
  27. package/dist/autocomplete.css.map +1 -1
  28. package/dist/avatars.css.map +1 -1
  29. package/dist/base.css.map +1 -1
  30. package/dist/blankslate.css.map +1 -1
  31. package/dist/box.css.map +1 -1
  32. package/dist/branch-name.css.map +1 -1
  33. package/dist/breadcrumb.css.map +1 -1
  34. package/dist/buttons.css.map +1 -1
  35. package/dist/color-modes.css +1 -1
  36. package/dist/color-modes.css.map +1 -1
  37. package/dist/core.css +1 -1
  38. package/dist/core.css.map +1 -1
  39. package/dist/dropdown.css.map +1 -1
  40. package/dist/forms.css +1 -1
  41. package/dist/forms.css.map +1 -1
  42. package/dist/header.css.map +1 -1
  43. package/dist/labels.css +1 -1
  44. package/dist/labels.css.map +1 -1
  45. package/dist/layout.css.map +1 -1
  46. package/dist/links.css.map +1 -1
  47. package/dist/loaders.css.map +1 -1
  48. package/dist/markdown.css.map +1 -1
  49. package/dist/marketing-buttons.css.map +1 -1
  50. package/dist/marketing-type.css.map +1 -1
  51. package/dist/marketing-utilities.css.map +1 -1
  52. package/dist/meta.json +72 -154
  53. package/dist/navigation.css.map +1 -1
  54. package/dist/pagination.css.map +1 -1
  55. package/dist/popover.css.map +1 -1
  56. package/dist/primer.css +3 -3
  57. package/dist/primer.css.map +1 -1
  58. package/dist/product.css +1 -1
  59. package/dist/product.css.map +1 -1
  60. package/dist/progress.css.map +1 -1
  61. package/dist/select-menu.css.map +1 -1
  62. package/dist/stats/actionlist.json +1 -0
  63. package/dist/stats/color-modes.json +1 -1
  64. package/dist/stats/core.json +1 -1
  65. package/dist/stats/forms.json +1 -1
  66. package/dist/stats/labels.json +1 -1
  67. package/dist/stats/primer.json +1 -1
  68. package/dist/stats/product.json +1 -1
  69. package/dist/stats/subhead.json +1 -1
  70. package/dist/subhead.css +1 -1
  71. package/dist/subhead.css.map +1 -1
  72. package/dist/timeline.css.map +1 -1
  73. package/dist/toasts.css.map +1 -1
  74. package/dist/tooltips.css.map +1 -1
  75. package/dist/truncate.css.map +1 -1
  76. package/dist/utilities.css.map +1 -1
  77. package/dropdown/dropdown.scss +4 -4
  78. package/dropdown/index.scss +2 -2
  79. package/forms/form-control.scss +15 -7
  80. package/forms/form-group.scss +2 -2
  81. package/forms/form-select.scss +2 -2
  82. package/forms/form-validation.scss +9 -9
  83. package/forms/index.scss +7 -7
  84. package/header/index.scss +2 -2
  85. package/labels/index.scss +7 -7
  86. package/labels/labels.scss +22 -3
  87. package/layout/grid.scss +1 -1
  88. package/layout/index.scss +6 -6
  89. package/layout/layout.scss +1 -1
  90. package/links/index.scss +2 -2
  91. package/links/link.scss +1 -1
  92. package/loaders/index.scss +2 -2
  93. package/loaders/loaders.scss +1 -1
  94. package/markdown/footnotes.scss +1 -1
  95. package/markdown/index.scss +9 -9
  96. package/markdown/lists.scss +3 -3
  97. package/markdown/markdown-body.scss +4 -4
  98. package/marketing/index.scss +4 -4
  99. package/navigation/index.scss +7 -7
  100. package/navigation/menu.scss +1 -1
  101. package/navigation/sidenav.scss +3 -3
  102. package/package.json +10 -10
  103. package/pagination/index.scss +2 -2
  104. package/pagination/pagination.scss +1 -1
  105. package/popover/index.scss +2 -2
  106. package/popover/popover.scss +1 -1
  107. package/postcss.config.cjs +1 -1
  108. package/product/index.scss +17 -17
  109. package/progress/index.scss +2 -2
  110. package/select-menu/index.scss +2 -2
  111. package/select-menu/select-menu.scss +3 -3
  112. package/stylelint.config.cjs +1 -1
  113. package/subhead/index.scss +2 -2
  114. package/subhead/subhead.scss +6 -0
  115. package/support/index.scss +7 -7
  116. package/support/variables/layout.scss +0 -8
  117. package/table-object/index.scss +1 -1
  118. package/timeline/index.scss +2 -2
  119. package/timeline/timeline-item.scss +1 -1
  120. package/toasts/index.scss +2 -2
  121. package/tooltips/index.scss +2 -2
  122. package/tooltips/tooltips.scss +1 -1
  123. package/truncate/index.scss +2 -2
  124. package/utilities/details.scss +1 -1
  125. package/utilities/index.scss +12 -12
package/CHANGELOG.md CHANGED
@@ -1,16 +1,38 @@
1
1
  # @primer/css
2
2
 
3
+ ## 18.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#1657](https://github.com/primer/css/pull/1657) [`e7543009`](https://github.com/primer/css/commit/e754300989a4e762091a957edd324b26682b104a) Thanks [@langermank](https://github.com/langermank)! - ActionList Component: Primer CSS Implementation. Adding a new component `ActionList` to learn more checkout the docs [https://primer.style/css/components/action-list](https://primer.style/css/components/action-list).
8
+
9
+ ### Patch Changes
10
+
11
+ - [#1731](https://github.com/primer/css/pull/1731) [`832e9988`](https://github.com/primer/css/commit/832e99886df66ea5860d725517aeb9d5f178dd58) Thanks [@jonrohan](https://github.com/jonrohan)! - Updating @primer/primitives@6.1.0
12
+
3
13
  ## 18.1.0
4
14
 
5
15
  ### Minor Changes
6
16
 
7
17
  - [#1694](https://github.com/primer/css/pull/1694) [`b0e1687a`](https://github.com/primer/css/commit/b0e1687a562a194ed178fd2dd35588ff5da40847) Thanks [@simurai](https://github.com/simurai)! - Add more Octicon icon support to components
8
18
 
19
+ * [#1711](https://github.com/primer/css/pull/1711) [`bc3b94d2`](https://github.com/primer/css/commit/bc3b94d26f08f65d3a4938bafa1b988585f35764) Thanks [@simurai](https://github.com/simurai)! - Add new color `Label`s
20
+
9
21
  ### Patch Changes
10
22
 
11
- - [#1693](https://github.com/primer/css/pull/1693) [`c1ca19d4`](https://github.com/primer/css/commit/c1ca19d4f071a9b12172e4a13bdb96c52a200d47) Thanks [@jasonmacgowan](https://github.com/jasonmacgowan)! - Fix light-theme attr reference in theme docs
23
+ - [#1710](https://github.com/primer/css/pull/1710) [`6a058ecb`](https://github.com/primer/css/commit/6a058ecbaf7edac6fce4a0d56b4aca46ac6cd4fa) Thanks [@jonrohan](https://github.com/jonrohan)! - Updating [@primer/primitives@6.0.0](https://github.com/primer/primitives/releases/tag/v6.0.0)
24
+
25
+ * [#1712](https://github.com/primer/css/pull/1712) [`bc502033`](https://github.com/primer/css/commit/bc50203324ba03d4ece7ec6182c185a695626ffb) Thanks [@jonrohan](https://github.com/jonrohan)! - Updating @primer/stylelint-config to 12.1.0
26
+
27
+ - [#1708](https://github.com/primer/css/pull/1708) [`f7c44c35`](https://github.com/primer/css/commit/f7c44c35f8085f2b793581a901ecb22c5174ef6a) Thanks [@langermank](https://github.com/langermank)! - Storybook: add Label stories
28
+
29
+ * [#1690](https://github.com/primer/css/pull/1690) [`af5a3ae8`](https://github.com/primer/css/commit/af5a3ae82668d6d04af8c3465302980dcf062cc4) Thanks [@simurai](https://github.com/simurai)! - Update `Subhead` actions
30
+
31
+ - [#1707](https://github.com/primer/css/pull/1707) [`a997790b`](https://github.com/primer/css/commit/a997790b69f0f3bb5c7a2dfc97c5d5c743bb6a38) Thanks [@maximedegreve](https://github.com/maximedegreve)! - Fix for disabled Safari inputs
32
+
33
+ * [#1693](https://github.com/primer/css/pull/1693) [`c1ca19d4`](https://github.com/primer/css/commit/c1ca19d4f071a9b12172e4a13bdb96c52a200d47) Thanks [@jasonmacgowan](https://github.com/jasonmacgowan)! - Fix light-theme attr reference in theme docs
12
34
 
13
- * [#1689](https://github.com/primer/css/pull/1689) [`257f68f6`](https://github.com/primer/css/commit/257f68f6539539ab809fbdb4351aefa57173e044) Thanks [@adityatheoctocatdev](https://github.com/adityatheoctocatdev)! - Update all Toast variant icons to use `var(--color-fg-on-emphasis)`
35
+ - [#1689](https://github.com/primer/css/pull/1689) [`257f68f6`](https://github.com/primer/css/commit/257f68f6539539ab809fbdb4351aefa57173e044) Thanks [@adityatheoctocatdev](https://github.com/adityatheoctocatdev)! - Update all Toast variant icons to use `var(--color-fg-on-emphasis)`
14
36
 
15
37
  The only visible change is in the `warning` variant, previously using `var(--color-fg-default)`
16
38
 
@@ -0,0 +1,42 @@
1
+ // emtpy divider
2
+
3
+ .ActionList-sectionDivider {
4
+ // has children
5
+ &:not(:empty) {
6
+ display: flex;
7
+ // stylelint-disable-next-line primer/spacing
8
+ padding: ($spacer-1 * 1.5) $spacer-2;
9
+ font-size: $font-size-small;
10
+ font-weight: $font-weight-bold;
11
+ color: var(--color-fg-muted);
12
+ flex-direction: column;
13
+ }
14
+
15
+ // no children
16
+ &:empty {
17
+ height: 1px;
18
+ padding: 0;
19
+ // stylelint-disable-next-line primer/spacing
20
+ margin: ($spacer-2 - 1px) ($spacer-2 * -1) $spacer-2;
21
+ list-style: none;
22
+ background: var(--color-action-list-item-inline-divider);
23
+ border: 0;
24
+ }
25
+ }
26
+
27
+ .ActionList-sectionDivider--filled {
28
+ margin: $spacer-2 ($spacer-2 * -1);
29
+ background: var(--color-canvas-subtle);
30
+ border-top: $border-width $border-style var(--color-action-list-item-inline-divider);
31
+ border-bottom: $border-width $border-style var(--color-action-list-item-inline-divider);
32
+
33
+ // if no children, treat as divider
34
+ &:empty {
35
+ height: $spacer-2;
36
+ box-sizing: border-box;
37
+ }
38
+
39
+ &:first-child {
40
+ margin-top: 0;
41
+ }
42
+ }
@@ -0,0 +1,444 @@
1
+ @mixin focusOutline {
2
+ position: relative;
3
+ z-index: 1;
4
+ outline: none;
5
+ box-shadow: 0 0 0 2px var(--color-accent-fg); // this color breaks convention
6
+ }
7
+
8
+ // <li>
9
+ .ActionList-item {
10
+ position: relative;
11
+ list-style: none;
12
+ background-color: transparent;
13
+ border-radius: $border-radius;
14
+
15
+ &:hover,
16
+ &:active {
17
+ cursor: pointer;
18
+
19
+ // a href
20
+ .ActionList-content {
21
+ text-decoration: none;
22
+ }
23
+ }
24
+
25
+ // only hover li without list as children
26
+ &:not(.ActionList-item--hasSubItem) {
27
+ &:hover {
28
+ cursor: pointer;
29
+ background-color: var(--color-action-list-item-default-hover-bg);
30
+ }
31
+
32
+ &:active {
33
+ background: var(--color-action-list-item-default-active-bg);
34
+
35
+ @media screen and (prefers-reduced-motion: no-preference) {
36
+ animation: ActionList-item-active-bg 4s forwards cubic-bezier(0.33, 1, 0.68, 1);
37
+ }
38
+
39
+ // stylelint-disable primer/box-shadow
40
+ @keyframes ActionList-item-active-bg {
41
+ // stylelint-disable-next-line max-nesting-depth
42
+ 50% {
43
+ box-shadow: inset 0 0 0 rgba(#000, 0.04);
44
+ transform: scale(1);
45
+ }
46
+
47
+ // stylelint-disable-next-line max-nesting-depth
48
+ 100% {
49
+ box-shadow: inset 0 3px 9px rgba(#000, 0.04);
50
+ transform: scale(0.97);
51
+ }
52
+ }
53
+ // stylelint-enable primer/box-shadow
54
+ }
55
+
56
+ &:hover,
57
+ &:active {
58
+ // hide dividers
59
+ // stylelint-disable-next-line selector-max-specificity
60
+ .ActionList-item-label::before,
61
+ + .ActionList-item .ActionList-item-label::before {
62
+ visibility: hidden;
63
+ }
64
+ }
65
+ }
66
+
67
+ // target contents of li if sub-item (li wraps item label + nested ul)
68
+ // collapse styles here
69
+ &.ActionList-item--hasSubItem {
70
+ // first child
71
+ > .ActionList-content {
72
+ &:hover {
73
+ background-color: var(--color-action-list-item-default-hover-bg);
74
+ }
75
+ }
76
+ }
77
+
78
+ // active state [aria-current]
79
+
80
+ &.ActionList-item--navActive:not(.ActionList-item--danger) {
81
+ background: var(--color-action-list-item-default-selected-bg);
82
+
83
+ // stylelint-disable-next-line selector-max-specificity
84
+ &::before,
85
+ + .ActionList-item::before {
86
+ visibility: hidden;
87
+ }
88
+
89
+ // blue accent line
90
+ &::after {
91
+ position: absolute;
92
+ top: calc(50% - 12px);
93
+ left: -$actionList-item-padding-horizontal;
94
+ width: $spacer-1;
95
+ height: $spacer-4;
96
+ content: '';
97
+ background: var(--color-accent-fg);
98
+ border-radius: $border-radius;
99
+ }
100
+ }
101
+
102
+ // collapsible item [aria-expanded]
103
+
104
+ &[aria-expanded='true'] {
105
+ .ActionList-item-collapseIcon {
106
+ transition: transform 120ms linear;
107
+ transform: scaleY(-1);
108
+ }
109
+
110
+ .ActionList--subGroup {
111
+ display: block;
112
+ }
113
+
114
+ &.ActionList-item--hasSubItem {
115
+ // stylelint-disable-next-line selector-max-specificity
116
+ > .ActionList-content > .ActionList-item-label {
117
+ font-weight: $font-weight-bold;
118
+ }
119
+ }
120
+ }
121
+
122
+ &[aria-expanded='false'] {
123
+ .ActionList-item-collapseIcon {
124
+ transition: transform 120ms linear;
125
+ transform: scaleY(1);
126
+ }
127
+
128
+ .ActionList--subGroup {
129
+ display: none;
130
+ }
131
+ }
132
+
133
+ // checkbox item [aria-checked]
134
+ // listbox [aria-selected]
135
+
136
+ &[aria-checked='true'],
137
+ &[aria-selected='true'] {
138
+ // multiselect checkmark
139
+ .ActionList-item-multiSelectCheckmark {
140
+ visibility: visible;
141
+ opacity: 1;
142
+ transition: visibility 0 linear 0, opacity $actionList-item-checkmark-transition-timing;
143
+ }
144
+
145
+ // singleselect checkmark
146
+ .ActionList-item-singleSelectCheckmark {
147
+ visibility: visible;
148
+
149
+ @media screen and (prefers-reduced-motion: no-preference) {
150
+ animation: checkmarkIn 200ms cubic-bezier(0.11, 0, 0.5, 0) forwards;
151
+ }
152
+ }
153
+
154
+ // checkbox
155
+ .ActionList-item-multiSelectIcon {
156
+ .ActionList-item-multiSelectIconRect {
157
+ fill: var(--color-accent-fg);
158
+ stroke: var(--color-accent-fg);
159
+ stroke-width: $border-width;
160
+ }
161
+
162
+ .ActionList-item-multiSelectCheckmark {
163
+ fill: var(--color-fg-on-emphasis);
164
+ }
165
+ }
166
+ }
167
+
168
+ &[aria-checked='false'],
169
+ &[aria-selected='false'] {
170
+ // multiselect checkmark
171
+ .ActionList-item-multiSelectCheckmark {
172
+ visibility: hidden;
173
+ opacity: 0;
174
+ transition:
175
+ visibility 0 linear $actionList-item-checkmark-transition-timing,
176
+ opacity $actionList-item-checkmark-transition-timing;
177
+ }
178
+
179
+ // singleselect checkmark
180
+ .ActionList-item-singleSelectCheckmark {
181
+ visibility: hidden;
182
+ transition: visibility 0s linear 200ms;
183
+ clip-path: inset(16px 0 0 0);
184
+
185
+ @media screen and (prefers-reduced-motion: no-preference) {
186
+ animation: checkmarkOut 200ms cubic-bezier(0.11, 0, 0.5, 0) forwards;
187
+ }
188
+ }
189
+
190
+ // checkbox
191
+ .ActionList-item-multiSelectIcon {
192
+ .ActionList-item-multiSelectIconRect {
193
+ fill: var(--color-canvas-default);
194
+ stroke: var(--color-border-default);
195
+ stroke-width: $border-width;
196
+ }
197
+ }
198
+
199
+ .ActionList-item-multiSelectIconRect {
200
+ fill: var(--color-canvas-default);
201
+ border: $border-width $border-style var(--color-border-default);
202
+ }
203
+ }
204
+
205
+ @keyframes checkmarkIn {
206
+ from {
207
+ clip-path: inset(16px 0 0 0);
208
+ }
209
+
210
+ to {
211
+ clip-path: inset(0 0 0 0);
212
+ }
213
+ }
214
+
215
+ @keyframes checkmarkOut {
216
+ from {
217
+ clip-path: inset(0 0 0 0);
218
+ }
219
+
220
+ to {
221
+ clip-path: inset(16px 0 0 0);
222
+ }
223
+ }
224
+
225
+ // variants
226
+
227
+ // danger
228
+ &.ActionList-item--danger {
229
+ .ActionList-item-label {
230
+ color: var(--color-danger-fg);
231
+ }
232
+
233
+ .ActionList-item-visual {
234
+ color: var(--color-danger-fg);
235
+ }
236
+
237
+ @media (hover: hover) and (pointer: fine) {
238
+ &:hover {
239
+ background: var(--color-action-list-item-danger-hover-bg);
240
+
241
+ // stylelint-disable-next-line max-nesting-depth
242
+ .ActionList-item-label {
243
+ color: var(--color-action-list-item-danger-hover-text);
244
+ }
245
+ }
246
+ }
247
+
248
+ &:active {
249
+ background: var(--color-action-list-item-danger-active-bg);
250
+ }
251
+ }
252
+
253
+ // disabled
254
+ &[aria-disabled='true'] {
255
+ .ActionList-item-label,
256
+ .ActionList-item-description {
257
+ color: var(--color-primer-fg-disabled);
258
+ }
259
+
260
+ .ActionList-item-visual {
261
+ fill: var(--color-primer-fg-disabled);
262
+ }
263
+
264
+ @media (hover: hover) and (pointer: fine) {
265
+ &:hover {
266
+ cursor: not-allowed;
267
+ background-color: transparent;
268
+ }
269
+ }
270
+ }
271
+
272
+ // if nested list exists, remove default padding
273
+ .ActionList {
274
+ // stylelint-disable-next-line primer/spacing
275
+ padding: unset;
276
+ }
277
+ }
278
+
279
+ // span or a href
280
+ .ActionList-content {
281
+ position: relative;
282
+ display: grid;
283
+ // stylelint-disable-next-line primer/spacing
284
+ padding: $actionList-item-padding-vertical $actionList-item-padding-horizontal;
285
+ font-weight: $font-weight-normal;
286
+ color: var(--color-fg-default);
287
+ user-select: none;
288
+ border-radius: $border-radius;
289
+ transition: $actionList-item-bg-transition;
290
+ grid-template-rows: min-content;
291
+ grid-template-areas: 'leadingAction leadingVisual label trailingVisual trailingAction';
292
+ grid-template-columns: min-content min-content minmax(min-content, auto) min-content min-content;
293
+ align-items: center;
294
+
295
+ // column-gap persists with empty grid-areas, margin applies only when children exist
296
+ > :not(:last-child) {
297
+ margin-right: $spacer-2;
298
+ }
299
+
300
+ &:focus-visible {
301
+ @include focusOutline;
302
+ }
303
+
304
+ // sizes
305
+
306
+ &.ActionList-content--sizeMedium {
307
+ // 44px total height
308
+ // stylelint-disable-next-line primer/spacing
309
+ padding: $actionList-item-padding-vertical-md $actionList-item-padding-horizontal;
310
+ }
311
+
312
+ &.ActionList-content--sizeLarge {
313
+ // 48px total height
314
+ // stylelint-disable-next-line primer/spacing
315
+ padding: $actionList-item-padding-vertical-lg $actionList-item-padding-horizontal;
316
+ }
317
+
318
+ // On pointer:coarse (mobile), all list items are large
319
+ @media (pointer: coarse) {
320
+ // stylelint-disable-next-line primer/spacing
321
+ padding: $actionList-item-padding-vertical-lg $actionList-item-padding-horizontal;
322
+ }
323
+
324
+ &.ActionList-content--blockDescription {
325
+ // if leading/trailing visual, align with first line of content
326
+ .ActionList-item-visual {
327
+ place-self: start;
328
+ }
329
+ }
330
+ }
331
+
332
+ // place children on grid
333
+
334
+ .ActionList-item-action--leading {
335
+ grid-area: leadingAction;
336
+ }
337
+
338
+ .ActionList-item-visual--leading {
339
+ grid-area: leadingVisual;
340
+ }
341
+
342
+ .ActionList-item-label {
343
+ grid-area: label;
344
+ }
345
+
346
+ .ActionList-item-visual--trailing {
347
+ grid-area: trailingVisual;
348
+ }
349
+
350
+ .ActionList-item-action--trailing {
351
+ grid-area: trailingAction;
352
+ }
353
+
354
+ // wrapper span
355
+ // default block
356
+ .ActionList-item-descriptionWrap {
357
+ grid-area: label;
358
+ display: flex;
359
+ flex-direction: column;
360
+
361
+ .ActionList-item-description {
362
+ margin-top: $spacer-1;
363
+ }
364
+
365
+ .ActionList-item-label {
366
+ font-weight: $font-weight-bold;
367
+ }
368
+ }
369
+
370
+ // inline
371
+ .ActionList-item-descriptionWrap--inline {
372
+ flex-direction: row;
373
+ align-items: baseline;
374
+
375
+ .ActionList-item-description {
376
+ // stylelint-disable-next-line primer/spacing
377
+ margin-left: $actionList-item-padding-horizontal;
378
+ }
379
+ }
380
+
381
+ // description
382
+ .ActionList-item-description {
383
+ font-size: $font-size-small;
384
+ font-weight: $font-weight-normal;
385
+ line-height: $lh-default;
386
+ color: var(--color-fg-muted);
387
+ }
388
+
389
+ // helper for grid alignment with multi-line content
390
+ // span wrapping svg or text
391
+ .ActionList-item-visual,
392
+ .ActionList-item-action {
393
+ display: flex;
394
+ min-height: $actionList-item-height-sm;
395
+ color: var(--color-fg-muted); // if visual is text
396
+ fill: var(--color-fg-muted);
397
+ align-items: center;
398
+ }
399
+
400
+ // text
401
+ // stylelint-disable-next-line no-duplicate-selectors
402
+ .ActionList-item-label {
403
+ position: relative; // for pseudo dividers
404
+ font-weight: $font-weight-normal;
405
+ // we need a strict value here for grid alignment
406
+ // stylelint-disable-next-line primer/typography
407
+ line-height: $actionList-item-label-line-height;
408
+ color: var(--color-fg-default);
409
+ }
410
+
411
+ // nested lists (only supports 1 level currently)
412
+ // target ActionList-item--subItem for padding-left to maintain :active :after state
413
+
414
+ .ActionList-item--subItem > .ActionList-content {
415
+ font-size: $font-size-small;
416
+ }
417
+
418
+ // no leading visual
419
+ .ActionList--subGroup {
420
+ .ActionList-item--subItem {
421
+ padding-left: $spacer-3;
422
+ }
423
+ }
424
+
425
+ // has 16px leading visual
426
+ .ActionList-content--visual16 + .ActionList--subGroup {
427
+ .ActionList-item--subItem {
428
+ padding-left: $spacer-4;
429
+ }
430
+ }
431
+
432
+ // has 20px leading visual
433
+ .ActionList-content--visual20 + .ActionList--subGroup {
434
+ .ActionList-item--subItem {
435
+ padding-left: $spacer-3 * 1.75;
436
+ }
437
+ }
438
+
439
+ // has 24px leading visual
440
+ .ActionList-content--visual24 + .ActionList--subGroup {
441
+ .ActionList-item--subItem {
442
+ padding-left: $spacer-5;
443
+ }
444
+ }
@@ -0,0 +1,8 @@
1
+ $actionList-item-height-sm: $spacer-2 * 2.5 !default;
2
+ $actionList-item-label-line-height: $spacer-2 * 2.5 !default;
3
+ $actionList-item-padding-vertical-md: $spacer-2 * 1.25 !default;
4
+ $actionList-item-padding-vertical-lg: $spacer-2 * 1.75 !default;
5
+ $actionList-item-padding-vertical: $spacer-1 * 1.5 !default;
6
+ $actionList-item-padding-horizontal: $spacer-2 !default;
7
+ $actionList-item-bg-transition: background 33.333ms linear !default; // 2 frames on a 60hz monitor
8
+ $actionList-item-checkmark-transition-timing: 50ms !default;
@@ -0,0 +1,33 @@
1
+ // <ul>
2
+ .ActionList {
3
+ padding: $spacer-2;
4
+ }
5
+
6
+ // dividers
7
+
8
+ .ActionList--divided {
9
+ .ActionList-item-label::before {
10
+ position: absolute;
11
+ top: -$actionList-item-padding-vertical;
12
+ display: block;
13
+ width: 100%;
14
+ height: 1px;
15
+ content: '';
16
+ background: var(--color-action-list-item-inline-divider);
17
+ }
18
+
19
+ // hide divider if item is active
20
+ .ActionList-item--navActive {
21
+ // stylelint-disable-next-line selector-max-specificity, selector-max-compound-selectors
22
+ .ActionList-item-label::before,
23
+ + .ActionList-item .ActionList-item-label::before {
24
+ visibility: hidden;
25
+ }
26
+ }
27
+ }
28
+
29
+ // hide if item is first of type with label::before, or is the first item after a sectionDivider
30
+ .ActionList-item:first-of-type .ActionList-item-label::before,
31
+ .ActionList-sectionDivider + .ActionList-item .ActionList-item-label::before {
32
+ visibility: hidden;
33
+ }
@@ -0,0 +1,5 @@
1
+ @import '../support/index.scss';
2
+ @import './action-list-variables.scss';
3
+ @import './action-list.scss';
4
+ @import './action-list-item.scss';
5
+ @import './action-list-item-divider.scss';
package/alerts/index.scss CHANGED
@@ -1,3 +1,3 @@
1
1
  // support files
2
- @import "../support/index.scss";
3
- @import "./flash.scss";
2
+ @import '../support/index.scss';
3
+ @import './flash.scss';
@@ -1,4 +1,4 @@
1
1
  // support files
2
- @import "../support/index.scss";
3
- @import "./autocomplete.scss";
4
- @import "./suggester.scss";
2
+ @import '../support/index.scss';
3
+ @import './autocomplete.scss';
4
+ @import './suggester.scss';
@@ -52,7 +52,7 @@
52
52
  }
53
53
  }
54
54
 
55
- &[aria-selected="true"],
55
+ &[aria-selected='true'],
56
56
  &.navigation-focus {
57
57
  color: var(--color-fg-on-emphasis);
58
58
  text-decoration: none;
@@ -89,7 +89,7 @@
89
89
  position: absolute;
90
90
  display: block;
91
91
  height: 20px;
92
- content: "";
92
+ content: '';
93
93
  // stylelint-disable-next-line primer/borders
94
94
  border-radius: 2px;
95
95
  outline: $border-width $border-style var(--color-canvas-default);
@@ -44,7 +44,7 @@
44
44
  top: 50%;
45
45
  left: 0;
46
46
  width: 100%;
47
- content: "";
47
+ content: '';
48
48
  // stylelint-disable-next-line primer/borders
49
49
  border-bottom: 2px dashed var(--color-border-default);
50
50
  }
@@ -1,7 +1,7 @@
1
- @import "../support/index.scss";
1
+ @import '../support/index.scss';
2
2
 
3
3
  // Avatars
4
- @import "./avatar.scss";
5
- @import "./avatar-parent-child.scss";
6
- @import "./avatar-stack.scss";
7
- @import "./circle-badge.scss";
4
+ @import './avatar.scss';
5
+ @import './avatar-parent-child.scss';
6
+ @import './avatar-stack.scss';
7
+ @import './circle-badge.scss';
package/base/index.scss CHANGED
@@ -1,7 +1,7 @@
1
- @import "../support/index.scss";
1
+ @import '../support/index.scss';
2
2
 
3
- @import "./normalize.scss";
4
- @import "./base.scss";
5
- @import "./kbd.scss";
6
- @import "./typography-base.scss";
7
- @import "./octicons.scss";
3
+ @import './normalize.scss';
4
+ @import './base.scss';
5
+ @import './kbd.scss';
6
+ @import './typography-base.scss';
7
+ @import './octicons.scss';
@@ -1,3 +1,3 @@
1
- @import "../support/index.scss";
1
+ @import '../support/index.scss';
2
2
 
3
- @import "./blankslate.scss";
3
+ @import './blankslate.scss';
package/box/index.scss CHANGED
@@ -1,2 +1,2 @@
1
- @import "../support/index.scss";
2
- @import "./box.scss";
1
+ @import '../support/index.scss';
2
+ @import './box.scss';
@@ -1,3 +1,3 @@
1
1
  // support files
2
- @import "../support/index.scss";
3
- @import "./branch-name.scss";
2
+ @import '../support/index.scss';
3
+ @import './branch-name.scss';
@@ -1,3 +1,3 @@
1
1
  // support files
2
- @import "../support/index.scss";
3
- @import "./breadcrumb.scss";
2
+ @import '../support/index.scss';
3
+ @import './breadcrumb.scss';