@stackoverflow/stacks 3.0.0-beta.2 → 3.0.0-beta.21

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 (60) hide show
  1. package/dist/css/stacks.css +6068 -5972
  2. package/dist/css/stacks.min.css +1 -1
  3. package/lib/atomic/flex.less +6 -34
  4. package/lib/atomic/height.less +22 -0
  5. package/lib/atomic/misc.less +21 -15
  6. package/lib/atomic/positioning.less +34 -0
  7. package/lib/atomic/sizing.less +76 -0
  8. package/lib/atomic/spacing.less +35 -75
  9. package/lib/atomic/typography.less +52 -13
  10. package/lib/atomic/width.less +27 -0
  11. package/lib/base/body.less +2 -4
  12. package/lib/base/configuration-static.less +3 -3
  13. package/lib/base/internal.less +3 -5
  14. package/lib/base/reset-normalize.less +1 -1
  15. package/lib/components/activity-indicator/activity-indicator.less +1 -17
  16. package/lib/components/avatar/avatar.less +2 -2
  17. package/lib/components/badge/badge.less +179 -173
  18. package/lib/components/banner/banner.less +11 -10
  19. package/lib/components/bling/bling.less +130 -0
  20. package/lib/components/button/button.less +233 -376
  21. package/lib/components/button-group/button-group.less +2 -1
  22. package/lib/components/checkbox_radio/checkbox_radio.less +195 -113
  23. package/lib/components/code-block/code-block.fixtures.ts +2 -2
  24. package/lib/components/code-block/code-block.less +1 -1
  25. package/lib/components/description/description.less +15 -1
  26. package/lib/components/empty-state/empty-state.less +17 -6
  27. package/lib/components/form-group/form-group.less +25 -0
  28. package/lib/components/input-icon/input-icon.less +3 -3
  29. package/lib/components/input_textarea/input_textarea.less +71 -58
  30. package/lib/components/menu/menu.less +83 -21
  31. package/lib/components/modal/modal.less +10 -10
  32. package/lib/components/navigation/navigation.less +62 -37
  33. package/lib/components/notice/notice.less +89 -74
  34. package/lib/components/pagination/pagination.less +44 -43
  35. package/lib/components/popover/popover.less +8 -10
  36. package/lib/components/post-summary/post-summary.less +6 -5
  37. package/lib/components/progress-bar/progress-bar.less +1 -1
  38. package/lib/components/prose/prose.less +5 -5
  39. package/lib/components/select/select.less +26 -37
  40. package/lib/components/sidebar-widget/sidebar-widget.less +2 -2
  41. package/lib/components/table/table.less +0 -8
  42. package/lib/components/tag/tag.less +69 -71
  43. package/lib/components/toast/toast.less +4 -2
  44. package/lib/components/topbar/topbar.less +4 -4
  45. package/lib/components/user-card/user-card.less +118 -92
  46. package/lib/components/vote/vote.less +134 -0
  47. package/lib/exports/color-sets.less +78 -77
  48. package/lib/exports/constants-helpers.less +4 -8
  49. package/lib/exports/constants-type.less +18 -36
  50. package/lib/exports/mixins.less +71 -0
  51. package/lib/stacks-static.less +7 -5
  52. package/lib/test/visual-test-utils.ts +42 -10
  53. package/lib/tsconfig.json +1 -1
  54. package/package.json +1 -1
  55. package/lib/atomic/width-height.less +0 -194
  56. package/lib/components/award-bling/award-bling.less +0 -32
  57. package/lib/components/check-control/check-control.less +0 -17
  58. package/lib/components/check-group/check-group.less +0 -19
  59. package/lib/components/skeleton/skeleton.less +0 -73
  60. package/lib/exports/spacing-mixins.less +0 -67
@@ -1,25 +1,4 @@
1
- //
2
- // STACK OVERFLOW
3
- // FLEXBOX HELPERS
4
- //
5
- // This CSS comes from Stacks, our CSS & Pattern library for rapidly building
6
- // Stack Overflow. For documentation of all these classes and how to contribute,
7
- // visit https://stackoverflow.design/
8
- //
9
- // TABLE OF CONTENTS
10
- // • VARIABLES
11
- // • MIXINS
12
- // • FLEX ELEMENTS
13
- // • FLEX SPACING
14
- // • MODIFICATIONS
15
- // • ATOMIC
16
- // • DEPRECATED
17
- //
18
- // ============================================================================
19
- // -- STACKS FLEX LAYOUT MIXINS
20
- // ============================================================================
21
- // -- FIXED COLUMN WIDTHS
22
- // ----------------------------------------------------------------------------
1
+ @import (reference) "../base/internal.less";
23
2
 
