@stackoverflow/stacks 3.0.0-beta.0 → 3.0.0-beta.11

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 (47) hide show
  1. package/dist/css/stacks.css +1579 -1510
  2. package/dist/css/stacks.min.css +1 -1
  3. package/dist/js/stacks.js +0 -14
  4. package/dist/js/stacks.min.js +1 -1
  5. package/lib/atomic/border.less +2 -20
  6. package/lib/atomic/misc.less +1 -1
  7. package/lib/atomic/typography.less +13 -26
  8. package/lib/base/body.less +2 -7
  9. package/lib/components/activity-indicator/activity-indicator.less +17 -29
  10. package/lib/components/anchor/anchor.less +1 -1
  11. package/lib/components/avatar/avatar.less +9 -11
  12. package/lib/components/badge/badge.less +156 -177
  13. package/lib/components/bling/bling.less +130 -0
  14. package/lib/components/block-link/block-link.less +1 -1
  15. package/lib/components/button/button.less +222 -374
  16. package/lib/components/button-group/button-group.less +1 -1
  17. package/lib/components/card/card.less +1 -1
  18. package/lib/components/checkbox_radio/checkbox_radio.less +13 -11
  19. package/lib/components/input-icon/input-icon.less +3 -3
  20. package/lib/components/input_textarea/input_textarea.less +70 -58
  21. package/lib/components/link/link.less +1 -1
  22. package/lib/components/link-preview/link-preview.less +6 -6
  23. package/lib/components/menu/menu.less +100 -21
  24. package/lib/components/modal/modal.less +11 -11
  25. package/lib/components/navigation/navigation.less +61 -37
  26. package/lib/components/notice/notice.less +1 -1
  27. package/lib/components/pagination/pagination.less +44 -43
  28. package/lib/components/popover/popover.less +3 -103
  29. package/lib/components/popover/popover.ts +0 -6
  30. package/lib/components/popover/tooltip.ts +0 -12
  31. package/lib/components/post-summary/post-summary.less +4 -3
  32. package/lib/components/progress-bar/progress-bar.less +13 -12
  33. package/lib/components/prose/prose.less +2 -2
  34. package/lib/components/select/select.less +26 -37
  35. package/lib/components/skeleton/skeleton.less +1 -1
  36. package/lib/components/tag/tag.less +59 -70
  37. package/lib/components/toggle-switch/toggle-switch.less +4 -2
  38. package/lib/components/topbar/topbar.less +3 -3
  39. package/lib/components/uploader/uploader.less +3 -3
  40. package/lib/exports/color-mixins.less +13 -3
  41. package/lib/exports/color-sets.less +256 -216
  42. package/lib/exports/constants-helpers.less +5 -3
  43. package/lib/exports/constants-type.less +25 -25
  44. package/lib/exports/mixins.less +2 -2
  45. package/lib/stacks-static.less +1 -1
  46. package/package.json +1 -1
  47. package/lib/components/award-bling/award-bling.less +0 -31
