@stackoverflow/stacks 3.0.0-beta.1 → 3.0.0-beta.12

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 (32) hide show
  1. package/dist/css/stacks.css +1543 -1285
  2. package/dist/css/stacks.min.css +1 -1
  3. package/lib/atomic/misc.less +1 -1
  4. package/lib/atomic/typography.less +64 -38
  5. package/lib/base/body.less +2 -7
  6. package/lib/components/activity-indicator/activity-indicator.less +2 -19
  7. package/lib/components/anchor/anchor.less +1 -1
  8. package/lib/components/badge/badge.less +156 -177
  9. package/lib/components/bling/bling.less +130 -0
  10. package/lib/components/button/button.less +222 -374
  11. package/lib/components/checkbox_radio/checkbox_radio.less +12 -10
  12. package/lib/components/input-icon/input-icon.less +3 -3
  13. package/lib/components/input_textarea/input_textarea.less +70 -58
  14. package/lib/components/link/link.less +1 -1
  15. package/lib/components/link-preview/link-preview.less +1 -1
  16. package/lib/components/menu/menu.less +100 -21
  17. package/lib/components/modal/modal.less +10 -10
  18. package/lib/components/navigation/navigation.less +61 -37
  19. package/lib/components/pagination/pagination.less +44 -43
  20. package/lib/components/popover/popover.less +3 -5
  21. package/lib/components/post-summary/post-summary.less +3 -2
  22. package/lib/components/progress-bar/progress-bar.less +11 -10
  23. package/lib/components/select/select.less +26 -37
  24. package/lib/components/tag/tag.less +59 -70
  25. package/lib/components/toggle-switch/toggle-switch.less +4 -2
  26. package/lib/exports/color-mixins.less +13 -3
  27. package/lib/exports/color-sets.less +256 -216
  28. package/lib/exports/constants-helpers.less +4 -1
  29. package/lib/exports/constants-type.less +25 -25
  30. package/lib/stacks-static.less +1 -1
  31. package/package.json +1 -1
  32. package/lib/components/award-bling/award-bling.less +0 -31
@@ -297,7 +297,7 @@
297
297
  // $ OUTLINE
298
298
  // ----------------------------------------------------------------------------
299
299
  .outline-none { outline: 0 !important; }
300
- .outline-ring { outline: solid var(--su-static4) var(--translucent-secondary); }
300
+ .outline-ring { outline: solid var(--su-static4) var(--translucent-secondary); } // TODO SHINE revisit this value once theme colors are finalized
301
301
 
302
302
  .f\:outline-ring {
303
303
  &:focus,
@@ -26,47 +26,72 @@ 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
-
41
- .fs-caption,
42
- .fs-category { font-size: var(--fs-caption) !important; }
43
- .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
+ }
44
81
 
45
82
  #stacks-internals #screen-sm({
46
- .fs-display4 { font-size: 3.8rem !important; }
47
- .fs-display3 { font-size: 3.3rem !important; }
48
- .fs-display2 { font-size: 3rem !important; }
49
- .fs-display1 { font-size: 2.6rem !important; }
50
- .fs-headline2 { font-size: 2.3rem !important; }
51
- .fs-headline1 { font-size: 2rem !important; }
52
- .fs-title { font-size: 1.8rem !important; }
53
- .fs-subheading { font-size: 1.6rem !important; }
54
- .fs-body3 { font-size: 1.4rem !important; }
55
- .fs-body2 { font-size: 1.3rem !important; }
83
+ .fs-display4 { font-size: calc(var(--fs-display4) * .43) !important; } // 43px
84
+ .fs-display3 { font-size: calc(var(--fs-display3) * .5139) !important; } // ~37px
85
+ .fs-display2 { font-size: calc(var(--fs-display2) * .5862) !important; } // ~34px
86
+ .fs-display1 { font-size: calc(var(--fs-display1) * .6304) !important; } // ~29px
87
+ .fs-headline2 { font-size: calc(var(--fs-headline2) * .7224) !important; } // ~26px
88
+ .fs-headline1 { font-size: calc(var(--fs-headline1) * .8215) !important; } // ~23px
89
+ .fs-title { font-size: calc(var(--fs-title) * .9094) !important; } // ~20px
90
+ .fs-subheading { font-size: calc(var(--fs-subheading) * .8998) !important; } // ~18px
91
+ .fs-body3 { font-size: calc(var(--fs-body3) * .8888) !important; } // ~16px
92
+ .fs-body2 { font-size: calc(var(--fs-body2) * .9374) !important; } // ~15px
56
93
  }, @force-selector: true);