24
3
  #stacks-internals() {
25
4
  #flex-builder-settings() {
@@ -321,19 +300,15 @@
321
300
  .ac-start { align-content: flex-start !important; }
322
301
  .ac-stretch { align-content: stretch !important; }
323
302
 
324
- // -- ALIGN ITEMS
325
- // Defines the default behavior for how child items align along
326
- // the parent's cross axis. Think of it the cross-axis for
327
- // justify-content.
328
- // ----------------------------------------------------------------------------
303
+ // Align items
329
304
  #stacks-internals #build-classes(
330
- responsive,
331
305
  '.ai',
332
306
  {
333
307
  .template(@value) when (@value=start), (@value=end) { align-items: ~"flex-@{value}" !important; }
334
308
  .template(@value) when (default()) { align-items: @value !important; };
335
309
  },
336
- baseline center end start stretch
310
+ baseline center end start stretch,
311
+ true
337
312
  );
338
313
 
339
314
  // -- CENTER ITEMS
@@ -345,18 +320,15 @@
345
320
  .ai-center;
346
321
  }
347
322
 
348
- // -- ALIGN SELF
349
- // Allows child containers to re-align themselves regardless
350
- // of the parent's main axis direction.
351
- // ----------------------------------------------------------------------------
323
+ // Align self
352
324
  #stacks-internals #build-classes(
353
- responsive,
354
325
  '.as',
355
326
  {
356
327
  .template(@value) when (@value=start), (@value=end) { align-self: ~"flex-@{value}" !important; }
357
328
  .template(@value) when (default()) { align-self: @value !important; };
358
329
  },
359
330
  auto baseline center end start stretch
331
+ true
360
332
  );
361
333
 
362
334
  // -- FLEX
@@ -0,0 +1,22 @@
1
+ @import (reference) "../base/internal.less";
2
+ @import (reference) "../exports/mixins.less";
3
+
4
+ // `height` properties
5
+ .generate-sizing('.h', height, 0 1 2 4 6 8 12 16 24 32 48 64 96 128, 'px');
6
+ .generate-su-sizing('.hs', height); // Static sizing units
7
+ #stacks-internals #responsify('.h100', { height: 100% !important; });
8
+ #stacks-internals #responsify('.h-auto', { height: auto !important; });
9
+ #stacks-internals #responsify('.h-screen', { height: 100vh !important; });
10
+
11
+ // `min-height` properties
12
+ .generate-sizing('.hmn', min-height, 0, 'px', false, true);
13
+ .generate-su-sizing('.hmn', min-height); // Static sizing units
14
+ #stacks-internals #responsify('.hmn100', { min-height: 100% !important; });
15
+ #stacks-internals #responsify('.hmn-initial', { min-height: initial !important; });
16
+ #stacks-internals #responsify('.hmn-screen', { min-height: 100vh !important; });
17
+
18
+ // `max-height` properties
19
+ .generate-su-sizing('.hmx', max-height); // Static sizing units
20
+ #stacks-internals #responsify('.hmx100', { max-height: 100% !important; });
21
+ #stacks-internals #responsify('.hmx-initial', { max-height: initial !important; });
22
+ #stacks-internals #responsify('.hmx-screen', { max-height: 100vh !important; });
@@ -67,6 +67,26 @@
67
67
  // ----------------------------------------------------------------------------
68
68
  .bg-image-none { background-image: none !important; }
69
69
 
