@papillonarts/css 0.5.0 → 0.7.0

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 (133) hide show
  1. package/LICENSE +1 -1
  2. package/build/primer/autocomplete/README.md +20 -0
  3. package/build/primer/autocomplete/index.scss +3 -0
  4. package/build/primer/autocomplete/suggester.scss +101 -0
  5. package/build/primer/avatars/README.md +20 -0
  6. package/build/primer/avatars/avatar-parent-child.scss +17 -0
  7. package/build/primer/avatars/circle-badge.scss +55 -0
  8. package/build/primer/avatars/index.scss +5 -0
  9. package/build/primer/base/README.md +20 -0
  10. package/build/primer/base/base.scss +9 -17
  11. package/build/primer/base/index.scss +1 -0
  12. package/build/primer/base/kbd.scss +8 -10
  13. package/build/primer/{color-modes/native.scss → base/native-colors.scss} +4 -2
  14. package/build/primer/base/normalize.scss +4 -3
  15. package/build/primer/base/typography-base.scss +4 -3
  16. package/build/primer/box/README.md +20 -0
  17. package/build/primer/box/box-overlay.scss +45 -0
  18. package/build/primer/box/index.scss +2 -0
  19. package/build/primer/branch-name/README.md +20 -0
  20. package/build/primer/branch-name/branch-name.scss +33 -0
  21. package/build/primer/branch-name/index.scss +3 -0
  22. package/build/primer/buttons/README.md +20 -0
  23. package/build/primer/buttons/button-group.scss +104 -0
  24. package/build/primer/buttons/button.scss +347 -0
  25. package/build/primer/buttons/index.scss +4 -0
  26. package/build/primer/buttons/misc.scss +244 -0
  27. package/build/primer/color-modes/index.scss +0 -1
  28. package/build/primer/color-modes/themes/dark.scss +1 -6
  29. package/build/primer/color-modes/themes/dark_colorblind.scss +1 -6
  30. package/build/primer/color-modes/themes/dark_dimmed.scss +1 -6
  31. package/build/primer/color-modes/themes/dark_high_contrast.scss +1 -6
  32. package/build/primer/color-modes/themes/dark_tritanopia.scss +1 -6
  33. package/build/primer/color-modes/themes/light.scss +1 -6
  34. package/build/primer/color-modes/themes/light_colorblind.scss +1 -6
  35. package/build/primer/color-modes/themes/light_high_contrast.scss +1 -6
  36. package/build/primer/color-modes/themes/light_tritanopia.scss +1 -6
  37. package/build/primer/core/README.md +20 -0
  38. package/build/primer/core/index.scss +18 -0
  39. package/build/primer/docs.scss +7 -0
  40. package/build/primer/forms/README.md +20 -0
  41. package/build/primer/forms/form-control.scss +286 -0
  42. package/build/primer/forms/form-group.scss +297 -0
  43. package/build/primer/forms/form-select.scss +47 -0
  44. package/build/primer/forms/index.scss +6 -0
  45. package/build/primer/forms/input-group.scss +81 -0
  46. package/build/primer/forms/radio-group.scss +68 -0
  47. package/build/primer/header/README.md +20 -0
  48. package/build/primer/header/header.scss +51 -0
  49. package/build/primer/header/index.scss +2 -0
  50. package/build/primer/index.scss +8 -3
  51. package/build/primer/labels/README.md +20 -0
  52. package/build/primer/labels/index.scss +3 -0
  53. package/build/primer/labels/issue-labels.scss +26 -0
  54. package/build/primer/labels/mixins.scss +44 -0
  55. package/build/primer/layout/README.md +20 -0
  56. package/build/primer/layout/app-frame.scss +156 -0
  57. package/build/primer/layout/container.scss +30 -0
  58. package/build/primer/layout/grid-offset.scss +19 -0
  59. package/build/primer/layout/grid.scss +77 -0
  60. package/build/primer/layout/index.scss +7 -0
  61. package/build/primer/layout/page-layout.scss +417 -0
  62. package/build/primer/layout/stack.scss +220 -0
  63. package/build/primer/loaders/README.md +20 -0
  64. package/build/primer/loaders/index.scss +2 -0
  65. package/build/primer/loaders/loaders.scss +19 -0
  66. package/build/primer/markdown/README.md +20 -0
  67. package/build/primer/markdown/blob-csv.scss +32 -0
  68. package/build/primer/markdown/code.scss +79 -0
  69. package/build/primer/markdown/footnotes.scss +59 -0
  70. package/build/primer/markdown/headings.scss +101 -0
  71. package/build/primer/markdown/images.scss +130 -0
  72. package/build/primer/markdown/index.scss +9 -0
  73. package/build/primer/markdown/lists.scss +101 -0
  74. package/build/primer/markdown/markdown-body.scss +101 -0
  75. package/build/primer/markdown/tables.scss +46 -0
  76. package/build/primer/marketing/README.md +20 -0
  77. package/build/primer/marketing/buttons/button.scss +171 -0
  78. package/build/primer/marketing/buttons/index.scss +3 -0
  79. package/build/primer/marketing/index.scss +8 -0
  80. package/build/primer/marketing/links/index.scss +3 -0
  81. package/build/primer/marketing/links/link.scss +51 -0
  82. package/build/primer/marketing/support/index.scss +2 -0
  83. package/build/primer/marketing/support/variables.scss +140 -0
  84. package/build/primer/marketing/type/index.scss +3 -0
  85. package/build/primer/marketing/type/typography.scss +140 -0
  86. package/build/primer/marketing/utilities/animations.scss +52 -0
  87. package/build/primer/marketing/utilities/borders.scss +4 -0
  88. package/build/primer/marketing/utilities/filters.scss +3 -0
  89. package/build/primer/marketing/utilities/index.scss +6 -0
  90. package/build/primer/marketing/utilities/layout.scss +58 -0
  91. package/build/primer/navigation/README.md +20 -0
  92. package/build/primer/navigation/filter-list.scss +86 -0
  93. package/build/primer/navigation/index.scss +5 -0
  94. package/build/primer/navigation/sidenav.scss +102 -0
  95. package/build/primer/navigation/subnav.scss +154 -0
  96. package/build/primer/pagination/README.md +20 -0
  97. package/build/primer/pagination/index.scss +3 -0
  98. package/build/primer/pagination/pagination.scss +157 -0
  99. package/build/primer/primitives/index.scss +10 -0
  100. package/build/primer/primitives/temp-typography-tokens.scss +22 -0
  101. package/build/primer/product/README.md +20 -0
  102. package/build/primer/product/index.scss +13 -0
  103. package/build/primer/select-menu/README.md +20 -0
  104. package/build/primer/select-menu/index.scss +3 -0
  105. package/build/primer/select-menu/select-menu.scss +486 -0
  106. package/build/primer/support/README.md +20 -0
  107. package/build/primer/support/mixins/color-modes.scss +89 -3
  108. package/build/primer/support/mixins/layout.scss +1 -2
  109. package/build/primer/support/mixins/misc.scss +15 -9
  110. package/build/primer/support/mixins/typography.scss +21 -2
  111. package/build/primer/support/variables/misc.scss +2 -2
  112. package/build/primer/support/variables/typography.scss +2 -2
  113. package/build/primer/table-object/index.scss +1 -0
  114. package/build/primer/table-object/table-object.scss +23 -0
  115. package/build/primer/toasts/README.md +20 -0
  116. package/build/primer/toasts/index.scss +2 -0
  117. package/build/primer/toasts/toasts.scss +129 -0
  118. package/build/primer/tooltips/README.md +20 -0
  119. package/build/primer/tooltips/index.scss +2 -0
  120. package/build/primer/tooltips/tooltips.scss +228 -0
  121. package/build/primer/truncate/truncate.scss +2 -66
  122. package/build/primer/utilities/README.md +20 -0
  123. package/build/primer/utilities/borders.scss +30 -21
  124. package/build/primer/utilities/box-shadow.scss +8 -6
  125. package/build/primer/utilities/colors.scss +59 -60
  126. package/build/primer/utilities/details.scss +2 -2
  127. package/build/primer/utilities/flexbox.scss +2 -2
  128. package/build/primer/utilities/layout.scss +8 -6
  129. package/build/primer/utilities/margin.scss +2 -5
  130. package/build/primer/utilities/padding.scss +8 -10
  131. package/build/primer/utilities/typography.scss +12 -11
  132. package/build/primer/utilities/visibility-display.scss +14 -12
  133. package/package.json +2 -2
