@primer/css 0.0.0-20220302084732 → 0.0.0-20220303052502

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 (114) hide show
  1. package/CHANGELOG.md +3 -57
  2. package/README.md +2 -2
  3. package/actionlist/action-list-item-divider.scss +1 -7
  4. package/actionlist/action-list-item.scss +121 -135
  5. package/actionlist/action-list-tree.scss +5 -100
  6. package/actionlist/action-list.scss +0 -29
  7. package/alerts/flash.scss +30 -1
  8. package/base/kbd.scss +1 -0
  9. package/base/normalize.scss +1 -1
  10. package/base/typography-base.scss +2 -3
  11. package/blankslate/blankslate.scss +1 -20
  12. package/box/box.scss +3 -0
  13. package/buttons/button.scss +0 -1
  14. package/color-modes/native.scss +0 -11
  15. package/dist/actionlist.css +1 -1
  16. package/dist/actionlist.css.map +1 -1
  17. package/dist/alerts.css +1 -1
  18. package/dist/alerts.css.map +1 -1
  19. package/dist/autocomplete.css.map +1 -1
  20. package/dist/avatars.css.map +1 -1
  21. package/dist/base.css +1 -1
  22. package/dist/base.css.map +1 -1
  23. package/dist/blankslate.css +1 -1
  24. package/dist/blankslate.css.map +1 -1
  25. package/dist/box.css.map +1 -1
  26. package/dist/branch-name.css.map +1 -1
  27. package/dist/breadcrumb.css.map +1 -1
  28. package/dist/buttons.css.map +1 -1
  29. package/dist/color-modes.css +1 -1
  30. package/dist/color-modes.css.map +1 -1
  31. package/dist/core.css +1 -1
  32. package/dist/core.css.map +1 -1
  33. package/dist/dropdown.css.map +1 -1
  34. package/dist/forms.css +1 -1
  35. package/dist/forms.css.map +1 -1
  36. package/dist/header.css +1 -1
  37. package/dist/header.css.map +1 -1
  38. package/dist/labels.css +1 -1
  39. package/dist/labels.css.map +1 -1
  40. package/dist/layout.css +1 -1
  41. package/dist/layout.css.map +1 -1
  42. package/dist/links.css.map +1 -1
  43. package/dist/loaders.css.map +1 -1
  44. package/dist/markdown.css +1 -1
  45. package/dist/markdown.css.map +1 -1
  46. package/dist/marketing-buttons.css.map +1 -1
  47. package/dist/marketing-links.css.map +1 -1
  48. package/dist/marketing-type.css.map +1 -1
  49. package/dist/marketing-utilities.css.map +1 -1
  50. package/dist/meta.json +93 -93
  51. package/dist/navigation.css.map +1 -1
  52. package/dist/pagination.css +1 -1
  53. package/dist/pagination.css.map +1 -1
  54. package/dist/popover.css.map +1 -1
  55. package/dist/primer.css +3 -3
  56. package/dist/primer.css.map +1 -1
  57. package/dist/product.css +1 -1
  58. package/dist/product.css.map +1 -1
  59. package/dist/progress.css.map +1 -1
  60. package/dist/select-menu.css.map +1 -1
  61. package/dist/stats/actionlist.json +1 -1
  62. package/dist/stats/alerts.json +1 -1
  63. package/dist/stats/base.json +1 -1
  64. package/dist/stats/blankslate.json +1 -1
  65. package/dist/stats/color-modes.json +1 -1
  66. package/dist/stats/core.json +1 -1
  67. package/dist/stats/forms.json +1 -1
  68. package/dist/stats/header.json +1 -1
  69. package/dist/stats/labels.json +1 -1
  70. package/dist/stats/layout.json +1 -1
  71. package/dist/stats/markdown.json +1 -1
  72. package/dist/stats/pagination.json +1 -1
  73. package/dist/stats/primer.json +1 -1
  74. package/dist/stats/product.json +1 -1
  75. package/dist/stats/subhead.json +1 -1
  76. package/dist/stats/utilities.json +1 -1
  77. package/dist/subhead.css +1 -1
  78. package/dist/subhead.css.map +1 -1
  79. package/dist/table-object.css.map +1 -1
  80. package/dist/timeline.css.map +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/dist/variables.json +7 -7
  87. package/forms/form-control.scss +0 -1
  88. package/forms/form-group.scss +0 -2
  89. package/header/header.scss +28 -0
  90. package/labels/labels.scss +0 -10
  91. package/labels/mixins.scss +2 -6
  92. package/labels/states.scss +2 -2
  93. package/layout/application-frame.scss +75 -0
  94. package/layout/grid-offset.scss +0 -1
  95. package/layout/grid.scss +0 -1
  96. package/layout/index.scss +1 -0
  97. package/layout/page-layout.scss +2 -3
  98. package/markdown/code.scss +0 -5
  99. package/markdown/footnotes.scss +26 -38
  100. package/markdown/headings.scss +0 -17
  101. package/markdown/markdown-body.scss +8 -0
  102. package/marketing/type/typography.scss +0 -3
  103. package/marketing/utilities/layout.scss +0 -1
  104. package/package.json +16 -19
  105. package/pagination/pagination.scss +1 -38
  106. package/popover/popover.scss +1 -0
  107. package/subhead/subhead.scss +0 -3
  108. package/support/mixins/misc.scss +0 -1
  109. package/table-object/README.md +25 -0
  110. package/table-object/table-object.scss +0 -3
  111. package/timeline/timeline-item.scss +1 -0
  112. package/utilities/colors.scss +0 -14
  113. package/utilities/margin.scss +1 -4
  114. package/utilities/padding.scss +1 -3