70
+ .bg-loading {
71
+ animation: loadingBgAnimation 1.5s ease-out infinite;
72
+ animation-delay: 1ms;
73
+ }
74
+
75
+ @keyframes loadingBgAnimation {
76
+ 0% {
77
+ background-color: var(--black-150);
78
+ opacity: 1;
79
+ }
80
+ 50% {
81
+ background-color: var(--black-100);
82
+ opacity: 0.7;
83
+ }
84
+ 100% {
85
+ background-color: var(--black-150);
86
+ opacity: 1;
87
+ }
88
+ }
89
+
70
90
  .bg-confetti-animated {
71
91
  background-repeat: repeat-x;
72
92
  background-position: top -10px center;
@@ -155,21 +175,6 @@
155
175
  user-select: none !important;
156
176
  }
157
177
 
158
- // ============================================================================
159
- // $ USER DRAG
160
- // ----------------------------------------------------------------------------
161
- .ud-auto {
162
- -webkit-user-drag: auto !important;
163
- -moz-user-drag: auto !important;
164
- -ms-user-drag: auto !important;
165
- }
166
-
167
- .ud-none {
168
- -webkit-user-drag: none !important;
169
- -moz-user-drag: none !important;
170
- -ms-user-drag: none !important;
171
- }
172
-
173
178
  // ============================================================================
174
179
  // $ VISIBILITY
175
180
  // ----------------------------------------------------------------------------
@@ -179,6 +184,7 @@
179
184
  // Borrowed from Wordpress
180
185
  // https://make.wordpress.org/accessibility/2015/02/09/hiding-text-for-screen-readers-with-wordpress-core/
181
186
  border: 0;
187
+ /* stylelint-disable-next-line property-no-deprecated -- clip is kept for older browser compatibility alongside clip-path */
182
188
  clip: rect(var(--su-static1), var(--su-static1), var(--su-static1), var(--su-static1)); // rect(1px, 1px, 1px, 1px)
183
189
  clip-path: inset(50%);
184
190
  height: var(--su-static1);