@@ -1,13 +1,13 @@
1
1
  .s-select {
2
- --_se-arrow-bc: currentColor transparent;
3
- --_se-arrow-size: var(--su-static4); // Constant
2
+ --_se-arrow-fc: currentColor;
4
3
  --_se-select-bc: var(--bc-darker);
5
4
  --_se-select-bg: var(--white);
6
5
  --_se-select-br: var(--br-md);
7
6
  --_se-select-fc: var(--black);
8
7
  --_se-select-px: 0.7em;
9
- --_se-select-py: 0.6em;
8
+ --_se-select-py: var(--su-static8);
10
9
  --_se-select-fs: var(--fs-body1);
10
+ --_se-select-lh: var(--lh-base);
11
11
 
12
12
  // CONTEXTUAL STYLES
13
13
  @supports (-webkit-overflow-scrolling: touch) {
@@ -23,30 +23,15 @@
23
23
 
24
24
  .validation-states(se-select);
25
25
 
26
- .is-disabled & {
27
- --_se-arrow-bc: var(--bc-dark) transparent;
28
- }
29
-
30
26
  &&__sm {
31
27
  .size-styles(sm; se-select; @styles: fs);
32
- // --_se-select-fs: var(--fs-caption);
33
- }
34
-
35
- &&__md {
36
- .size-styles(md; se-select; @styles: br, fs);
37
- --_se-select-py: 0.5em;
28
+ --_se-select-lh: var(--lh-sm);
29
+ --_se-select-py: calc(var(--su6) - var(--su-static1) / 2);
38
30
  }
39
31
 
40
32
  &&__lg {
41
- .size-styles(lg; se-select; @styles: br, fs);
42
- --_se-select-px: 0.6em;
43
- --_se-select-py: 0.45em;
44
- }
45
-
46
- &&__xl {
47
- .size-styles(xl; se-select; @styles: br, fs);
48
- --_se-select-px: 0.5em;
49
- --_se-select-py: 0.4em;
33
+ .size-styles(md; se-select; @styles: fs);
34
+ --_se-select-lh: var(--lh-lg);
50
35
  }
51
36
 
52
37
  // CHILD ELEMENTS
@@ -55,26 +40,29 @@
55
40
  .webkit-autofill();
56
41
  }
57
42
 
58
- &:before,
59
- &:after { // menu arrows
60
- border-color: var(--_se-arrow-bc);
61
- border-style: solid;
62
- border-width: var(--_se-arrow-size);
43
+ &:after { // Chevron16UpDown icon
44
+ background-color: currentColor;
63
45
  content: "";
46
+ height: var(--su-static16);
47
+ mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M13.06 10 8 15.06 2.94 10 4 8.94l.53.53L8 12.94l3.47-3.47.53-.53zm0-4L12 7.06l-.53-.53L8 3.06 4.53 6.53 4 7.06 2.94 6 8 .94z'/%3E%3C/svg%3E");
48
+ mask-repeat: no-repeat;
49
+ mask-position: center;
50
+ mask-size: contain;
64
51
  pointer-events: none;
65
52
  position: absolute;
66
- right: calc(var(--su-static12) + var(--su-static1));
53
+ right: calc(var(--su32) - var(--su-static24));
54
+ top: 50%;
55
+ transform: translateY(-50%);
56
+ width: var(--su-static16);
67
57
  z-index: var(--zi-selected);
68
58
  }
69
59
 
70
- &:after {
71
- border-bottom-width: 0;
72
- top: calc(50% + var(--su-static1));
73
- }
60
+ .is-disabled & {
61
+ --_se-arrow-fc: var(--bc-dark);
74
62
 
75
- &:before {
76
- border-top-width: 0;
77
- top: calc(50% - calc(var(--_se-arrow-size) + var(--su-static1)));
63
+ &:after {
64
+ background-color: var(--_se-arrow-fc);
65
+ }
78
66
  }
79
67
 
80
68
  > select { // Menu
@@ -82,7 +70,8 @@
82
70
  fieldset[disabled] &,
83
71
  &[disabled] {
84
72
  cursor: not-allowed;
85
- opacity: var(--_o-disabled-static);
73
+ --_se-select-fc: var(--black-300);
74
+ --_se-select-bg: var(--black-100);
86
75
  }
87
76
 
88
77
  &[readonly],
@@ -118,7 +107,7 @@
118
107
  appearance: none;
119
108
  font-family: inherit;
120
109
  height: 100%; // Fill the height of its parent
121
- line-height: var(--lh-sm);
110
+ line-height: var(--_se-select-lh);
122
111
  outline: 0;
123
112
  padding-right: var(--su32);
124
113
  position: relative; // This prevents Firefox from requiring a second click to select options
@@ -45,7 +45,7 @@
45
45
  var(--_sk-bg-1) 83%
46
46
  );
47
47
  background-size: 400% 100%;
48
- border-radius: var(--br-lg);
48
+ border-radius: var(--br-md);
49
49
  display: block;
50
50
  height: var(--su16);
51
51
  position: relative;
@@ -2,84 +2,87 @@
2
2
  // Base
3
3
  --_ta-bc: var(--theme-tag-border-color, var(--_ta-bg));
4
4
  --_ta-bg: var(--theme-tag-background-color, var(--black-150));
5
- --_ta-fc: var(--theme-tag-color, var(--black-500));
5
+ --_ta-fc: var(--theme-tag-color, var(--black-600));
6
6
  // Hover
7
7
  --_ta-bc-hover: var(--theme-tag-hover-border-color, var(--_ta-bg-hover));
8
8
  --_ta-bg-hover: var(--theme-tag-hover-background-color, var(--black-200));
9
9
  --_ta-fc-hover: var(--theme-tag-hover-color, var(--black-600));
10
10
  // Other
11
- --_ta-br: var(--br-sm);
12
11
  --_ta-fs: var(--fs-caption);
13
- --_ta-lh: 1.846153846;
14
- --_ta-pl: var(--_ta-px);
15
- --_ta-pr: var(--_ta-px);
16
- --_ta-px: var(--su4);
17
- --_ta-dismiss-padding: calc(var(--_ta-px) - var(--su-static1));
12
+ --_ta-pb: calc(var(--_ta-pt) + var(--su1));
13
+ --_ta-pl: var(--su8);
14
+ --_ta-pr: var(--su8);
15
+ --_ta-pt: var(--su4);
18
16
 
19
17
  // CONTEXTUAL STYLES
20
18
  .highcontrast-mode({
21
19
  &:not(&__moderator):not(&__required) {
22
20
  --_ta-bc: var(--theme-tag-border-color, var(--black-300));
23
21
  --_ta-bc-hover: var(--theme-tag-hover-border-color, var(--black-300));
22
+
23
+ &.s-tag__ignored {
24
+ --_ta-fc: var(--black-500);
25
+ }
24
26
  }
25
27
  });
26
28
 
27
29
  // MODIFIERS
28
30
  // Sizes
29
- &&__xs {
30
- .size-styles(xs; ta; @styles: fs);
31
- --_ta-lh: 1.4;
32
- --_ta-px: var(--su2);
33
- }
34
31
  &&__sm {
35
- .size-styles(sm; ta; @styles: fs);
36
- --_ta-lh: 1.5;
37
- }
38
- &&__md {
39
- --_ta-px: var(--su6);
40
- --_ta-fs: var(--fs-body2);
41
- --_ta-lh: 1.733333333;
32
+ --_ta-pl: var(--su4);
33
+ --_ta-pr: var(--su4);
34
+ --_ta-pt: var(--su1);
42
35
  }
43
36
  &&__lg {
44
- --_ta-br: calc(var(--br-sm) + var(--su-static1));
45
- --_ta-fs: var(--fs-subheading);
46
- --_ta-lh: 1.684210526;
47
- --_ta-px: var(--su6);
37
+ --_ta-fs: var(--fs-body1);
38
+ --_ta-pt: var(--su4);
48
39
  }
49
40
 
50
41
  // VARIANTS
51
- // NOTE: ignored and watched variants are used in core with the .post-tag class (in place of the base tag .s-tag)
52
- &__ignored, // TODO: remove all single `&` ignored styles once core no longer requires them
53
42
  &&__ignored,
54
- &__watched, // TODO: remove all single `&` watched styles once core no longer requires them
55
43
  &&__watched {
56
- --_ta-pl: calc(var(--su-static24) - var(--su-static2)); // 22px
57
- --_ta-before-size: calc(var(--su-static16) - var(--su-static2)); // 14px
58
- // --_ta-before-icon defined per variant
59
-
60
44
  &:before {
61
- height: var(--_ta-before-size);
62
- width: var(--_ta-before-size);
45
+ // --_ta-before-icon defined per variant
63
46
  -webkit-mask: var(--_ta-before-icon) no-repeat center;
64
47
  mask: var(--_ta-before-icon) no-repeat center;
65
48
 
66
49
  background-color: currentColor;
67
50
  content: "";
68
51
  display: block;
69
- left: var(--su-static4);
70
- margin-right: var(--su2);
71
- position: absolute;
72
- top: calc(50% - calc(var(--su-static8) - var(--su-static1)));
52
+ height: calc(var(--su-static16) - var(--su-static2));
73
53
  -webkit-mask-size: contain;
74
- mask-size: contain;
54
+ mask-size: contain;
55
+ width: calc(var(--su-static16) - var(--su-static2));
75
56
  }
57
+ }
76
58
 
77
- position: relative;
59
+ &&__deleted,
60
+ &&__ignored {
61
+ &,
62
+ &.s-tag__required:not(&__moderator),
63
+ &.s-tag__moderator {
64
+ --_ta-bc-hover: var(--_ta-bc);
65
+ --_ta-bg-hover: var(--_ta-bg);
66
+ --_ta-fc-hover: var(--_ta-fc);
67
+ }
68
+ }
69
+
70
+ // TODO SHINE this is considered inaccessible. Discuss w/ design.
71
+ &&__deleted {
72
+ --_ta-fc: var(--black-500);
73
+
74
+ &.s-tag__required:not(&__moderator) {
75
+ --_ta-bc: var(--black-300);
76
+ --_ta-fc: var(--black-400);
77
+ }
78
78
  }
79
79
 
80
- &__ignored, // TODO: remove all single `&` ignored styles once core no longer requires them
80
+ // TODO SHINE this is considered inaccessible. Discuss w/ design.
81
81
  &&__ignored {
82
+ --_ta-bg-hover: var(--_ta-bg);
82
83
  --_ta-before-icon: url("data:image/svg+xml;,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M3.52 7.38 1.58 9.26A12.38 12.38 0 0 1 0 7s2.63-5.14 7.05-5.14c.66 0 1.28.12 1.86.32L7.44 3.6a3.48 3.48 0 0 0-3.92 3.78ZM5.3 9.99c.5.28 1.1.44 1.71.44 1.94 0 3.5-1.53 3.5-3.43 0-.62-.17-1.21-.47-1.72L8.7 6.6a1.73 1.73 0 0 1-2.08 2.07L5.29 10Zm6.23-6.19A12.7 12.7 0 0 1 14 7s-2.63 5.14-6.95 5.14A6.1 6.1 0 0 1 4 11.3L2.27 13l-1.4-1.36L11.9 1l1.23 1.2-1.6 1.6Z'/%3E%3C/svg%3E");
84
+ --_ta-fc: var(--black-400);
85
+ --_ta-fc-hover: var(--black-400);
83
86
  }
84
87
 
85
88
  // moderator overrides other required
@@ -93,51 +96,44 @@
93
96
  }
94
97
 
95
98
  &&__required:not(&__moderator) {
96
- --_ta-bc: var(--theme-tag-required-border-color, var(--theme-tag-border-color, var(--black-400)));
97
- --_ta-bg: var(--theme-tag-required-background-color, var(--theme-tag-background-color, var(--black-150)));
98
- --_ta-fc: var(--theme-tag-required-color, var(--theme-tag-color, var(--black-500)));
99
+ --_ta-bc: var(--theme-tag-required-border-color, var(--theme-tag-border-color, var(--black-500)));
99
100
  --_ta-bc-hover: var(--theme-tag-required-hover-border-color, var(--theme-tag-hover-border-color, var(--black-600)));
100
- --_ta-bg-hover: var(--theme-tag-required-hover-background-color, var(--theme-tag-hover-background-color, var(--black-200)));
101
- --_ta-fc-hover: var(--theme-tag-required-hover-color, var(--theme-tag-hover-color, var(--black-600)));
102
101
  }
103
102
 
104
- &__watched, // TODO: remove all single `&` watched styles once core no longer requires them
105
103
  &&__watched {
106
- --_ta-before-icon: url("data:image/svg+xml;,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M7.05 1C2.63 1 0 6.5 0 6.5S2.63 12 7.05 12C11.38 12 14 6.5 14 6.5S11.37 1 7.05 1ZM7 10.17A3.59 3.59 0 0 1 3.5 6.5 3.6 3.6 0 0 1 7 2.83c1.94 0 3.5 1.65 3.5 3.67A3.57 3.57 0 0 1 7 10.17Zm0-1.84c.97 0 1.75-.81 1.75-1.83S7.97 4.67 7 4.67s-1.75.81-1.75 1.83S6.03 8.33 7 8.33Z'/%3E%3C/svg%3E");
104
+ --_ta-before-icon: url("data:image/svg+xml;,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='12' viewBox='0 0 14 12'%3E%3Cpath d='M7.05 1C2.63 1 0 6.5 0 6.5S2.63 12 7.05 12C11.38 12 14 6.5 14 6.5S11.37 1 7.05 1ZM7 10.17A3.59 3.59 0 0 1 3.5 6.5 3.6 3.6 0 0 1 7 2.83c1.94 0 3.5 1.65 3.5 3.67A3.57 3.57 0 0 1 7 10.17Zm0-1.84c.97 0 1.75-.81 1.75-1.83S7.97 4.67 7 4.67s-1.75.81-1.75 1.83S6.03 8.33 7 8.33Z'/%3E%3C/svg%3E");
107
105
  }
108
106
 
109
107
  // CHILD ELEMENTS
110
- & button&--dismiss:not(.s-btn) {
111
- all: unset;
108
+ // Dismiss
109
+ &:has(> &--dismiss) {
110
+ --_ta-pr: var(--su2);
112
111
  }
113
-
114
- & &--dismiss,
115
- & button&--dismiss:not(.s-btn) { // Style adjustment to @Svg.ClearSm
112
+ & &--dismiss {
116
113
  &:focus-visible {
117
114
  .focus-styles();
118
115
  }
119
116
 
120
117
  &:hover {
121
- .highcontrast-mode({
122
- color: var(--white);
123
- });
124
-
125
118
  background-color: var(--_ta-fc);
126
119
  color: var(--_ta-bg);
127
120
  }
128
121
 
122
+ all: unset;
129
123
  align-items: center;
130
- align-self: stretch;
131
124
  background-color: transparent;
132
- border-radius: var(--br-sm);
133
125
  color: inherit;
134
126
  cursor: pointer;
135
127
  display: flex;
136
128
  justify-content: center;
137
- margin: var(--su-static1) calc(var(--_ta-dismiss-padding) * -1) var(--su-static1) var(--_ta-dismiss-padding);
138
- padding: var(--_ta-dismiss-padding);
129
+ margin: calc(var(--_ta-pt) * -1) 0 calc(var(--_ta-pb) * -1);
130
+ padding: var(--su2);
139
131
  }
140
132
 
133
+ // Sponsor
134
+ &:has(> &--sponsor) {
135
+ --_ta-pl: var(--su2);
136
+ }
141
137
  & &--sponsor { // The small sponsor favicon displayed within a tag
142
138
  img,
143
139
  .svg-icon {
@@ -145,11 +141,8 @@
145
141
  height: 100%;
146
142
  }
147
143
 
148
- align-self: center;
149
- border-radius: calc(var(--br-sm) - var(--su-static1));
150
- display: inline-flex;
151
- margin: calc(var(--su1) * -1) var(--su4) calc(var(--su2) * -1) calc(var(--su2) * -1);
152
144
  max-width: calc(var(--su-static16) + var(--su-static2));
145
+ margin: calc(var(--_ta-pt) * -1) 0 calc(var(--_ta-pb) * -1) 0;
153
146
  }
154
147
 
155
148
  // INTERACTION
@@ -168,19 +161,15 @@
168
161
 
169
162
  background-color: var(--_ta-bg);
170
163
  border: var(--su-static1) solid var(--_ta-bc);
171
- border-radius: var(--_ta-br);
172
164
  color: var(--_ta-fc);
173
165
  font-size: var(--_ta-fs);
174
- line-height: var(--_ta-lh);
175
- padding-left: var(--_ta-pl);
176
- padding-right: var(--_ta-pr);
166
+ padding: var(--_ta-pt) var(--_ta-pr) var(--_ta-pb) var(--_ta-pl);
177
167
 
178
168
  align-items: center;
179
169
  display: inline-flex;
180
- font-weight: 700;
170
+ gap: var(--su4);
181
171
  justify-content: center;
182
- min-width: 0;
172
+ line-height: var(--lh-xs);
183
173
  text-decoration: none;
184
- vertical-align: middle;
185
174
  white-space: nowrap;
186
175
  }
@@ -1,14 +1,16 @@
1
1
  .s-toggle-switch {
2
2
  @ts-bg-image-fill: .set-white()[default];
3
3
  @ts-bg-image-fill-dark: .set-white-dark()[default];
4
+ @ts-bg-image-fill-esc: escape("@{ts-bg-image-fill}"); // color escaped for URL usage
5
+ @ts-bg-image-fill-dark-esc: escape("@{ts-bg-image-fill-dark}"); // color escaped for URL usage
4
6
  --_ts-bg: var(--black-350);
5
- --_ts-bg-image: url("data:image/svg+xml;,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='@{ts-bg-image-fill}'/%3e%3c/svg%3e");
7
+ --_ts-bg-image: url("data:image/svg+xml;,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='@{ts-bg-image-fill-esc}'/%3e%3c/svg%3e");
6
8
  --_ts-bg-ps: left center;
7
9
  --_ts-multiple-bg: unset;
8
10
  --_ts-multiple-fc: var(--black-400);
9
11
 
10
12
  .dark-mode({
11
- --_ts-bg-image: url("data:image/svg+xml;,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='@{ts-bg-image-fill-dark}'/%3e%3c/svg%3e");
13
+ --_ts-bg-image: url("data:image/svg+xml;,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='@{ts-bg-image-fill-dark-esc}'/%3e%3c/svg%3e");
12
14
  });
13
15
 
14
16
  fieldset[disabled] &,
@@ -198,7 +198,7 @@
198
198
  color: var(--_tb-item-fc);
199
199
 
200
200
  align-items: center;
201
- border-radius: var(--br-sm);
201
+ border-radius: var(--br-md);
202
202
  display: inline-flex;
203
203
  padding: 0 calc(var(--su12) - var(--su2));
204
204
  position: relative;
@@ -217,7 +217,7 @@
217
217
  background-color: var(--_tb-logo-bg);
218
218
 
219
219
  align-items: center;
220
- border-radius: var(--br-sm);
220
+ border-radius: var(--br-md);
221
221
  display: flex;
222
222
  height: 100%;
223
223
  padding: 0 var(--su8);
@@ -323,7 +323,7 @@
323
323
  color: var(--_tb-notice-fc);
324
324
  text-decoration: var(--_tb-notice-td);
325
325
 
326
- border-radius: var(--br-sm);
326
+ border-radius: var(--br-md);
327
327
  display: inline-flex;
328
328
  flex-shrink: 0;
329
329
  font-size: var(--fs-fine);
@@ -69,7 +69,7 @@
69
69
  -webkit-mask-image: var(--_up-bg-b-image);
70
70
  mask-image: var(--_up-bg-b-image);
71
71
  background-color: var(--_up-bg-bc-hc-state, var(--_up-bg-bc-hc, var(--_up-bg-bc)));
72
- border-radius: var(--br-lg);
72
+ border-radius: var(--br-md);
73
73
  content: '';
74
74
  display: block;
75
75
  inset: 0;
@@ -78,7 +78,7 @@
78
78
 
79
79
  align-items: center;
80
80
  background-color: var(--_up-bg);
81
- border-radius: var(--br-lg);
81
+ border-radius: var(--br-md);
82
82
  display: flex;
83
83
  flex-direction: column;
84
84
  justify-content: center;
@@ -127,7 +127,7 @@
127
127
  }
128
128
 
129
129
  background-color: var(--white);
130
- border-radius: var(--br-sm);
130
+ border-radius: var(--br-md);
131
131
  box-shadow: var(--bs-md);
132
132
  max-height: var(--su-static128);
133
133
  max-width: 100%;
@@ -261,19 +261,29 @@
261
261
 
262
262
  each(@tiers, .(@tier, @k, @i) {
263
263
  @stops: 100, 200, 300, 400, 500, 600;
264
- @fallbackColor: if(@tier = primary, orange, blue);
264
+ @fallbackColor: if(@tier = primary, orange, black);
265
265
  @baseThemeVar: ~"--theme-@{tier}";
266
266
  @customThemeVar: if(@mode = light, ~"@{baseThemeVar}-custom", ~"--theme-dark-@{tier}-custom");
267
267
 
268
268
  & when (@mode = light), (@mode = dark) {
269
- @{baseThemeVar}: ~"var(@{customThemeVar}, var(--@{fallbackColor}-400))";
269
+ & when (@tier = primary) {
270
+ @{baseThemeVar}: ~"var(@{customThemeVar}, var(--@{fallbackColor}-400))";
271
+ }
272
+ & when (@tier = secondary) {
273
+ @{baseThemeVar}: ~"var(@{customThemeVar}, var(--@{fallbackColor}))";
274
+ }
270
275
  each(@stops, .(@stop, @kStop, @iStop) {
271
276
  @{baseThemeVar}-@{stop}: ~"var(@{customThemeVar}-@{stop}, var(--@{fallbackColor}-@{stop}))";
272
277
  });
273
278
  }
274
279
 
275
280
  & when (@mode = light-highcontrast), (@mode = dark-highcontrast) {
276
- @{baseThemeVar}: ~"var(--@{fallbackColor}-400)";
281
+ & when (@tier = primary) {
282
+ @{baseThemeVar}: ~"var(--@{fallbackColor}-400)";
283
+ }
284
+ & when (@tier = secondary) {
285
+ @{baseThemeVar}: ~"var(--@{fallbackColor})";
286
+ }
277
287
 
278
288
  each(@stops, .(@stop, @kStop, @iStop) {
279
289
  @{baseThemeVar}-@{stop}: ~"var(--@{fallbackColor}-@{stop})";