@@ -0,0 +1,417 @@
1
+ // stylelint-disable max-nesting-depth
2
+ // stylelint-disable selector-max-specificity
3
+ // stylelint-disable no-duplicate-selectors
4
+
5
+ $Layout-divider-color: var(--borderColor-default, var(--color-border-default)) !default;
6
+ $Layout-responsive-variant-max-breakpoint: 'md' !default;
7
+
8
+ :root {
9
+ --Layout-pane-width: #{map-get($sidebar-width, 'sm')};
10
+ --Layout-content-width: 100%;
11
+ --Layout-template-columns: 1fr var(--Layout-pane-width);
12
+ --Layout-template-areas: 'content pane';
13
+ --Layout-column-gap: var(--base-size-16);
14
+ --Layout-row-gap: var(--base-size-16);
15
+
16
+ // the `px` unit is mandatory for `calc()` execution. See https://stackoverflow.com/a/32518348
17
+ --Layout-outer-spacing-x: 0px; // wrapper margin x
18
+ --Layout-outer-spacing-y: 0px; // wrapper margin y
19
+ --Layout-inner-spacing-min: 0px; // default region padding
20
+ --Layout-inner-spacing-max: 0px; // relaxed content horizontal padding
21
+ }
22
+
23
+ // Layout beta mixins
24
+
25
+ // responsive region dividers
26
+
27
+ @mixin Layout-line-divider {
28
+ position: absolute;
29
+ // stylelint-disable-next-line primer/spacing
30
+ left: calc(var(--Layout-outer-spacing-x) * -1);
31
+ display: block;
32
+ width: calc(100% + (var(--Layout-outer-spacing-x) * 2));
33
+ height: 1px;
34
+ content: '';
35
+ // stylelint-disable-next-line primer/colors
36
+ background-color: $Layout-divider-color;
37
+ }
38
+
39
+ @mixin Layout-filled-divider {
40
+ position: absolute;
41
+ bottom: calc(var(--base-size-8) * -1);
42
+ // stylelint-disable-next-line primer/spacing
43
+ left: calc(var(--Layout-outer-spacing-x) * -1);
44
+ display: block;
45
+ width: calc(100% + (var(--Layout-outer-spacing-x) * 2));
46
+ height: var(--base-size-8);
47
+ content: '';
48
+ background-color: var(--bgColor-inset, var(--color-canvas-inset));
49
+ // stylelint-disable-next-line primer/box-shadow
50
+ box-shadow: inset 0 1px $Layout-divider-color, inset 0 -1px $Layout-divider-color;
51
+ }
52
+
53
+ .PageLayout {
54
+ display: block;
55
+ // stylelint-disable-next-line primer/spacing
56
+ margin: var(--Layout-outer-spacing-y) var(--Layout-outer-spacing-x);
57
+
58
+ // multi-column desktop-friendly layout
59
+
60
+ @include breakpoint($Layout-responsive-variant-max-breakpoint) {
61
+
62
+ // Set a `content` region width, to work with loading states when
63
+ // `pane` is not yet loaded. See https://github.com/primer/css/pull/1818
64
+ $Layout-content-full-width: minmax(0, calc(100% - var(--Layout-pane-width) - var(--Layout-column-gap)));
65
+
66
+ &.PageLayout--panePos-start {
67
+ --Layout-template-columns: var(--Layout-pane-width) #{$Layout-content-full-width};
68
+ --Layout-template-areas: 'pane content';
69
+ }
70
+
71
+ &.PageLayout--panePos-end {
72
+ --Layout-template-columns: #{$Layout-content-full-width} var(--Layout-pane-width);
73
+ --Layout-template-areas: 'content pane';
74
+ }
75
+
76
+ // header divider
77
+
78
+ .PageLayout-header--hasDivider {
79
+ // stylelint-disable-next-line primer/spacing
80
+ padding-bottom: max(var(--Layout-row-gap), var(--Layout-inner-spacing-min));
81
+ // stylelint-disable-next-line primer/borders, primer/colors
82
+ border-bottom: $border-width solid $Layout-divider-color;
83
+ }
84
+
85
+ // footer divider
86
+
87
+ .PageLayout-footer--hasDivider {
88
+ // stylelint-disable-next-line primer/spacing
89
+ padding-top: max(var(--Layout-row-gap), var(--Layout-inner-spacing-min));
90
+ // stylelint-disable-next-line primer/borders, primer/colors
91
+ border-top: $border-width solid $Layout-divider-color;
92
+ }
93
+
94
+ // pane divider
95
+
96
+ &.PageLayout--hasPaneDivider {
97
+ &.PageLayout--panePos-start {
98
+ .PageLayout-pane {
99
+ // stylelint-disable-next-line primer/borders, primer/colors
100
+ border-right: $border-width solid $Layout-divider-color;
101
+ }
102
+
103
+ &:not(.PageLayout--columnGap-none) {
104
+ .PageLayout-pane {
105
+ // stylelint-disable-next-line primer/spacing
106
+ padding-right: calc(var(--Layout-column-gap) - #{$border-width});
107
+ // stylelint-disable-next-line primer/spacing
108
+ margin-right: calc(var(--Layout-column-gap) * -1);
109
+ }
110
+
111
+ .PageLayout-content {
112
+ // stylelint-disable-next-line primer/spacing
113
+ margin-left: var(--Layout-column-gap);
114
+ }
115
+ }
116
+ }
117
+
118
+ &.PageLayout--panePos-end {
119
+ .PageLayout-pane {
120
+ // stylelint-disable-next-line primer/borders, primer/colors
121
+ border-left: $border-width solid $Layout-divider-color;
122
+ }
123
+
124
+ &:not(.PageLayout--columnGap-none) {
125
+ .PageLayout-pane {
126
+ // stylelint-disable-next-line primer/spacing
127
+ padding-left: calc(var(--Layout-column-gap) - #{$border-width});
128
+ // stylelint-disable-next-line primer/spacing
129
+ margin-left: calc(var(--Layout-column-gap) * -1);
130
+ }
131
+
132
+ .PageLayout-content {
133
+ // stylelint-disable-next-line primer/spacing
134
+ margin-right: var(--Layout-column-gap);
135
+ }
136
+ }
137
+ }
138
+ }
139
+
140
+ // sticky pane
141
+
142
+ .PageLayout-pane--sticky {
143
+ position: sticky;
144
+ top: 0;
145
+ max-height: 100vh;
146
+ overflow: auto;
147
+ scrollbar-width: thin;
148
+
149
+ @supports (max-height: 100dvh) {
150
+ max-height: 100dvh;
151
+ }
152
+ }
153
+
154
+ // content width
155
+
156
+ [class^='PageLayout-content-centered-'] {
157
+ max-width: calc(var(--Layout-content-width) + var(--Layout-pane-width) + var(--Layout-column-gap));
158
+ margin-right: auto;
159
+ margin-left: auto;
160
+ }
161
+
162
+ &.PageLayout--hasPaneDivider {
163
+ [class^='PageLayout-content-centered-'] {
164
+ max-width: calc(var(--Layout-content-width) + var(--Layout-pane-width) + (var(--Layout-column-gap) * 2));
165
+ }
166
+ }
167
+
168
+ &.PageLayout--panePos-start {
169
+ [class^='PageLayout-content-centered-'] > [class^='container-'] {
170
+ margin-left: 0;
171
+ }
172
+ }
173
+
174
+ &.PageLayout--panePos-end {
175
+ [class^='PageLayout-content-centered-'] > [class^='container-'] {
176
+ margin-right: 0;
177
+ }
178
+ }
179
+
180
+ @each $breakpoint in map-keys($breakpoints) {
181
+ .PageLayout-content-centered-#{$breakpoint} {
182
+ --Layout-content-width: #{map-get($breakpoints, $breakpoint)};
183
+ }
184
+ }
185
+
186
+ // pane width
187
+
188
+ @each $breakpoint in map-keys($sidebar-width) {
189
+ @include breakpoint($breakpoint) {
190
+ --Layout-pane-width: #{map-get($sidebar-width, $breakpoint)};
191
+ }
192
+ }
193
+
194
+ &.PageLayout--paneWidth-narrow {
195
+ @each $breakpoint in map-keys($sidebar-narrow-width) {
196
+ @include breakpoint($breakpoint) {
197
+ --Layout-pane-width: #{map-get($sidebar-narrow-width, $breakpoint)};
198
+ }
199
+ }
200
+ }
201
+
202
+ &.PageLayout--paneWidth-wide {
203
+ @each $breakpoint in map-keys($sidebar-wide-width) {
204
+ @include breakpoint($breakpoint) {
205
+ --Layout-pane-width: #{map-get($sidebar-wide-width, $breakpoint)};
206
+ }
207
+ }
208
+ }
209
+ }
210
+
211
+ // responsive behaviors on narrow viewports
212
+
213
+ @media (max-width: #{map-get($breakpoints, $Layout-responsive-variant-max-breakpoint) - 0.02px}) {
214
+
215
+ // variant: stackRegions
216
+
217
+ &.PageLayout--responsive-stackRegions {
218
+ --Layout-template-columns: 1fr;
219
+
220
+ // responsive-panePos: end (default)
221
+ --Layout-template-areas: 'content' 'pane';
222
+
223
+ // responsive-panePos: start
224
+ &.PageLayout--responsive-panePos-start {
225
+ --Layout-template-areas: 'pane' 'content';
226
+ }
227
+ }
228
+
229
+ // variant: separateRegions
230
+
231
+ &.PageLayout--responsive-separateRegions {
232
+ --Layout-template-columns: 1fr;
233
+ --Layout-template-areas: 'content';
234
+
235
+ &.PageLayout--responsive-primary-content {
236
+ --Layout-template-areas: 'content';
237
+
238
+ .PageLayout-pane {
239
+ display: none;
240
+ }
241
+ }
242
+
243
+ &.PageLayout--responsive-primary-pane {
244
+ --Layout-template-areas: 'pane';
245
+
246
+ .PageLayout-content {
247
+ display: none;
248
+ }
249
+ }
250
+ }
251
+
252
+ // region dividers on narrow viewports
253
+
254
+ .PageLayout-region--dividerNarrow-line-before {
255
+ position: relative;
256
+ // stylelint-disable-next-line primer/spacing
257
+ margin-top: var(--Layout-row-gap);
258
+
259
+ &::before {
260
+ @include Layout-line-divider;
261
+
262
+ // stylelint-disable-next-line primer/spacing
263
+ top: calc(#{$border-width * -1} - var(--Layout-row-gap));
264
+ }
265
+ }
266
+
267
+ .PageLayout-region--dividerNarrow-line-after {
268
+ position: relative;
269
+ // stylelint-disable-next-line primer/spacing
270
+ margin-bottom: var(--Layout-row-gap);
271
+
272
+ &::after {
273
+ @include Layout-line-divider;
274
+
275
+ // stylelint-disable-next-line primer/spacing
276
+ bottom: calc(#{$border-width * -1} - var(--Layout-row-gap));
277
+ }
278
+ }
279
+
280
+ .PageLayout-region--dividerNarrow-filled-before {
281
+ position: relative;
282
+ // stylelint-disable-next-line primer/spacing
283
+ margin-top: calc(var(--base-size-8) + var(--Layout-row-gap));
284
+
285
+ &::after {
286
+ @include Layout-filled-divider;
287
+
288
+ // stylelint-disable-next-line primer/spacing
289
+ top: calc(calc(var(--base-size-8) * -1) - var(--Layout-row-gap));
290
+ }
291
+ }
292
+
293
+ .PageLayout-region--dividerNarrow-filled-after {
294
+ position: relative;
295
+ // stylelint-disable-next-line primer/spacing
296
+ margin-bottom: calc(var(--base-size-8) + var(--Layout-row-gap));
297
+
298
+ &::before {
299
+ @include Layout-filled-divider;
300
+
301
+ // stylelint-disable-next-line primer/spacing
302
+ bottom: calc(calc(var(--base-size-8) * -1) - var(--Layout-row-gap));
303
+ }
304
+ }
305
+ }
306
+ }
307
+
308
+ // PageLayout-wrapper bundles header, footer, pane, and content regions
309
+ .PageLayout-wrapper {
310
+ display: grid;
311
+ grid: auto-flow / 1fr;
312
+ row-gap: var(--Layout-row-gap);
313
+ }
314
+
315
+ // PageLayout-columns wrap pane and content regions
316
+ // If layout has no pane, PageLayout-columns is not present
317
+ .PageLayout-columns {
318
+ display: grid;
319
+ column-gap: var(--Layout-column-gap);
320
+ row-gap: var(--Layout-row-gap);
321
+ grid-template-columns: var(--Layout-template-columns);
322
+ grid-template-rows: 1fr;
323
+ grid-template-areas: var(--Layout-template-areas);
324
+
325
+ .PageLayout-content {
326
+ // stylelint-disable-next-line primer/spacing
327
+ padding-right: var(--Layout-inner-spacing-max);
328
+ // stylelint-disable-next-line primer/spacing
329
+ padding-left: var(--Layout-inner-spacing-max);
330
+ grid-area: content;
331
+ }
332
+
333
+ .PageLayout-pane {
334
+ grid-area: pane;
335
+ }
336
+ }
337
+
338
+ // outer spacing
339
+
340
+ .PageLayout--outerSpacing-normal {
341
+ --Layout-outer-spacing-x: var(--base-size-16);
342
+ --Layout-outer-spacing-y: var(--base-size-16);
343
+
344
+ @include breakpoint(lg) {
345
+ --Layout-outer-spacing-x: var(--base-size-24);
346
+ --Layout-outer-spacing-y: var(--base-size-24);
347
+ }
348
+ }
349
+
350
+ .PageLayout--outerSpacing-condensed {
351
+ --Layout-outer-spacing-x: var(--base-size-16);
352
+ --Layout-outer-spacing-y: var(--base-size-16);
353
+ }
354
+
355
+ // inner spacing
356
+
357
+ .PageLayout--innerSpacing-normal {
358
+ --Layout-inner-spacing-min: var(--base-size-16);
359
+ --Layout-inner-spacing-max: var(--base-size-16);
360
+
361
+ @include breakpoint(lg) {
362
+ --Layout-inner-spacing-max: var(--base-size-24);
363
+ }
364
+ }
365
+
366
+ .PageLayout--innerSpacing-condensed {
367
+ --Layout-inner-spacing-min: var(--base-size-16);
368
+ --Layout-inner-spacing-max: var(--base-size-16);
369
+ }
370
+
371
+ // column gap
372
+
373
+ .PageLayout--columnGap-normal {
374
+ --Layout-column-gap: var(--base-size-16);
375
+
376
+ @include breakpoint(lg) {
377
+ --Layout-column-gap: var(--base-size-24);
378
+ }
379
+ }
380
+
381
+ .PageLayout--columnGap-condensed {
382
+ --Layout-column-gap: var(--base-size-16);
383
+ }
384
+
385
+ .PageLayout--columnGap-none {
386
+ // the `px` unit is mandatory for `calc()` execution. See https://stackoverflow.com/a/32518348
387
+ --Layout-column-gap: 0px;
388
+ }
389
+
390
+ // row gap
391
+
392
+ .PageLayout--rowGap-normal {
393
+ --Layout-row-gap: var(--base-size-16);
394
+
395
+ @include breakpoint(lg) {
396
+ --Layout-row-gap: var(--base-size-24);
397
+ }
398
+ }
399
+
400
+ .PageLayout--rowGap-none {
401
+ // the `px` unit is mandatory for `calc()` execution. See https://stackoverflow.com/a/32518348
402
+ --Layout-row-gap: 0px;
403
+ }
404
+
405
+ .PageLayout--rowGap-condensed {
406
+ --Layout-row-gap: var(--base-size-16);
407
+ }
408
+
409
+ // regions
410
+
411
+ .PageLayout-header,
412
+ .PageLayout-content,
413
+ .PageLayout-pane,
414
+ .PageLayout-footer {
415
+ // stylelint-disable-next-line primer/spacing
416
+ padding: var(--Layout-inner-spacing-min);
417
+ }
@@ -0,0 +1,220 @@
1
+ // Stack layout helper component
2
+
3
+ .Stack {
4
+
5
+ // A Stack component lays elements horizontally or vertically on the page.
6
+ //
7
+ // Stack is a simple abstraction of CSS' Flexbox. Use it to structure elements
8
+ // that are visually grouped, following the same direction.
9
+ //
10
+ // Markup structure
11
+ // ================
12
+ //
13
+ // .Stack
14
+ // ├─ &.Stack--dir-[ inline | block ]-[ whenNarrow | whenRegular | whenWide ]
15
+ // ├─ &.Stack--gap-[ none | condensed | normal | spacious ]-[ whenNarrow | whenRegular | whenWide ]
16
+ // ├─ &.Stack--align-[ start | center | end | baseline ]-[ whenNarrow | whenRegular | whenWide ]
17
+ // ├─ &.Stack--alignWrap-[ start | center | end | distribute | distributeEvenly ]-[ whenNarrow | whenRegular | whenWide ]
18
+ // ├─ &.Stack--spread-[ start | center | end | distribute | distributeEvenly ]-[ whenNarrow | whenRegular | whenWide ]
19
+ // ├─ &.Stack--wrap-[ whenNarrow | whenRegular | whenWide ]
20
+ // ├─ &.Stack--nowrap-[ whenNarrow | whenRegular | whenWide ]
21
+ // ├─ &.Stack--showDividers-[ whenNarrow | whenRegular | whenWide ]
22
+ // │
23
+ // ├─ .Stack-divider
24
+ // ├─ .Stack-item
25
+ // │ ├─ &.Stack-item--expand-[ whenNarrow | whenRegular | whenWide ]
26
+ // │ ├─ &.Stack-item--keepSize-[ whenNarrow | whenRegular | whenWide ]
27
+
28
+ $Stack-gap-default: var(--stack-gap-normal, 16px);
29
+
30
+ --Stack-gap-whenRegular: #{$Stack-gap-default};
31
+ --Stack-gap-whenNarrow: #{$Stack-gap-default};
32
+ --Stack-gap-whenWide: var(--Stack-gap-whenRegular);
33
+ --Stack-divider-color: var(--borderColor-default, var(--color-border-default));
34
+
35
+ display: flex;
36
+ flex-flow: column;
37
+ align-items: stretch;
38
+ align-content: flex-start;
39
+ gap: var(--Stack-gap-whenRegular);
40
+
41
+ @media ($viewport-narrow) {
42
+ gap: var(--Stack-gap-whenNarrow);
43
+ }
44
+
45
+ @media ($viewport-wide) {
46
+ gap: var(--Stack-gap-whenWide);
47
+ }
48
+ }
49
+
50
+ @mixin Stack--modifiers($viewportRange: '') {
51
+ // direction
52
+
53
+ .Stack--dir-inline#{$viewportRange} {
54
+ flex-flow: row;
55
+ }
56
+
57
+ .Stack--dir-block#{$viewportRange} {
58
+ flex-flow: column;
59
+ }
60
+
61
+ // gap
62
+
63
+ .Stack--gap-none#{$viewportRange} {
64
+ --Stack-gap#{$viewportRange}: 0;
65
+ }
66
+
67
+ .Stack--gap-condensed#{$viewportRange} {
68
+ --Stack-gap#{$viewportRange}: var(--stack-gap-condensed, 8px);
69
+ }
70
+
71
+ .Stack--gap-normal#{$viewportRange} {
72
+ --Stack-gap#{$viewportRange}: var(--stack-gap-normal, 16px);
73
+ }
74
+
75
+ // There's no .Stack--gap-spacious-whenNarrow
76
+ // Narrow viewports render `spacious` gap as `normal`
77
+ @if $viewportRange != '-whenNarrow' {
78
+ .Stack--gap-spacious#{$viewportRange} {
79
+ --Stack-gap#{$viewportRange}: var(--stack-gap-spacious, 24px);
80
+ }
81
+ }
82
+
83
+ // align
84
+
85
+ .Stack--align-start#{$viewportRange} {
86
+ align-items: flex-start;
87
+ }
88
+
89
+ .Stack--align-center#{$viewportRange} {
90
+ align-items: center;
91
+ }
92
+
93
+ .Stack--align-end#{$viewportRange} {
94
+ align-items: flex-end;
95
+ }
96
+
97
+ .Stack--align-baseline#{$viewportRange} {
98
+ align-items: baseline;
99
+ }
100
+
101
+ // alignWrap
102
+
103
+ .Stack--alignWrap-start#{$viewportRange} {
104
+ align-content: flex-start;
105
+ }
106
+
107
+ .Stack--alignWrap-center#{$viewportRange} {
108
+ align-content: center;
109
+ }
110
+
111
+ .Stack--alignWrap-end#{$viewportRange} {
112
+ align-content: flex-end;
113
+ }
114
+
115
+ .Stack--alignWrap-distribute#{$viewportRange} {
116
+ align-content: space-between;
117
+ }
118
+
119
+ .Stack--alignWrap-distributeEvenly#{$viewportRange} {
120
+ align-content: space-evenly;
121
+ }
122
+
123
+ // spread
124
+
125
+ .Stack--spread-start#{$viewportRange} {
126
+ justify-content: flex-start;
127
+ }
128
+
129
+ .Stack--spread-center#{$viewportRange} {
130
+ justify-content: center;
131
+ }
132
+
133
+ .Stack--spread-end#{$viewportRange} {
134
+ justify-content: flex-end;
135
+ }
136
+
137
+ .Stack--spread-distribute#{$viewportRange} {
138
+ justify-content: space-between;
139
+ }
140
+
141
+ .Stack--spread-distributeEvenly#{$viewportRange} {
142
+ justify-content: space-evenly;
143
+ }
144
+
145
+ // wrap
146
+
147
+ .Stack--wrap#{$viewportRange} {
148
+ flex-wrap: wrap;
149
+ }
150
+
151
+ .Stack--nowrap#{$viewportRange} {
152
+ flex-wrap: nowrap;
153
+ }
154
+
155
+ // showDividers
156
+
157
+ .Stack--showDividers#{$viewportRange} > .Stack-divider,
158
+ .Stack--showDividers#{$viewportRange} > .Stack-item > .Stack-divider {
159
+ display: block;
160
+ }
161
+
162
+ :not(.Stack--dir-inline#{$viewportRange}) > .Stack-divider,
163
+ :not(.Stack--dir-inline#{$viewportRange}) > .Stack-item > .Stack-divider {
164
+ border-block-end: var(--borderWidth-thin, var(--borderWidth-thin)) solid var(--Stack-divider-color);
165
+ inline-size: auto;
166
+ block-size: 0;
167
+ }
168
+
169
+ .Stack--dir-inline#{$viewportRange} > .Stack-divider,
170
+ .Stack--dir-inline#{$viewportRange} > .Stack-item > .Stack-divider {
171
+ border-inline-end: var(--borderWidth-thin, var(--borderWidth-thin)) solid var(--Stack-divider-color);
172
+ inline-size: 0;
173
+ block-size: auto;
174
+ }
175
+ }
176
+
177
+ // Stack-divider
178
+
179
+ .Stack-divider {
180
+ display: none;
181
+ padding: 0;
182
+ margin: 0;
183
+ border: 0;
184
+ align-self: stretch;
185
+ }
186
+
187
+ // Stack-item
188
+
189
+ .Stack-item {
190
+ flex: 0 1 auto;
191
+ min-inline-size: 0;
192
+ }
193
+
194
+ @mixin Stack-item--modifiers($viewportRange: '') {
195
+
196
+ .Stack-item--expand#{$viewportRange} {
197
+ flex-grow: 1;
198
+ }
199
+
200
+ .Stack-item--keepSize#{$viewportRange} {
201
+ flex-shrink: 0;
202
+ }
203
+ }
204
+
205
+ // Responsive composition
206
+
207
+ @media ($viewport-narrow) {
208
+ @include Stack--modifiers('-whenNarrow');
209
+ @include Stack-item--modifiers('-whenNarrow');
210
+ }
211
+
212
+ @media ($viewport-regular) {
213
+ @include Stack--modifiers('-whenRegular');
214
+ @include Stack-item--modifiers('-whenRegular');
215
+ }
216
+
217
+ @media ($viewport-wide) {
218
+ @include Stack--modifiers('-whenWide');
219
+ @include Stack-item--modifiers('-whenWide');
220
+ }
@@ -0,0 +1,20 @@
1
+ ---
2
+ bundle: "loaders"
3
+ generated: true
4
+ ---
5
+
6
+ # Primer CSS: `loaders` bundle
7
+
8
+ ## Usage
9
+
10
+ Primer CSS source files are written in [SCSS]. To include this Primer CSS module in your own build, ensure that your `node_modules` directory is listed in your Sass include paths, then import it with:
11
+
12
+ ```scss
13
+ @import "@primer/css/loaders/index.scss";
14
+ ```
15
+
16
+ ## Build
17
+
18
+ The `@primer/css` npm package includes a standalone CSS build of this module in `dist/loaders.css`.
19
+
20
+ [scss]: https://sass-lang.com/documentation/syntax#scss
@@ -0,0 +1,2 @@
1
+ @import '../support/index.scss';
2
+ @import './loaders.scss';
@@ -0,0 +1,19 @@
1
+ // Loaders
2
+
3
+ // Animated Ellipsis
4
+
5
+ .AnimatedEllipsis {
6
+ display: inline-block;
7
+ overflow: hidden;
8
+ vertical-align: bottom;
9
+
10
+ &::after {
11
+ display: inline-block;
12
+ content: '...';
13
+ animation: AnimatedEllipsis-keyframes 1.2s steps(4, jump-none) infinite;
14
+ }
15
+
16
+ @keyframes AnimatedEllipsis-keyframes {
17
+ 0% { transform: translateX(-100%); }
18
+ }
19
+ }
@@ -0,0 +1,20 @@
1
+ ---
2
+ bundle: "markdown"
3
+ generated: true
4
+ ---
5
+
6
+ # Primer CSS: `markdown` bundle
7
+
8
+ ## Usage
9
+
10
+ Primer CSS source files are written in [SCSS]. To include this Primer CSS module in your own build, ensure that your `node_modules` directory is listed in your Sass include paths, then import it with:
11
+
12
+ ```scss
13
+ @import "@primer/css/markdown/index.scss";
14
+ ```
15
+
16
+ ## Build
17
+
18
+ The `@primer/css` npm package includes a standalone CSS build of this module in `dist/markdown.css`.
19
+
20
+ [scss]: https://sass-lang.com/documentation/syntax#scss