@@ -0,0 +1,34 @@
1
+ @import (reference) "../base/internal.less";
2
+ @import (reference) "../exports/mixins.less";
3
+
4
+ @px-values: 0 1 2 4 6 8 12 16 24 32 48 64 96 128;
5
+ @px-values-negative: 1 2 4 6 8 12 16 24 32 48 64 96 128;
6
+ @percent-values: 50 100;
7
+
8
+ // POSITIONING
9
+ // Inset
10
+ .generate-sizing('.i', inset, @px-values, 'px');
11
+
12
+ // Top
13
+ .generate-sizing('.t', top, @px-values, 'px', true);
14
+ .generate-sizing('.tn', top, @px-values-negative, 'px', true, true);
15
+ .generate-sizing('.t', top, @percent-values, 'percent', true);
16
+ .generate-sizing('.tn', top, @percent-values, 'percent', true, true);
17
+
18
+ // Right
19
+ .generate-sizing('.r', right, @px-values, 'px', true);
20
+ .generate-sizing('.rn', right, @px-values-negative, 'px', true, true);
21
+ .generate-sizing('.r', right, @percent-values, 'percent', true);
22
+ .generate-sizing('.rn', right, @percent-values, 'percent', true, true);
23
+
24
+ // Bottom
25
+ .generate-sizing('.b', bottom, @px-values, 'px', true);
26
+ .generate-sizing('.bn', bottom, @px-values-negative, 'px', true, true);
27
+ .generate-sizing('.b', bottom, @percent-values, 'percent', true);
28
+ .generate-sizing('.bn', bottom, @percent-values, 'percent', true, true);
29
+
30
+ // Left
31
+ .generate-sizing('.l', left, @px-values, 'px', true);
32
+ .generate-sizing('.ln', left, @px-values-negative, 'px', true, true);
33
+ .generate-sizing('.l', left, @percent-values, 'percent', true);
34
+ .generate-sizing('.ln', left, @percent-values, 'percent', true, true);
@@ -0,0 +1,76 @@
1
+ @import (reference) "../base/internal.less";
2
+
3
+ // SIZING UNITS CSS CUSTOM PROPERTIES
4
+ body {
5
+ --su0: 0;
6
+ --su1: clamp(1px, 0.063rem, 0.063rem); // This ensures `--su1` never drops below 1px by setting the clamp MIN value to `--su-static1` (1px).
7
+ --su2: 0.125rem;
8
+ --su4: 0.25rem;
9
+ --su6: 0.375rem;
10
+ --su8: 0.5rem;
11
+ --su12: 0.75rem;
12
+ --su16: 1rem;
13
+ --su24: 1.5rem;
14
+ --su32: 2rem;
15
+ --su48: 3rem;
16
+ --su64: 4rem;
17
+ --su96: 6rem;
18
+ --su128: 8rem;
19
+ --su256: 16rem;
20
+ --su344: 21.5rem;
21
+ --su448: 28rem;
22
+ --su512: 32rem;
23
+ --su640: 40rem;
24
+ --su768: 48rem;
25
+ --su848: 53rem;
26
+ --su960: 60rem;
27
+ --su1024: 64rem;
28
+ --su1120: 70rem;
29
+ --su1280: 80rem;
30
+ --su-max: var(--su1280);
31
+ --s-full: 79rem; // Legacy sizing units for Stacks v2
32
+ --s-step: calc(var(--s-full) / 12); // Legacy sizing units for Stacks v2
33
+
34
+ // Negative sizing
35
+ // This is a common subset sizing units for negative values
36
+ --sun1: calc(var(--su1) * -1);
37
+ --sun2: calc(var(--su2) * -1);
38
+ --sun4: calc(var(--su4) * -1);
39
+ --sun6: calc(var(--su6) * -1);
40
+ --sun8: calc(var(--su8) * -1);
41
+ --sun12: calc(var(--su12) * -1);
42
+ --sun16: calc(var(--su16) * -1);
43
+ --sun24: calc(var(--su24) * -1);
44
+ --sun32: calc(var(--su32) * -1);
45
+ --sun48: calc(var(--su48) * -1);
46
+ --sun64: calc(var(--su64) * -1);
47
+ --sun96: calc(var(--su96) * -1);
48
+ --sun128: calc(var(--su128) * -1);
49
+
50
+ // Static (aka px) sizing units
51
+ --su-static0: 0px;
52
+ --su-static1: 1px;
53
+ --su-static2: 2px;
54
+ --su-static4: 4px;
55
+ --su-static6: 6px;
56
+ --su-static8: 8px;
57
+ --su-static12: 12px;
58
+ --su-static16: 16px;
59
+ --su-static24: 24px;
60
+ --su-static32: 32px;
61
+ --su-static48: 48px;
62
+ --su-static64: 64px;
63
+ --su-static96: 96px;
64
+ --su-static128: 128px;
65
+ --su-static256: 256px;
66
+ --su-static344: 344px;
67
+ --su-static448: 448px;
68
+ --su-static512: 512px;
69
+ --su-static640: 640px;
70
+ --su-static768: 768px;
71
+ --su-static848: 848px;
72
+ --su-static960: 960px;
73
+ --su-static1024: 1024px;
74
+ --su-static1120: 1120px;
75
+ --su-static1280: 1280px;
76
+ }
@@ -1,98 +1,58 @@
1
1
  @import (reference) "../base/internal.less";
2
- @import (reference) "../exports/spacing-mixins.less";
2
+ @import (reference) "../exports/mixins.less";
3
3
 
4
- // SPACING UNITS CSS CUSTOM PROPERTIES
5
- body {
6
- --su-base: 1;
7
- --su-static0: 0px;
8
- --su-static1: 1px;
9
- --su-static2: 2px;
10
- --su-static4: 4px;
11
- --su-static6: 6px;
12
- --su-static8: 8px;
13
- --su-static12: 12px;
14
- --su-static16: 16px;
15
- --su-static24: 24px;
16
- --su-static32: 32px;
17
- --su-static48: 48px;
18
- --su-static64: 64px;
19
- --su-static96: 96px;
20
- --su-static128: 128px;
21
-
22
- --su0: var(--su-static0);
23
- // This ensures `--su1` never drops below 1px by setting the clamp MIN value to `--su-static1` (1px).
24
- --su1: clamp(var(--su-static1), calc(var(--su-static1) * var(--su-base)), calc(var(--su-static1) * var(--su-base)));
25
- --su2: calc(var(--su-static2) * var(--su-base));
26
- --su4: calc(var(--su-static4) * var(--su-base));
27
- --su6: calc(var(--su-static6) * var(--su-base));
28
- --su8: calc(var(--su-static8) * var(--su-base));
29
- --su12: calc(var(--su-static12) * var(--su-base));
30
- --su16: calc(var(--su-static16) * var(--su-base));
31
- --su24: calc(var(--su-static24) * var(--su-base));
32
- --su32: calc(var(--su-static32) * var(--su-base));
33
- --su48: calc(var(--su-static48) * var(--su-base));
34
- --su64: calc(var(--su-static64) * var(--su-base));
35
- --su96: calc(var(--su-static96) * var(--su-base));
36
- --su128: calc(var(--su-static128) * var(--su-base));
37
- }
4
+ @px-values: 0 1 2 4 6 8 12 16 24 32 48 64 96 128;
5
+ @px-values-negative: 1 2 4 6 8 12 16 24 32 48 64 96 128;
6
+ @percent-values: 50 100;
38
7
 