package/CHANGELOG.md CHANGED
@@ -1,66 +1,12 @@
1
1
  # @primer/css
2
2
 
3
- ## 0.0.0-20220302084732
4
-
5
- ### Minor Changes
6
-
7
- - [#1948](https://github.com/primer/css/pull/1948) [`2f897845`](https://github.com/primer/css/commit/2f89784559e4c0ec323dfef20930dcb4dbab3320) Thanks [@simurai](https://github.com/simurai)! - Add `open` and `closed` color roles
8
-
9
- * [#1961](https://github.com/primer/css/pull/1961) [`a35a8bdc`](https://github.com/primer/css/commit/a35a8bdcc17906848fcb486842d2345db0441c7c) Thanks [@jonrohan](https://github.com/jonrohan)! - Default .PageLayout to display block
10
-
11
- ### Patch Changes
12
-
13
- - [#1954](https://github.com/primer/css/pull/1954) [`30f29d38`](https://github.com/primer/css/commit/30f29d383256a7d4023a859fdeee44471307159d) Thanks [@simurai](https://github.com/simurai)! - Fix `input-block` in `form-group`
14
-
15
- * [#1956](https://github.com/primer/css/pull/1956) [`39063461`](https://github.com/primer/css/commit/3906346182ed983d9725fd95da41b21424378b3e) Thanks [@jonrohan](https://github.com/jonrohan)! - Upgrading @primer/stylelint-config@12.3.2
16
-
17
- - [#1931](https://github.com/primer/css/pull/1931) [`e5c5312e`](https://github.com/primer/css/commit/e5c5312ec8bf139f6c94d2f70ceecd4b3cd9fd82) Thanks [@vdepizzol](https://github.com/vdepizzol)! - Page layout api updates renaming spacing options in storybook
18
-
19
- * Fake entry to force publishing
20
-
21
- - [#1950](https://github.com/primer/css/pull/1950) [`7c85c500`](https://github.com/primer/css/commit/7c85c500569fe6e1b29665c2eed37d58625ab06f) Thanks [@hectahertz](https://github.com/hectahertz)! - Fix sequence of content in Subhead
22
-
23
- * [#1942](https://github.com/primer/css/pull/1942) [`0450ccbb`](https://github.com/primer/css/commit/0450ccbb86104564c7d4038eb68989f370014fa1) Thanks [@reeceatkinson](https://github.com/reeceatkinson)! - Added line break to docs
24
-
25
- - [#1953](https://github.com/primer/css/pull/1953) [`3a91a29a`](https://github.com/primer/css/commit/3a91a29a822a28ea9679fbbb90250fc039057f23) Thanks [@hectahertz](https://github.com/hectahertz)! - Use `<h2>` instead of `<div>` on Subhead-heading docs
26
-
27
- * [#1949](https://github.com/primer/css/pull/1949) [`dab83198`](https://github.com/primer/css/commit/dab83198c3bf1c7e03826b8cd498b8c48c9a2869) Thanks [@heiskr](https://github.com/heiskr)! - Render headings inline when in a `<summary>`
28
-
29
- ## 19.4.0
30
-
31
- ### Minor Changes
32
-
33
- - [#1937](https://github.com/primer/css/pull/1937) [`67f08009`](https://github.com/primer/css/commit/67f08009ef458088b9fda6267ab25ad6d0a514aa) Thanks [@langermank](https://github.com/langermank)! - TreeView single item nesting
34
-
35
- * [#1905](https://github.com/primer/css/pull/1905) [`50221a54`](https://github.com/primer/css/commit/50221a5486d28c54dc1f578b459addd867bd01d3) Thanks [@langermank](https://github.com/langermank)! - Refactors NavigationList to better handle accessibility. Backwards compatible for TreeView CSS.
36
-
37
- - [#1936](https://github.com/primer/css/pull/1936) [`c53ecdff`](https://github.com/primer/css/commit/c53ecdff5442cf4ac5da0d1e2ba45871ab662855) Thanks [@khiga8](https://github.com/khiga8)! - Deprecating `.tooltipped` CSS classes
38
-
39
- ### Patch Changes
40
-
41
- - [#1928](https://github.com/primer/css/pull/1928) [`0fb67895`](https://github.com/primer/css/commit/0fb6789555652860cfa5178b60433eb2c3d2575c) Thanks [@simurai](https://github.com/simurai)! - Fix `<sup><a>` from getting wrapped with `[ ]`
42
-
43
- ## 19.3.0
44
-
45
- ### Minor Changes
46
-
47
- - [#1876](https://github.com/primer/css/pull/1876) [`bcf447ab`](https://github.com/primer/css/commit/bcf447ab226e6043dd47c1fcc395ba104af866d4) Thanks [@vdepizzol](https://github.com/vdepizzol)! - Add mono font stack to <samp> tag
48
-
49
- * [#1919](https://github.com/primer/css/pull/1919) [`21085f5c`](https://github.com/primer/css/commit/21085f5c6cc538b5014a47de76642554a4291cc6) Thanks [@hectahertz](https://github.com/hectahertz)! - Add blankslate classes to replace utilities
3
+ ## 0.0.0-20220303052502
50
4
 
51
5
  ### Patch Changes
52
6
 
53
- - [#1892](https://github.com/primer/css/pull/1892) [`55bd498b`](https://github.com/primer/css/commit/55bd498b7357e86659ac574f0f745f7b420fb6d3) Thanks [@langermank](https://github.com/langermank)! - Patch: Fix ActionList--divided for label with inline description scenarios
54
-
55
- * [#1906](https://github.com/primer/css/pull/1906) [`f02d9a3e`](https://github.com/primer/css/commit/f02d9a3e4e86c2659a9f507995bcb90c5226e34e) Thanks [@jonrohan](https://github.com/jonrohan)! - Upgrading @primer/stylelint-config@12.3.0 and fixing violations
56
-
57
- - [#1908](https://github.com/primer/css/pull/1908) [`84581e96`](https://github.com/primer/css/commit/84581e96aee50ff3883907dfe1069701edd1c24a) Thanks [@simurai](https://github.com/simurai)! - Reduce size of `Label--inline`
58
-
59
- * [#1890](https://github.com/primer/css/pull/1890) [`74d0438b`](https://github.com/primer/css/commit/74d0438bd4dbaed447b553c5d3c8b945da282836) Thanks [@andrialexandrou](https://github.com/andrialexandrou)! - Adds --color-accent-emphasis and --color-fg-on-emphasis rules for Windows High Contrast Mode
60
-
61
- - [#1882](https://github.com/primer/css/pull/1882) [`4a06aba1`](https://github.com/primer/css/commit/4a06aba1d3f80bcc228ff4360d0e02d5ace158ff) Thanks [@tqwewe](https://github.com/tqwewe)! - Fix layout gutter none styles
7
+ - Fake entry to force publishing
62
8
 
63
- * [#1894](https://github.com/primer/css/pull/1894) [`d1adf595`](https://github.com/primer/css/commit/d1adf595308afb97f83c5ca172222944189a5961) Thanks [@simurai](https://github.com/simurai)! - Make `pagination` responsive by default
9
+ * [#1882](https://github.com/primer/css/pull/1882) [`4a06aba1`](https://github.com/primer/css/commit/4a06aba1d3f80bcc228ff4360d0e02d5ace158ff) Thanks [@tqwewe](https://github.com/tqwewe)! - Fix layout gutter none styles
64
10
 
65
11
  ## 19.2.0
66
12
 
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <p align="center">
2
- <img width="300px" alt="" src="./docs/src/readme.png">
2
+ <img width="300px" src="./docs/src/readme.png">
3
3
  </p>
4
4
 
5
5
  <h1 align="center">Primer CSS</h1>
@@ -14,7 +14,7 @@
14
14
  <img alt="" src="https://github.com/primer/css/actions/workflows/ci.yml/badge.svg">
15
15
  </a>
16
16
  <a aria-label="contributors graph" href="https://github.com/primer/css/graphs/contributors">
17
- <img alt="" src="https://img.shields.io/github/contributors/primer/css.svg">
17
+ <img src="https://img.shields.io/github/contributors/primer/css.svg">
18
18
  </a>
19
19
  <a aria-label="last commit" href="https://github.com/primer/css/commits/main">
20
20
  <img alt="" src="https://img.shields.io/github/last-commit/primer/css.svg">
@@ -4,6 +4,7 @@
4
4
  // has children
5
5
  &:not(:empty) {
6
6
  display: flex;
7
+ // stylelint-disable-next-line primer/spacing
7
8
  padding: ($spacer-1 * 1.5) $spacer-2;
8
9
  font-size: $font-size-small;
9
10
  font-weight: $font-weight-bold;
@@ -13,7 +14,6 @@
13
14
 
14
15
  // no children
15
16
  &:empty {
16
- display: block;
17
17
  height: 1px;
18
18
  padding: 0;
19
19
  // stylelint-disable-next-line primer/spacing
@@ -22,12 +22,6 @@
22
22
  background: var(--color-action-list-item-inline-divider);
23
23
  border: 0;
24
24
  }
25
-
26
- .ActionList-sectionDivider-title {
27
- font-size: $font-size-small;
28
- font-weight: $font-weight-bold;
29
- color: var(--color-fg-muted);
30
- }
31
25
  }
32
26
 
33
27
  .ActionList-sectionDivider--filled {
@@ -24,10 +24,17 @@
24
24
  list-style: none;
25
25
  background-color: transparent;
26
26
  border-radius: $border-radius;
27
+ touch-action: manipulation;
28
+ -webkit-tap-highlight-color: transparent;
27
29
 
28
30
  &:hover,
29
31
  &:active {
30
32
  cursor: pointer;
33
+
34
+ // a href
35
+ .ActionList-content {
36
+ text-decoration: none;
37
+ }
31
38
  }
32
39
 
33
40
  // only hover li without list as children
@@ -85,11 +92,6 @@
85
92
  + .ActionList-item .ActionList-item-label::before {
86
93
  visibility: hidden;
87
94
  }
88
-
89
- .ActionList-item-descriptionWrap--inline::before,
90
- + .ActionList-item .ActionList-item-descriptionWrap--inline::before {
91
- visibility: hidden;
92
- }
93
95
  }
94
96
  }
95
97
  // stylelint-disable-next-line no-duplicate-selectors
@@ -150,6 +152,98 @@
150
152
  }
151
153
  }
152
154
 
155
+ // collapsible item [aria-expanded]
156
+
157
+ // nesting (single level)
158
+ // target items inside expanded subgroups
159
+ &[aria-expanded] {
160
+ .ActionList--subGroup {
161
+ @media screen and (prefers-reduced-motion: no-preference) {
162
+ transition: opacity 160ms cubic-bezier(0.25, 1, 0.5, 1), transform 160ms cubic-bezier(0.25, 1, 0.5, 1);
163
+ }
164
+
165
+ .ActionList-content {
166
+ padding-left: $spacer-4;
167
+ }
168
+ }
169
+
170
+ // has 16px leading visual
171
+ .ActionList-content--visual16 + .ActionList--subGroup {
172
+ .ActionList-content {
173
+ padding-left: $spacer-5;
174
+ }
175
+ }
176
+
177
+ // has 20px leading visual
178
+ .ActionList-content--visual20 + .ActionList--subGroup {
179
+ .ActionList-content {
180
+ padding-left: $spacer-2 * 4.5; // 36px
181
+ }
182
+ }
183
+
184
+ // has 24px leading visual
185
+ .ActionList-content--visual24 + .ActionList--subGroup {
186
+ .ActionList-content {
187
+ padding-left: $spacer-6;
188
+ }
189
+ }
190
+ }
191
+
192
+ &[aria-expanded='true'] {
193
+ .ActionList-item-collapseIcon {
194
+ transition: transform 120ms linear;
195
+ transform: scaleY(-1);
196
+ }
197
+
198
+ .ActionList--subGroup {
199
+ height: auto;
200
+ overflow: visible;
201
+ visibility: visible;
202
+ opacity: 1;
203
+ transform: translateY(0);
204
+ }
205
+
206
+ &.ActionList-item--hasActiveSubItem {
207
+ > .ActionList-content > .ActionList-item-label {
208
+ font-weight: $font-weight-bold;
209
+ }
210
+ }
211
+ }
212
+
213
+ &[aria-expanded='false'] {
214
+ .ActionList-item-collapseIcon {
215
+ transition: transform 120ms linear;
216
+ transform: scaleY(1);
217
+ }
218
+
219
+ .ActionList--subGroup {
220
+ height: 0;
221
+ overflow: hidden;
222
+ visibility: hidden;
223
+ opacity: 0;
224
+ transform: translateY(-$spacer-3);
225
+ }
226
+
227
+ // show active indicator on parent collapse if child is active
228
+ &.ActionList-item--hasActiveSubItem {
229
+ background: var(--color-action-list-item-default-selected-bg);
230
+
231
+ .ActionList-item-label {
232
+ font-weight: $font-weight-bold;
233
+ }
234
+
235
+ &::before,
236
+ + .ActionList-item::before {
237
+ visibility: hidden;
238
+ }
239
+
240
+ // blue accent line
241
+ &::after {
242
+ @include activeIndicatorLine;
243
+ }
244
+ }
245
+ }
246
+
153
247
  // checkbox item [aria-checked]
154
248
  // listbox [aria-selected]
155
249
 
@@ -264,9 +358,26 @@
264
358
  }
265
359
  }
266
360
 
267
- .ActionList-content {
268
- &:active {
269
- background: var(--color-action-list-item-danger-active-bg);
361
+ &:active {
362
+ background: var(--color-action-list-item-danger-active-bg);
363
+ }
364
+ }
365
+
366
+ // disabled
367
+ &[aria-disabled='true'] {
368
+ .ActionList-item-label,
369
+ .ActionList-item-description {
370
+ color: var(--color-primer-fg-disabled);
371
+ }
372
+
373
+ .ActionList-item-visual {
374
+ fill: var(--color-primer-fg-disabled);
375
+ }
376
+
377
+ @media (hover: hover) {
378
+ &:hover {
379
+ cursor: not-allowed;
380
+ background-color: transparent;
270
381
  }
271
382
  }
272
383
  }
@@ -278,26 +389,19 @@
278
389
  }
279
390
  }
280
391
 
281
- // button or a href
392
+ // span or a href
282
393
  .ActionList-content {
283
394
  position: relative;
284
395
  display: grid;
285
- width: 100%;
286
396
  // stylelint-disable-next-line primer/spacing
287
397
  padding: $actionList-item-padding-vertical $actionList-item-padding-horizontal;
288
398
  font-size: $body-font-size;
289
399
  font-weight: $font-weight-normal;
290
400
  color: var(--color-fg-default);
291
- text-align: left;
292
401
  user-select: none;
293
- background-color: transparent;
294
- // stylelint-disable-next-line declaration-property-value-disallowed-list
295
- border: none;
402
+ touch-action: manipulation;
296
403
  border-radius: $border-radius;
297
404
  transition: $actionList-item-bg-transition;
298
- touch-action: manipulation;
299
- touch-action: manipulation;
300
- -webkit-tap-highlight-color: transparent;
301
405
  grid-template-rows: min-content;
302
406
  grid-template-areas: 'leadingAction leadingVisual label trailingVisual trailingAction';
303
407
  grid-template-columns: min-content min-content minmax(0, auto) min-content min-content;
@@ -308,127 +412,10 @@
308
412
  margin-right: $spacer-2;
309
413
  }
310
414
 
311
- // state
312
-
313
- &:hover {
314
- text-decoration: none;
315
- }
316
-
317
415
  &:focus-visible {
318
416
  @include focusOutline;
319
417
  }
320
418
 
321
- // disabled
322
- &[aria-disabled='true'] {
323
- .ActionList-item-label,
324
- .ActionList-item-description {
325
- color: var(--color-primer-fg-disabled);
326
- }
327
-
328
- .ActionList-item-visual {
329
- fill: var(--color-primer-fg-disabled);
330
- }
331
-
332
- @media (hover: hover) {
333
- &:hover {
334
- cursor: not-allowed;
335
- background-color: transparent;
336
- }
337
- }
338
- }
339
-
340
- // collapsible item [aria-expanded]
341
-
342
- // nesting (single level)
343
- // target items inside expanded subgroups
344
- &[aria-expanded] {
345
- + .ActionList--subGroup {
346
- @media screen and (prefers-reduced-motion: no-preference) {
347
- transition: opacity 160ms cubic-bezier(0.25, 1, 0.5, 1), transform 160ms cubic-bezier(0.25, 1, 0.5, 1);
348
- }
349
-
350
- .ActionList-content {
351
- padding-left: $spacer-4;
352
- }
353
- }
354
-
355
- // has 16px leading visual
356
- &.ActionList-content--visual16 + .ActionList--subGroup {
357
- .ActionList-content {
358
- padding-left: $spacer-5;
359
- }
360
- }
361
-
362
- // has 20px leading visual
363
- &.ActionList-content--visual20 + .ActionList--subGroup {
364
- .ActionList-content {
365
- padding-left: $spacer-2 * 4.5; // 36px
366
- }
367
- }
368
-
369
- // has 24px leading visual
370
- &.ActionList-content--visual24 + .ActionList--subGroup {
371
- .ActionList-content {
372
- padding-left: $spacer-6;
373
- }
374
- }
375
- }
376
-
377
- &[aria-expanded='true'] {
378
- .ActionList-item-collapseIcon {
379
- transition: transform 120ms linear;
380
- transform: scaleY(-1);
381
- }
382
-
383
- + .ActionList--subGroup {
384
- height: auto;
385
- overflow: visible;
386
- visibility: visible;
387
- opacity: 1;
388
- transform: translateY(0);
389
- }
390
-
391
- &.ActionList-content--hasActiveSubItem {
392
- > .ActionList-item-label {
393
- font-weight: $font-weight-bold;
394
- }
395
- }
396
- }
397
-
398
- &[aria-expanded='false'] {
399
- .ActionList-item-collapseIcon {
400
- transition: transform 120ms linear;
401
- transform: scaleY(1);
402
- }
403
-
404
- + .ActionList--subGroup {
405
- height: 0;
406
- overflow: hidden;
407
- visibility: hidden;
408
- opacity: 0;
409
- transform: translateY(-$spacer-3);
410
- }
411
-
412
- // show active indicator on parent collapse if child is active
413
- &.ActionList-content--hasActiveSubItem {
414
- background: var(--color-action-list-item-default-selected-bg);
415
-
416
- .ActionList-item-label {
417
- font-weight: $font-weight-bold;
418
- }
419
-
420
- &::before,
421
- + .ActionList-item::before {
422
- visibility: hidden;
423
- }
424
-
425
- // blue accent line
426
- &::after {
427
- @include activeIndicatorLine;
428
- }
429
- }
430
- }
431
-
432
419
  // sizes
433
420
 
434
421
  &.ActionList-content--sizeMedium {
@@ -501,7 +488,6 @@
501
488
 
502
489
  // inline
503
490
  .ActionList-item-descriptionWrap--inline {
504
- position: relative;
505
491
  flex-direction: row;
506
492
  align-items: baseline;
507
493
 
@@ -1,21 +1,9 @@
1
- // stylelint-disable max-nesting-depth, selector-max-compound-selectors, selector-max-specificity, no-duplicate-selectors, selector-max-type
2
1
  // tree-view variant
3
2
  // renders ActionList with default styling for tree-view
4
3
  // collapse/expand icons presents as leadingActions, rotate 90deg
5
4
  // connecting vertical lines between collapse groups
6
5
  // consistent font-size between nested groups
7
6
 
8
- @mixin activeIndicatorLine {
9
- position: absolute;
10
- top: calc(50% - 12px);
11
- left: -$actionList-item-padding-horizontal;
12
- width: $spacer-1;
13
- height: $spacer-4;
14
- content: '';
15
- background: var(--color-accent-fg);
16
- border-radius: $border-radius;
17
- }
18
-
19
7
  @mixin treeConnectingLine($left) {
20
8
  position: absolute;
21
9
  left: $left;
@@ -33,94 +21,6 @@
33
21
  }
34
22
 
35
23
  .ActionList-item {
36
- // class for single tree items not within a group
37
- &.ActionList-item--singleton {
38
- .ActionList-content {
39
- padding-left: $spacer-5;
40
- }
41
- }
42
-
43
- // start: copy from ActionList proper- backwards compatible for treeview with different markup structure
44
- &[aria-expanded] {
45
- .ActionList--subGroup {
46
- @media screen and (prefers-reduced-motion: no-preference) {
47
- transition: opacity 160ms cubic-bezier(0.25, 1, 0.5, 1), transform 160ms cubic-bezier(0.25, 1, 0.5, 1);
48
- }
49
-
50
- .ActionList-content {
51
- padding-left: $spacer-4;
52
- }
53
- }
54
-
55
- // has 16px leading visual
56
- .ActionList-content--visual16 + .ActionList--subGroup {
57
- .ActionList-content {
58
- padding-left: $spacer-5;
59
- }
60
- }
61
-
62
- // has 20px leading visual
63
- .ActionList-content--visual20 + .ActionList--subGroup {
64
- .ActionList-content {
65
- padding-left: $spacer-2 * 4.5; // 36px
66
- }
67
- }
68
-
69
- // has 24px leading visual
70
- .ActionList-content--visual24 + .ActionList--subGroup {
71
- .ActionList-content {
72
- padding-left: $spacer-6;
73
- }
74
- }
75
- }
76
-
77
- &[aria-expanded='true'] {
78
- .ActionList-item-collapseIcon {
79
- transition: transform 120ms linear;
80
- transform: scaleY(-1);
81
- }
82
-
83
- .ActionList--subGroup {
84
- height: auto;
85
- overflow: visible;
86
- visibility: visible;
87
- opacity: 1;
88
- transform: translateY(0);
89
- }
90
- }
91
-
92
- &[aria-expanded='false'] {
93
- .ActionList-item-collapseIcon {
94
- transition: transform 120ms linear;
95
- transform: scaleY(1);
96
- }
97
-
98
- .ActionList--subGroup {
99
- height: 0;
100
- overflow: hidden;
101
- visibility: hidden;
102
- opacity: 0;
103
- transform: translateY(-$spacer-3);
104
- }
105
-
106
- // show active indicator on parent collapse if child is active
107
- // this class changed in ActionList proper
108
- &.ActionList-item--hasActiveSubItem {
109
- background: var(--color-action-list-item-default-selected-bg);
110
-
111
- &::before,
112
- + .ActionList-item::before {
113
- visibility: hidden;
114
- }
115
-
116
- // blue accent line
117
- &::after {
118
- @include activeIndicatorLine;
119
- }
120
- }
121
- }
122
- // end copy
123
-
124
24
  // nesting (infinate levels)
125
25
  // target items inside expanded subgroup
126
26
  &[aria-expanded] {
@@ -128,6 +28,7 @@
128
28
  position: relative;
129
29
 
130
30
  // --ActionList-tree-depth is defined as an inline style referencing the aria-level of each item ie: aria-level="2"
31
+ // stylelint-disable-next-line selector-max-specificity, max-nesting-depth, selector-max-compound-selectors
131
32
  .ActionList-content {
132
33
  // stylelint-disable-next-line primer/spacing
133
34
  padding-left: calc(#{$spacer-2} * var(--ActionList-tree-depth));
@@ -154,9 +55,11 @@
154
55
  // expand/collapse group
155
56
  .ActionList-item--hasSubItem {
156
57
  .ActionList-item--subItem:not(.ActionList-item--hasSubItem) {
58
+ // stylelint-disable-next-line selector-max-specificity, selector-max-compound-selectors
157
59
  .ActionList-content {
158
60
  // increase child padding by targeting content first child span (add to ActionList-content padding, not replace)
159
61
  // creates a slight indent of child items
62
+ // stylelint-disable-next-line selector-max-specificity, selector-max-type, max-nesting-depth, selector-max-compound-selectors
160
63
  > span:first-child {
161
64
  padding-left: $spacer-4;
162
65
  }
@@ -167,6 +70,7 @@
167
70
  // first subitem
168
71
  > [aria-level='1'].ActionList-item--hasSubItem {
169
72
  > .ActionList--subGroup {
73
+ // stylelint-disable-next-line selector-max-specificity
170
74
  &::before {
171
75
  @include treeConnectingLine($left: $spacer-3);
172
76
  }
@@ -177,6 +81,7 @@
177
81
  // center connecting line with parent (line is 1px (8px - 1px)
178
82
  .ActionList-item--hasSubItem:not([aria-level='1']) {
179
83
  > .ActionList--subGroup {
84
+ // stylelint-disable-next-line selector-max-specificity
180
85
  &::before {
181
86
  @include treeConnectingLine(
182
87
  $left: calc(#{$spacer-2} * (var(--ActionList-tree-depth)) + #{$spacer-2 - $border-width})
@@ -8,11 +8,6 @@
8
8
  padding: 0;
9
9
  }
10
10
 
11
- // nested list within main ActionList
12
- .ActionList--subGroup {
13
- padding: 0;
14
- }
15
-
16
11
  // dividers
17
12
 
18
13
  .ActionList--divided {
@@ -26,24 +21,6 @@
26
21
  background: var(--color-action-list-item-inline-divider);
27
22
  }
28
23
 
29
- // if descriptionWrap--inline exists, move pseudo divider to wrapper
30
- .ActionList-item-descriptionWrap--inline {
31
- &::before {
32
- position: absolute;
33
- top: -$actionList-item-padding-vertical;
34
- display: block;
35
- width: 100%;
36
- height: $border-width;
37
- content: '';
38
- background: var(--color-action-list-item-inline-divider);
39
- }
40
-
41
- // unset the default label pseudo
42
- .ActionList-item-label::before {
43
- content: unset;
44
- }
45
- }
46
-
47
24
  // hide divider if item is active
48
25
  .ActionList-item--navActive {
49
26
  // stylelint-disable-next-line selector-max-specificity, selector-max-compound-selectors
@@ -59,9 +36,3 @@
59
36
  .ActionList-sectionDivider + .ActionList-item .ActionList-item-label::before {
60
37
  visibility: hidden;
61
38
  }
62
-
63
- // hide if item is first of type with label::before, or is the first item after a sectionDivider
64
- .ActionList-item:first-of-type .ActionList-item-descriptionWrap--inline::before,
65
- .ActionList-sectionDivider + .ActionList-item .ActionList-item-descriptionWrap--inline::before {
66
- visibility: hidden;
67
- }
package/alerts/flash.scss CHANGED
@@ -4,7 +4,7 @@
4
4
  .flash {
5
5
  position: relative;
6
6
  // stylelint-disable-next-line primer/spacing
7
- padding: 20px $spacer-3;
7
+ padding: $spacer-3;
8
8
  border-style: $border-style;
9
9
  border-width: $border-width;
10
10
  border-radius: $border-radius;
@@ -141,6 +141,35 @@
141
141
  background-color: var(--color-canvas-default);
142
142
  }
143
143
 
144
+ // A flash banner inside an ApplicationFrame tray region
145
+
146
+ .flash-tray {
147
+ margin: 0 -$border-width;
148
+ padding: 12px $spacer-3;
149
+ border-radius: 0;
150
+
151
+ @include breakpoint(md) {
152
+ margin: 0;
153
+ border-radius: $border-radius-2;
154
+ animation: flash-tray--appear 200ms 120ms both ease-out;
155
+
156
+ & + .flash-tray {
157
+ margin-top: $spacer-2;
158
+ animation-delay: 200ms;
159
+ }
160
+ }
161
+
162
+ @keyframes flash-tray--appear {
163
+ from {
164
+ opacity: 0;
165
+ transform: translateY(-$spacer-4);
166
+ }
167
+ to {
168
+ opacity: 1;
169
+ }
170
+ }
171
+ }
172
+
144
173
  // FIXME deprecate this
145
174
  .warning {
146
175
  padding: $em-spacer-5;
package/base/kbd.scss CHANGED
@@ -3,6 +3,7 @@
3
3
 
4
4
  kbd {
5
5
  display: inline-block;
6
+ // stylelint-disable-next-line primer/spacing
6
7
  padding: ($spacer-1 - 1) ($spacer-1 + 1);
7
8
  font: 11px $mono-font;
8
9
  // stylelint-disable-next-line primer/typography
@@ -225,7 +225,7 @@ code,
225
225
  kbd,
226
226
  pre,
227
227
  samp {
228
- font-family: monospace; /* 1 */
228
+ font-family: monospace, monospace; /* 1 */
229
229
  font-size: 1em; /* 2 */
230
230
  }
231
231