57
94
 
58
- .fs-category {
59
- font-weight: 700;
60
- text-transform: uppercase;
61
-
62
- // If a top border is desired
63
- &.has-border {
64
- width: 100%;
65
- padding: var(--su4) 0;
66
- border-top: var(--su-static1) solid var(--bc-medium);
67
- }
68
- }
69
-
70
95
  // ============================================================================
71
96
  // $ LINE HEIGHTS
72
97
  // ----------------------------------------------------------------------------
@@ -89,7 +114,8 @@ p {
89
114
 
90
115
  // -- Font Weight
91
116
  .fw-normal { font-weight: 400 !important; }
92
- .fw-bold { font-weight: 700 !important; }
117
+ .fw-medium { font-weight: 500 !important; }
118
+ .fw-bold { font-weight: 600 !important; }
93
119
 
94
120
  // -- Font Styles
95
121
  .fs-normal { font-style: normal !important; }
@@ -24,13 +24,6 @@ body {
24
24
  line-height: var(--lh-base);
25
25
  }
26
26
 
27
- #stacks-internals #screen-sm({
28
- &,
29
- body {
30
- font-size: 11px;
31
- }
32
- }, @force-selector: true);
33
-
34
27
  body {
35
28
  box-sizing: border-box;
36
29
  min-height: 100%;
@@ -41,4 +34,6 @@ body {
41
34
  *:after {
42
35
  box-sizing: inherit;
43
36
  }
37
+
38
+ // TODO SHINE set max width here
44
39
  }
@@ -1,38 +1,21 @@
1
1
  .s-activity-indicator {
2
- --_ai-bg: var(--theme-secondary-400);
2
+ --_ai-bg: var(--pink-400);
3
3
  --_ai-fc: var(--white);
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
- --_ai-fc: var(--_black-static);
31
-
32
- .highcontrast-mode({
33
- --_ai-bg: var(--yellow-500); // needs to be here to override default high contrast
34
- --_ai-fc: var(--white);
35
- });
36
19
  }
37
20
 
38
21
  &&__sm {
@@ -46,7 +29,7 @@
46
29
  min-height: var(--_ai-min-size);
47
30
  padding: var(--_ai-p);
48
31
 
49
- border-radius: 1000px;
32
+ border-radius: var(--br-pill);
50
33
  display: inline-flex;
51
34
  font-size: var(--fs-fine);
52
35
  font-weight: 600;
@@ -28,7 +28,7 @@
28
28
  }
29
29
 
30
30
  &&__default {
31
- --_an-a-fc: var(--theme-link-color, var(--theme-secondary-400));
31
+ --_an-a-fc: var(--theme-link-color, var(--theme-secondary));
32
32
  --_an-a-fc-hover: var(--theme-link-color-hover, var(--theme-secondary-500));
33
33
  --_an-a-fc-visited: var(--theme-link-color-visited, var(--purple-500));
34
34
  --_an-a-fc-hover-visited: var(--theme-link-color-hover, var(--purple-600));
@@ -1,164 +1,109 @@
1
1
  .s-badge {
2
2
  --_ba-as: unset;
3
- --_ba-bc: var(--bc-medium);
4
- --_ba-bg: var(--black-150);
3
+ --_ba-bc: transparent;
4
+ --_ba-bg: var(--black-100);
5
5
  --_ba-fc: var(--black-500);
6
- --_ba-fs: var(--fs-caption);
7
- --_ba-fw: normal;
8
- --_ba-g: 0.3em;
9
- --_ba-lh: 2;
6
+ --_ba-fs: var(--fs-caption); //13px
10
7
  --_ba-px: var(--su6);
11
- --_ba-py: 0;
8
+ --_ba-py: var(--su4);
12
9
  --_ba-tt: unset;
13
10
  --_ba-wmn: 0;
14
-
15
- // CONTEXTUAL STYLES
16
- .highcontrast-mode({
17
- // Badge counts
18
- &__gold,
19
- &__silver,
20
- &__bronze,
21
- // Number counts
22
- &__rep,
23
- &__rep-down,
24
- &__votes:not(.s-badge__answered),
25
- // Users
26
- &__admin,
27
- &__moderator,
28
- &__staff {
29
- --_ba-bc: currentColor;
30
- }
31
-
32
- &__new {
33
- --_ba-fc: var(--purple-600);
34
- }
35
- });
36
-
37
- // MODIFIERS
38
- // Sizes
39
- &&__xs,
11
+ --_ba-bl: 0;
12
+ --_ba-fw: unset;
13
+ --_ba-sq-bg: var(--black-200);
14
+ --_ba-bx-sh-w: var(--su2);
15
+ --_ba-gap: unset;
16
+ --_ba-bx-sh-inset: ~"";
17
+
18
+ // SIZES
40
19
  &&__sm {
41
- --_ba-as: flex-start;
42
- --_ba-fs: var(--fs-fine);
43
- }
44
-
45
- &&__xs {
46
- --_ba-lh: 1.5;
47
- --_ba-px: var(--su2);
48
20
  --_ba-wmn: calc(var(--su-static16) + var(--su-static2));
49
- }
50
-
51
- &&__sm {
52
- --_ba-lh: 1.8;
21
+ --_ba-as: flex-start;
22
+ --_ba-fs: var(--fs-fine); //12px
53
23
  --_ba-px: var(--su4);
54
- --_ba-wmn: calc(var(--su-static16) + var(--su-static2));
55
- }
56
-
57
- // Badge counts
58
- &&__gold,
59
- &&__silver,
60
- &&__bronze {
61
- --_ba-fc: var(--black-500);
62
- }
63
-
64
- &&__gold {
65
- --_ba-bc: var(--gold-300);
66
- --_ba-bg: var(--gold-100);
24
+ --_ba-py: var(--su1);
25
+ --_ba-bx-sh-w: 0px;
26
+ --_ba-bx-sh-inset: inset;
67
27
  }
68
28
 
69
- &&__silver {
70
- --_ba-bc: var(--silver-300);
71
- --_ba-bg: var(--silver-100);
29
+ &&__lg {
30
+ --_ba-fs: var(--fs-body1); //14px
31
+ --_ba-px: var(--su8);
32
+ --_ba-py: calc(var(--su4) + var(--su1)); //5px
33
+ --_ba-bx-sh-w: var(--su4);
72
34
  }
73
35
 
74
- &&__bronze {
75
- --_ba-bc: var(--bronze-300);
76
- --_ba-bg: var(--bronze-100);
36
+ // We need negative margin to make up for the positive badge padding
37
+ & .s-bling__filled {
38
+ margin: calc(var(--_ba-py) * -1) 0 calc(var(--_ba-py) * -1) calc(var(--_ba-px) * -1);
77
39
  }
78
-
79
- // Number counts
80
- &&__answered,
81
- &&__bounty,
82
- &&__important {
83
- --_ba-bc: transparent;
84
- --_ba-fc: var(--white);
40
+ & svg {
41
+ margin: calc(var(--_ba-py) * -1) 0 calc(var(--_ba-py) * -1) calc(var(--su4) * -1);
85
42
  }
86
43
 
87
- &&__rep,
88
- &&__rep-down,
89
- &&__votes:not(&__answered) {
90
- --_ba-bg: var(--white);
44
+ &:has(.s-bling__rep) {
45
+ --_ba-fw: 600;
46
+ --_ba-fc: var(--black-600);
91
47
  }
92
-
93
- &&__answered {
94
- --_ba-bg: var(--green-400);
48
+ &:has(.s-bling) {
49
+ --_ba-bg: var(--black-150);
95
50
  }
96
51
 
97
- &&__bounty {
98
- --_ba-bg: var(--blue-400);
99
- }
52
+ // TAG
53
+ &&__gold,
54
+ &&__silver,
55
+ &&__bronze {
56
+ --_ba-bl: var(--su4);
100
57
 
101
- &&__important {
102
- --_ba-bg: var(--red-400);
58
+ & .s-bling__gold,
59
+ & .s-bling__silver,
60
+ & .s-bling__bronze {
61
+ margin-left: -2px;
62
+ }
103
63
  }
104
64
 
105
- &&__rep {
106
- --_ba-bc: var(--green-300);
107
- --_ba-fc: var(--green-400);
65
+ &&__gold {
66
+ --_ba-bc: var(--yellow-300);
108
67
  }
109
-
110
- &&__rep-down {
111
- --_ba-bc: var(--red-300);
112
- --_ba-fc: var(--red-400);
68
+ &&__silver {
69
+ --_ba-bc: var(--blue-300);
113
70
  }
114
-
115
- &&__votes:not(&__answered) {
116
- --_ba-bc: var(--black-250);
117
- --_ba-fc: var(--black-500);
71
+ &&__bronze {
72
+ --_ba-bc: var(--orange-300);
118
73
  }
119
74
 
120
- // Users
121
- &&__admin {
122
- --_ba-bc: var(--theme-primary-200);
123
- --_ba-bg: var(--theme-primary-100);
124
- --_ba-fc: var(--theme-primary-500);
75
+ // USER
76
+ &&__admin,
77
+ &&__moderator,
78
+ &&__staff,
79
+ &&__ai,
80
+ &&__bot {
81
+ --_ba-bl: var(--su4);
82
+ --_ba-bg: var(--black-150);
83
+ --_ba-fc: var(--black-600);
125
84
  }
126
85
 
127
86
  &&__moderator {
128
- --_ba-bc: var(--theme-secondary-300);
129
- --_ba-bg: var(--theme-secondary-200);
130
- --_ba-fc: var(--theme-secondary-600);
131
- --_ba-g: calc(var(--su-static4) - var(--su-static1)); // 3px
132
87
  // :before icon
133
- --_ba-before-h: calc(var(--su-static16) - var(--su-static2)); // 14px
134
- --_ba-before-icon: url("data:image/svg+xml;,%3Csvg width='12' height='14' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.528.746c.257-.329.675-.327.93 0l4.42 5.66c.258.329.257.864 0 1.192l-4.42 5.66c-.256.328-.674.327-.93 0l-4.42-5.66c-.257-.329-.256-.865 0-1.192l4.42-5.66z' fill='%23fff'/%3E%3C/svg%3E");
135
- --_ba-before-mt: calc(var(--su-static1) * -1); // -1px
136
- --_ba-before-w: var(--su-static12);
137
-
138
- // Sizes
139
- &.s-badge__xs {
140
- --_ba-before-h: calc(var(--su-static8) + var(--su-static1)); // 9px
141
- --_ba-before-icon: url("data:image/svg+xml;,%3Csvg width='7' height='9' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 .246c.3-.329.701-.327 1 0L6.776 4c.3.329.298.672 0 1L4 8.75c-.299.329-.702.327-1 0L.224 5c-.284-.324-.285-.675 0-1L3 .246z' fill='%23fff'/%3E%3C/svg%3E");
142
- --_ba-before-mt: 0;
143
- --_ba-before-w: calc(var(--su-static8) - var(--su-static1)); // 7px
144
- }
88
+ --_ba-bc: var(--blue-500);
89
+ --_ba-before-h: calc(var(--su12) + var(--su1)); // 13px
90
+ --_ba-before-w: calc(var(--su12) - var(--su1)); // 11px
91
+ --_ba-before-icon: url("data:image/svg+xml;,%3Csvg width='11' height='13' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.528.746c.257-.329.675-.327.93 0l4.42 5.66c.258.329.257.864 0 1.192l-4.42 5.66c-.256.328-.674.327-.93 0l-4.42-5.66c-.257-.329-.256-.865 0-1.192l4.42-5.66z' fill='%23fff'/%3E%3C/svg%3E");
145
92
 
146
93
  &.s-badge__sm {
147
- --_ba-g: var(--su-static2);
148
- --_ba-before-h: calc(var(--su-static12) - var(--su-static1)); // 11px
94
+ --_ba-before-h: calc(var(--su12) - var(--su1)); // 11px
95
+ --_ba-before-w: calc(var(--su8) + var(--su1)); // 9px
149
96
  --_ba-before-icon: url("data:image/svg+xml;,%3Csvg width='9' height='11' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.55.246c.257-.329.647-.327.903 0l3.36 4.66c.256.329.256.864 0 1.192L4.45 10.75c-.257.329-.644.327-.9 0L.192 6.098c-.256-.329-.256-.865 0-1.192L3.55.246z' fill='%23fff'/%3E%3C/svg%3E");
150
- --_ba-before-mt: 0;
151
- --_ba-before-w: calc(var(--su-static8) + var(--su-static1)); // 9px
152
97
  }
153
98
 
154
99
  &:before {
155
100
  height: var(--_ba-before-h);
156
- margin-top: var(--_ba-before-mt);
101
+ margin-top: calc(var(--su1) * -1);
157
102
  width: var(--_ba-before-w);
158
103
 
159
104
  content: "";
160
105
  display: inline-block;
161
- background-color: currentColor;
106
+ background-color: var(--_ba-bc);
162
107
  -webkit-mask: var(--_ba-before-icon) no-repeat center;
163
108
  mask: var(--_ba-before-icon) no-repeat center;
164
109
  -webkit-mask-size: contain;
@@ -167,79 +112,114 @@
167
112
  }
168
113
 
169
114
  &&__staff {
170
- // Staff badges are always "Stack Overflow Orange"
171
- --_ba-bc: var(--orange-300);
172
- --_ba-bg: var(--orange-200);
173
- --_ba-fc: var(--orange-600);
115
+ // Staff should always be "StackOverflow orange"
116
+ --_ba-bc: var(--orange-400);
117
+ }
118
+ &&__admin {
119
+ // Only the admin badge is themeable
120
+ --_ba-bc: var(--theme-primary-500, var(--orange-500));
174
121
  }
175
-
176
- // VARIANTS
177
122
  &&__ai {
178
- --_ba-bc: var(--_ba-fc);
179
- --_ba-bg: var(--black-050);
180
- --_ba-fc: var(--orange-500);
181
- --_ba-tt: uppercase;
123
+ --_ba-bc: var(--purple-400);
182
124
  }
183
-
184
125
  &&__bot {
185
- --_ba-bc: var(--black-300);
126
+ --_ba-bc: var(--black-400);
186
127
  }
187
128
 
188
- &&__danger,
189
- &&__muted {
190
- &.s-badge__filled {
191
- --_ba-bc: transparent;
129
+ // STATES
130
+ &&__info {
131
+ --_ba-bg: var(--blue-100);
132
+ --_ba-fc: var(--blue-500);
133
+ --_ba-sq-bg: var(--blue-200);
134
+ &.s-badge__important {
135
+ --_ba-bg: var(--blue-400);
136
+ --_ba-sq-bg: var(--blue-500);
137
+ }
138
+ }
139
+ &&__warning {
140
+ --_ba-bg: var(--yellow-100);
141
+ --_ba-fc: var(--yellow-500);
142
+ --_ba-sq-bg: var(--yellow-200);
143
+ &.s-badge__important {
144
+ --_ba-bg: var(--yellow-400);
145
+ --_ba-sq-bg: var(--yellow-500);
192
146
  }
193
147
  }
194
-
195
148
  &&__danger {
196
- --_ba-bc: var(--red-300);
149
+ --_ba-bg: var(--red-100);
150
+ --_ba-fc: var(--red-500);
151
+ --_ba-sq-bg: var(--red-200);
152
+ &.s-badge__important {
153
+ --_ba-bg: var(--red-400);
154
+ --_ba-sq-bg: var(--red-500);
155
+ }
156
+ }
157
+ &&__critical {
197
158
  --_ba-bg: var(--red-200);
198
159
  --_ba-fc: var(--red-600);
199
-
200
- &.s-badge__filled {
201
- --_ba-bg: var(--red-400);
202
- --_ba-fc: var(--white);
160
+ --_ba-sq-bg: var(--red-300);
161
+ &.s-badge__important {
162
+ --_ba-bg: var(--red-500);
163
+ --_ba-sq-bg: var(--red-600);
203
164
  }
204
165
  }
205
- &&__info {
206
- --_ba-bc: var(--blue-300);
207
- --_ba-bg: var(--blue-200);
208
- --_ba-fc: var(--blue-600);
166
+ &&__tonal {
167
+ --_ba-bg: var(--black-200);
168
+ --_ba-fc: var(--black-600);
169
+ --_ba-sq-bg: var(--black-300);
170
+ &.s-badge__important {
171
+ --_ba-bg: var(--black-500);
172
+ --_ba-sq-bg: var(--black-600);
173
+ }
209
174
  }
210
-
211
- &&__warning {
212
- --_ba-bc: var(--yellow-300);
213
- --_ba-bg: var(--yellow-200);
214
- --_ba-fc: var(--yellow-600);
175
+ &&__success {
176
+ --_ba-bg: var(--green-100);
177
+ --_ba-fc: var(--green-600);
178
+ --_ba-sq-bg: var(--green-200);
179
+ &.s-badge__important {
180
+ --_ba-bg: var(--green-500);
181
+ --_ba-sq-bg: var(--green-600);
182
+ }
183
+ }
184
+ &&__featured {
185
+ --_ba-bg: var(--purple-100);
186
+ --_ba-fc: var(--purple-500);
187
+ --_ba-sq-bg: var(--purple-200);
188
+ &.s-badge__important {
189
+ --_ba-bg: var(--purple-400);
190
+ --_ba-sq-bg: var(--purple-500);
191
+ }
215
192
  }
216
193
 
217
- &&__muted {
218
- --_ba-bc: var(--black-300);
219
- --_ba-bg: var(--black-200);
220
- --_ba-fc: var(--black-500);
221
-
222
- &.s-badge__filled {
223
- --_ba-bg: var(--black-500);
224
- --_ba-fc: var(--white);
194
+ // SQUARED
195
+ &&__squared {
196
+ --_ba_box-shadow: 0 0 0 var(--_ba-bx-sh-w) var(--_ba-sq-bg);
197
+ svg {
198
+ background-color: var(--_ba-sq-bg);
199
+ box-shadow: var(--_ba_box-shadow);
200
+ margin-right: var(--_ba-bx-sh-w)
225
201
  }
226
202
  }
203
+ &&__squared:not(&__important) {
204
+ .highcontrast-mode({
205
+ //Add border around the square in high contrast mode
206
+ --_ba_box-shadow: 0 0 0 calc(var(--_ba-bx-sh-w) - var(--su1)) var(--_ba-sq-bg),
207
+ 0 0 0 max(var(--su1), var(--_ba-bx-sh-w)) currentcolor var(--_ba-bx-sh-inset);
208
+ });
209
+ }
227
210
 
228
- &&__new {
229
- --_ba-bc: var(--_ba-bg);
230
- --_ba-bg: var(--purple-100);
231
- --_ba-fc: var(--purple-400);
232
- --_ba-fw: bold;
233
- --_ba-tt: uppercase;
211
+ // ICONS
212
+ &:not(&__squared):has(> svg){
213
+ //We want a smaller gap for icons that aren't squared
214
+ --_ba-gap: calc(var(--_ba-px) - var(--su2));
234
215
  }
235
216
 
236
- // CHILD ELEMENTS
237
- &--image, // Included with no base class to account for usage in .s-progress__badge
238
- & &--image {
239
- align-self: center;
240
- display: inline-flex;
241
- margin-right: var(--su1);
242
- margin-left: calc((var(--su4) + var(--su1)) * -1);
217
+ // IMPORTANT
218
+ &&__important {
219
+ --_ba-bg: var(--black-400);
220
+ --_ba-sq-bg: var(--black-500);
221
+ --_ba-fw: 600;
222
+ --_ba-fc: var(--black-050);
243
223
  }
244
224
 
245
225
  // INTERACTION
@@ -249,18 +229,17 @@
249
229
 
250
230
  align-self: var(--_ba-as);
251
231
  background-color: var(--_ba-bg);
252
- border: var(--su-static1) solid var(--_ba-bc);
232
+ border-left: var(--_ba-bl) solid var(--_ba-bc);
253
233
  color: var(--_ba-fc);
254
234
  font-size: var(--_ba-fs);
255
- gap: var(--_ba-g);
256
235
  font-weight: var(--_ba-fw);
257
- line-height: var(--_ba-lh);
258
- min-width: var(--_ba-wmn);
236
+ gap: var(--_ba-gap, var(--_ba-px));
259
237
  padding: var(--_ba-py) var(--_ba-px);
238
+ line-height: var(--lh-md);
239
+ min-width: var(--_ba-wmn);
260
240
  text-transform: var(--_ba-tt);
261
241
 
262
242
  align-items: center;
263
- border-radius: var(--br-md);
264
243
  display: inline-flex;
265
244
  justify-content: center;
266
245
  text-decoration: none;