39
8
  // MARGIN
40
- // Margin
41
9
  .m-auto { margin: auto !important; }
42
- .generate-spacing('.m', margin, true);
43
- .generate-spacing('.m', margin, true, percent);
10
+ .generate-sizing('.m', margin, @px-values, 'px', true);
11
+ .generate-sizing('.mn', margin, @px-values-negative, 'px', true, true);
12
+ .generate-sizing('.m', margin, @percent-values, 'percent', true);
13
+ .generate-sizing('.mn', margin, @percent-values, 'percent', true, true);
44
14
 
45
15
  // Margin top
46
16
  .mt-auto { margin-top: auto !important; }
47
- .generate-spacing('.mt', margin-top, true);
48
- .generate-spacing('.mt', margin-top, true, percent);
17
+ .generate-sizing('.mt', margin-top, @px-values, 'px', true);
18
+ .generate-sizing('.mtn', margin-top, @px-values-negative, 'px', true, true);
19
+ .generate-sizing('.mt', margin-top, @percent-values, 'percent', true);
20
+ .generate-sizing('.mtn', margin-top, @percent-values, 'percent', true, true);
49
21
 
50
22
  // Margin right
51
23
  .mr-auto { margin-right: auto !important; }
52
- .generate-spacing('.mr', margin-right, true);
53
- .generate-spacing('.mr', margin-right, true, percent);
24
+ .generate-sizing('.mr', margin-right, @px-values, 'px', true);
25
+ .generate-sizing('.mrn', margin-right, @px-values-negative, 'px', true, true);
26
+ .generate-sizing('.mr', margin-right, @percent-values, 'percent', true);
27
+ .generate-sizing('.mrn', margin-right, @percent-values, 'percent', true, true);
54
28
 
55
29
  // Margin bottom
56
30
  .mb-auto { margin-bottom: auto !important; }
57
- .generate-spacing('.mb', margin-bottom, true);
58
- .generate-spacing('.mb', margin-bottom, true, percent);
31
+ .generate-sizing('.mb', margin-bottom, @px-values, 'px', true);
32
+ .generate-sizing('.mbn', margin-bottom, @px-values-negative, 'px', true, true);
33
+ .generate-sizing('.mb', margin-bottom, @percent-values, 'percent', true);
34
+ .generate-sizing('.mbn', margin-bottom, @percent-values, 'percent', true, true);
59
35
 
60
36
  // Margin left
61
37
  .ml-auto { margin-left: auto !important; }
62
- .generate-spacing('.ml', margin-left, true);
63
- .generate-spacing('.ml', margin-left, true, percent);
38
+ .generate-sizing('.ml', margin-left, @px-values, 'px', true);
39
+ .generate-sizing('.mln', margin-left, @px-values-negative, 'px', true, true);
40
+ .generate-sizing('.ml', margin-left, @percent-values, 'percent', true);
41
+ .generate-sizing('.mln', margin-left, @percent-values, 'percent', true, true);
64
42
 
65
43
  // Margin x-axis, y-axis
66
44
  .mx-auto { margin-left: auto !important; margin-right: auto !important; }
67
45
  .my-auto { margin-top: auto !important; margin-bottom: auto !important; }
68
- .generate-spacing('.mx'; margin-left, margin-right; true);
69
- .generate-spacing('.my'; margin-top, margin-bottom; true);
46
+ .generate-sizing('.mx'; margin-left, margin-right; @px-values; 'px'; true);
47
+ .generate-sizing('.mxn'; margin-left, margin-right; @px-values-negative; 'px'; true; true);
48
+ .generate-sizing('.my'; margin-top, margin-bottom; @px-values; 'px'; true);
49
+ .generate-sizing('.myn'; margin-top, margin-bottom; @px-values-negative; 'px'; true; true);
70
50
 
71
51
  // PADDING
72
- .generate-spacing('.p', padding);
73
- .generate-spacing('.pt', padding-top);
74
- .generate-spacing('.pr', padding-right);
75
- .generate-spacing('.pb', padding-bottom);
76
- .generate-spacing('.pl', padding-left);
77
- .generate-spacing('.px'; padding-left, padding-right);
78
- .generate-spacing('.py'; padding-top, padding-bottom);
79
-
80
- // POSITIONING
81
- // Inset
82
- .generate-spacing('.i', inset);
83
-
84
- // Top
85
- .generate-spacing('.t', top, true);
86
- .generate-spacing('.t', top, true, percent);
87
-
88
- // Right
89
- .generate-spacing('.r', right, true);
90
- .generate-spacing('.r', right, true, percent);
91
-
92
- // Bottom
93
- .generate-spacing('.b', bottom, true);
94
- .generate-spacing('.b', bottom, true, percent);
95
-
96
- // Left
97
- .generate-spacing('.l', left, true);
98
- .generate-spacing('.l', left, true, percent);
52
+ .generate-sizing('.p', padding, @px-values, 'px', true);
53
+ .generate-sizing('.pt', padding-top, @px-values, 'px', true);
54
+ .generate-sizing('.pr', padding-right, @px-values, 'px', true);
55
+ .generate-sizing('.pb', padding-bottom, @px-values, 'px', true);
56
+ .generate-sizing('.pl', padding-left, @px-values, 'px', true);
57
+ .generate-sizing('.px'; padding-left, padding-right; @px-values; 'px'; true);
58
+ .generate-sizing('.py'; padding-top, padding-bottom; @px-values; 'px'; true);
@@ -26,19 +26,58 @@ p {
26
26
  // $ TEXT SIZES
27
27
  // ----------------------------------------------------------------------------
28
28
  // Declare font sizes
29
- .fs-display4 { font-size: var(--fs-display4) !important; }
30
- .fs-display3 { font-size: var(--fs-display3) !important; }
31
- .fs-display2 { font-size: var(--fs-display2) !important; }
32
- .fs-display1 { font-size: var(--fs-display1) !important; }
33
- .fs-headline2 { font-size: var(--fs-headline2) !important; }
34
- .fs-headline1 { font-size: var(--fs-headline1) !important; }
35
- .fs-title { font-size: var(--fs-title) !important; }
36
- .fs-subheading { font-size: var(--fs-subheading) !important; }
37
- .fs-body3 { font-size: var(--fs-body3) !important; }
38
- .fs-body2 { font-size: var(--fs-body2) !important; }
39
- .fs-body1 { font-size: var(--fs-body1) !important; }
40
- .fs-caption { font-size: var(--fs-caption) !important; }
41
- .fs-fine { font-size: var(--fs-fine) !important; }
29
+ .fs-display4 {
30
+ font-size: var(--fs-display4) !important;
31
+ line-height: 1.18;
32
+ }
33
+ .fs-display3 {
34
+ font-size: var(--fs-display3) !important;
35
+ line-height: 1.20;
36
+ }
37
+ .fs-display2 {
38
+ font-size: var(--fs-display2) !important;
39
+ line-height: 1.28;
40
+ }
41
+ .fs-display1 {
42
+ font-size: var(--fs-display1) !important;
43
+ line-height: 1.34;
44
+ }
45
+ .fs-headline2 {
46
+ font-size: var(--fs-headline2) !important;
47
+ line-height: 1.40;
48
+ }
49
+ .fs-headline1 {
50
+ font-size: var(--fs-headline1) !important;
51
+ line-height: 1.40;
52
+ }
53
+ .fs-title {
54
+ font-size: var(--fs-title) !important;
55
+ line-height: 1.40;
56
+ }
57
+ .fs-subheading {
58
+ font-size: var(--fs-subheading) !important;
59
+ line-height: 1.40;
60
+ }
61
+ .fs-body3 {
62
+ font-size: var(--fs-body3) !important;
63
+ line-height: 1.40;
64
+ }
65
+ .fs-body2 {
66
+ font-size: var(--fs-body2) !important;
67
+ line-height: 1.40;
68
+ }
69
+ .fs-body1 {
70
+ font-size: var(--fs-body1) !important;
71
+ line-height: 1.40;
72
+ }
73
+ .fs-caption {
74
+ font-size: var(--fs-caption) !important;
75
+ line-height: 1.40;
76
+ }
77
+ .fs-fine {
78
+ font-size: var(--fs-fine) !important;
79
+ line-height: 1.36;
80
+ }
42
81
 
43
82
  #stacks-internals #screen-sm({
44
83
  .fs-display4 { font-size: calc(var(--fs-display4) * .43) !important; } // 43px
@@ -0,0 +1,27 @@
1
+ @import (reference) "../base/internal.less";
2
+ @import (reference) "../exports/mixins.less";
3
+
4
+ // `width` properties
5
+ .generate-sizing('.w', width, 0 1 2 4 6 8 12 16 24 32 48 64 96 128, 'px');
6
+ .generate-su-sizing('.ws', width); // Static sizing units
7
+ .generate-sizing('.w', width, 10 20 30 40 60 70 80 90, 'percent');
8
+ .generate-sizing('.w', width, 25 50 75 100, 'percent', true); // responsive
9
+ #stacks-internals #responsify('.w33', { width: calc(100% / 3) !important; });
10
+ #stacks-internals #responsify('.w66', { width: calc(100% / 3 * 2) !important; });
11
+ #stacks-internals #responsify('.w-auto', { width: auto !important; });
12
+ #stacks-internals #responsify('.w-screen', { width: 100vw !important; });
13
+
14
+ // `min-width` properties
15
+ .generate-sizing('.wmn', min-width, 0, 'px');
16
+ .generate-su-sizing('.wmn', min-width); // Static sizing units
17
+ .generate-sizing('.wmn', min-width, 25 50 75, 'percent');
18
+ #stacks-internals #responsify('.wmn100', { min-width: 100% !important; });
19
+ #stacks-internals #responsify('.wmn-initial', { min-width: initial !important; });
20
+ #stacks-internals #responsify('.wmn-screen', { min-width: 100vw !important; });
21
+
22
+ // `max-width` properties
23
+ .generate-su-sizing('.wmx', max-width); // Static sizing units
24
+ .generate-sizing('.wmx', max-width, 25 50 75, 'percent');
25
+ #stacks-internals #responsify('.wmx100', { max-width: 100% !important; });
26
+ #stacks-internals #responsify('.wmx-initial', { max-width: initial !important; });
27
+ #stacks-internals #responsify('.wmx-screen', { max-width: 100vw !important; });
@@ -20,20 +20,18 @@ html,
20
20
  body {
21
21
  color: var(--theme-body-font-color, var(--black-600));
22
22
  font-family: var(--theme-body-font-family);
23
- font-size: var(--fs-base);
24
23
  line-height: var(--lh-base);
25
24
  }
26
25
 
27
26
  body {
27
+ background-color: var(--theme-background-color, var(--white));
28
28
  box-sizing: border-box;
29
+ font-size: var(--fs-body1);
29
30
  min-height: 100%;
30
- background-color: var(--theme-background-color, var(--white));
31
31
 
32
32
  *,
33
33
  *:before,
34
34
  *:after {
35
35
  box-sizing: inherit;
36
36
  }
37
-
38
- // TODO SHINE set max width here
39
37
  }
@@ -13,14 +13,14 @@
13
13
  // legal options are `meyer` for the Eric Meyer reset, and `none` if no CSS reset should be compiled in.
14
14
  //
15
15
  //
16
- // #stacks-config-static { @breakpoints: 1264px, 980px, 640px; }
16
+ // #stacks-config-static { @breakpoints: 92.25rem, 71.875rem, 48.75rem; }
17
17
  //
18
18
  // @breakpoints is a list of values "optional_selector1, large_breakpoint1, medium_breakpoint1, small_breakpoint1, optional_selector2, ..."
19
19
  //
20
20
  // Example:
21
21
  //
22
22
  // @breakpoints:
23
- // 1264px, 980px, 640px,
23
+ // 92.25rem, 71.875rem, 48.75rem,
24
24
  // 'html.smaller_breakpoints', 1164px, 880px, 540px,
25
25
  // 'html.even_smaller_breakpoints', 200px, 100px, 50px;
26
26
  //
@@ -37,7 +37,7 @@
37
37
  // ...
38
38
  // </html>
39
39
  //
40
- // With the example @breakpoints setting from above, this <div> will be hidden below 1264px even though the smaller_breakpoints class
40
+ // With the example @breakpoints setting from above, this <div> will be hidden below 92.25rem even though the smaller_breakpoints class
41
41
  // is on the root element, because the selector-free breakpoint group still applies.
42
42
  //
43
43
  // Any selector, if given, MUST select the root (html) element.
@@ -164,12 +164,10 @@
164
164
  // ---------------------------------------------------------------------------
165
165
 
166
166
 
167
- #build-classes(@class-prefix, @rules, @values) {
168
- #stacks-internals #build-classes-with-start-index(@class-prefix, @rules, 1, false, @values);
169
- }
170
- #build-classes(responsive, @class-prefix, @rules, @values) {
171
- #stacks-internals #build-classes-with-start-index(@class-prefix, @rules, 1, true, @values);
167
+ #build-classes(@class-prefix, @rules, @values, @responsive: false) {
168
+ #stacks-internals #build-classes-with-start-index(@class-prefix, @rules, 1, @responsive, @values);
172
169
  }
170
+
173
171
  #build-classes-with-start-index(@class-prefix, @rules, @start-index, @responsive, @values) when (@start-index <= length(@values)) {
174
172
  @val: extract(@values, @start-index);
175
173
  & when (isnumber(@val)) {
@@ -375,7 +375,7 @@ textarea {
375
375
 
376
376
  [type="search"] {
377
377
  -webkit-appearance: textfield; /* 1 */
378
- outline-offset: calc(var(--su-static2) * -1); // -2px - /* 2 */
378
+ outline-offset: var(--sun2);
379
379
  }
380
380
 
381
381
  /**
@@ -4,34 +4,18 @@
4
4
  --_ai-min-size: var(--su-static16);
5
5
  --_ai-p: 0 calc(var(--su-static4) - var(--su-static1));
6
6
 
7
- .highcontrast-mode({
8
- --_ai-bg: var(--theme-secondary-500);
9
- });
10
-
11
7
  // VARIANTS
12
8
  &&__danger {
13
9
  --_ai-bg: var(--red-400);
14
-
15
- .highcontrast-mode({
16
- --_ai-bg: var(--red-500);
17
- });
18
10
  }
19
11
 
20
12
  &&__success {
21
13
  --_ai-bg: var(--green-400);
22
14
 
23
- .highcontrast-mode({
24
- --_ai-bg: var(--green-500);
25
- });
26
15
  }
27
16
 
28
17
  &&__warning {
29
18
  --_ai-bg: var(--yellow-400);
30
-
31
- .highcontrast-mode({
32
- --_ai-bg: var(--yellow-500); // needs to be here to override default high contrast
33
- --_ai-fc: var(--white);
34
- });
35
19
  }
36
20
 
37
21
  &&__sm {
@@ -45,7 +29,7 @@
45
29
  min-height: var(--_ai-min-size);
46
30
  padding: var(--_ai-p);
47
31
 
48
- border-radius: 1000px;
32
+ border-radius: var(--br-pill);
49
33
  display: inline-flex;
50
34
  font-size: var(--fs-fine);
51
35
  font-weight: 600;
@@ -58,9 +58,9 @@
58
58
 
59
59
  // CHILD ELEMENTS
60
60
  & &--badge {
61
- bottom: calc(var(--su-static4) * -1); // -4px
61
+ bottom: var(--sun4);
62
62
  position: absolute;
63
- right: calc(var(--su-static4) * -1); // -4px
63
+ right: var(--sun4);
64
64
  -webkit-transform: scale(var(--_av-scale-badge));
65
65
  transform: scale(var(--_av-scale-badge));
66
66
  }