@stackoverflow/stacks 3.0.0-beta.23 → 3.0.0-beta.25
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.
- package/dist/css/stacks.css +16797 -17011
- package/dist/css/stacks.min.css +1 -1
- package/lib/atomic/backgrounds.less +67 -0
- package/lib/atomic/border-radius.less +38 -0
- package/lib/atomic/borders.less +73 -0
- package/lib/atomic/box-shadow.less +29 -0
- package/lib/atomic/box-sizing.less +3 -0
- package/lib/atomic/current-color.less +2 -0
- package/lib/atomic/cursors.less +8 -0
- package/lib/atomic/display.less +15 -0
- package/lib/atomic/floats.less +20 -0
- package/lib/atomic/gap.less +2 -0
- package/lib/atomic/grid.less +2 -0
- package/lib/atomic/interactivity.less +45 -0
- package/lib/atomic/lists.less +29 -0
- package/lib/atomic/{spacing.less → margin.less} +0 -10
- package/lib/atomic/object-fit.less +9 -0
- package/lib/atomic/opacity.less +54 -0
- package/lib/atomic/outline.less +11 -0
- package/lib/atomic/overflow.less +17 -0
- package/lib/atomic/padding.less +12 -0
- package/lib/atomic/positioning.less +7 -0
- package/lib/atomic/sizing.less +3 -28
- package/lib/atomic/transitions.less +20 -0
- package/lib/atomic/truncation.less +58 -0
- package/lib/atomic/typography.less +19 -124
- package/lib/atomic/vertical-alignment.less +9 -0
- package/lib/atomic/visibility.less +18 -0
- package/lib/atomic/z-index.less +12 -0
- package/lib/base/reset-normalize.less +2 -2
- package/lib/components/activity-indicator/activity-indicator.less +3 -3
- package/lib/components/anchor/anchor.less +28 -39
- package/lib/components/avatar/avatar.less +17 -16
- package/lib/components/badge/badge.less +14 -4
- package/lib/components/banner/banner.less +1 -1
- package/lib/components/button/button.less +7 -7
- package/lib/components/button-group/button-group.less +2 -2
- package/lib/components/card/card.less +1 -1
- package/lib/components/checkbox_radio/checkbox_radio.less +3 -3
- package/lib/components/code-block/code-block.less +1 -2
- package/lib/components/description/description.less +2 -1
- package/lib/components/form-group/form-group.less +14 -1
- package/lib/components/input-fill/input-fill.less +3 -3
- package/lib/components/input-icon/input-icon.less +2 -2
- package/lib/components/input-message/input-message.less +1 -0
- package/lib/components/input_textarea/input_textarea.less +2 -2
- package/lib/components/label/label.less +12 -56
- package/lib/components/link/link.less +44 -98
- package/lib/components/link-preview/link-preview.less +5 -13
- package/lib/components/menu/menu.less +9 -1
- package/lib/components/navigation/navigation.less +7 -1
- package/lib/components/notice/notice.less +1 -1
- package/lib/components/page-title/page-title.less +1 -1
- package/lib/components/pagination/pagination.less +11 -4
- package/lib/components/popover/popover.less +2 -2
- package/lib/components/post-summary/post-summary.less +6 -1
- package/lib/components/progress-bar/progress-bar.less +17 -17
- package/lib/components/prose/prose.less +35 -9
- package/lib/components/select/select.less +26 -10
- package/lib/components/table/table.less +48 -14
- package/lib/components/tag/tag.less +15 -5
- package/lib/components/toggle-switch/toggle-switch.less +15 -19
- package/lib/components/topbar/topbar.less +13 -13
- package/lib/components/uploader/uploader.less +5 -5
- package/lib/components/user-card/user-card.less +14 -3
- package/lib/exports/constants-helpers.less +6 -6
- package/lib/exports/mixins.less +27 -278
- package/lib/stacks-static.less +41 -20
- package/package.json +1 -1
- package/lib/atomic/border.less +0 -121
- package/lib/atomic/misc.less +0 -380
- package/lib/components/block-link/block-link.less +0 -82
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
display: flex;
|
|
83
83
|
flex-direction: column;
|
|
84
84
|
justify-content: center;
|
|
85
|
-
min-height: var(--
|
|
85
|
+
min-height: var(--su128);
|
|
86
86
|
padding: var(--su8) var(--su16);
|
|
87
87
|
position: relative;
|
|
88
88
|
text-align: center;
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
|
|
115
115
|
& &--preview-thumbnail {
|
|
116
116
|
.highcontrast-mode({
|
|
117
|
-
border: var(--
|
|
117
|
+
border: var(--su1) solid var(--black);
|
|
118
118
|
});
|
|
119
119
|
|
|
120
120
|
&:is(img) {
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
background-color: var(--white);
|
|
130
130
|
border-radius: var(--br-md);
|
|
131
131
|
box-shadow: var(--bs-md);
|
|
132
|
-
max-height: var(--
|
|
132
|
+
max-height: var(--su128);
|
|
133
133
|
max-width: 100%;
|
|
134
134
|
overflow: hidden;
|
|
135
135
|
text-overflow: ellipsis;
|
|
@@ -171,9 +171,9 @@
|
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
color: transparent;
|
|
174
|
-
height: var(--
|
|
174
|
+
height: var(--su32);
|
|
175
175
|
flex-shrink: 0;
|
|
176
|
-
width: var(--
|
|
176
|
+
width: var(--su32);
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
|
|
@@ -8,10 +8,17 @@
|
|
|
8
8
|
--_uc-username-p: unset;
|
|
9
9
|
--_uc-username-bl: unset;
|
|
10
10
|
--_uc-username-bg: unset;
|
|
11
|
-
--_uc-username-fc:
|
|
11
|
+
--_uc-username-fc: var(--black-600);
|
|
12
12
|
--_uc-username-d: unset;
|
|
13
13
|
--_uc-username-ai: unset;
|
|
14
14
|
|
|
15
|
+
// CONTEXTUAL STYLES
|
|
16
|
+
.highcontrast-mode({
|
|
17
|
+
a[href] {
|
|
18
|
+
text-decoration: underline;
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
|
|
15
22
|
// VARIANTS
|
|
16
23
|
// SIZES
|
|
17
24
|
&&__lg {
|
|
@@ -24,7 +31,7 @@
|
|
|
24
31
|
}
|
|
25
32
|
|
|
26
33
|
.s-user-card--group:has(> .s-user-card--rep) {
|
|
27
|
-
margin-top:
|
|
34
|
+
margin-top: var(--sun2);
|
|
28
35
|
}
|
|
29
36
|
|
|
30
37
|
--_uc-ai: flex-start;
|
|
@@ -37,6 +44,10 @@
|
|
|
37
44
|
}
|
|
38
45
|
|
|
39
46
|
// CHILD ELEMENTS
|
|
47
|
+
a {
|
|
48
|
+
text-decoration: none;
|
|
49
|
+
}
|
|
50
|
+
|
|
40
51
|
& &--bio {
|
|
41
52
|
.truncation(3);
|
|
42
53
|
color: var(--black-400);
|
|
@@ -82,7 +93,7 @@
|
|
|
82
93
|
}
|
|
83
94
|
|
|
84
95
|
&--username__op {
|
|
85
|
-
--_uc-username-p:
|
|
96
|
+
--_uc-username-p: var(--su3) var(--su4) var(--su3) var(--su4);
|
|
86
97
|
--_uc-username-bg: var(--blue-100);
|
|
87
98
|
--_uc-username-bl: var(--su4) solid var(--blue-300);
|
|
88
99
|
--_uc-username-d: flex;
|
|
@@ -31,7 +31,7 @@ body {
|
|
|
31
31
|
--zi-modals: 9000; // Modals
|
|
32
32
|
|
|
33
33
|
// Border Radius
|
|
34
|
-
--br-md: calc(var(--
|
|
34
|
+
--br-md: calc(var(--su4) + var(--su6)); // 10px
|
|
35
35
|
--br-circle: 50%;
|
|
36
36
|
--br-pill: 1000px;
|
|
37
37
|
// TODO SHINE Retaining legacy border radius for backward compatibility
|
|
@@ -64,18 +64,18 @@ body {
|
|
|
64
64
|
// ----------------------------------------------------------------------------
|
|
65
65
|
@scrollbar-styles: {
|
|
66
66
|
&::-webkit-scrollbar {
|
|
67
|
-
width: calc(var(--
|
|
68
|
-
height: calc(var(--
|
|
67
|
+
width: calc(var(--su12) - var(--su2));
|
|
68
|
+
height: calc(var(--su12) - var(--su2));
|
|
69
69
|
background-color: transparent;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
&::-webkit-scrollbar-track {
|
|
73
|
-
border-radius: calc(var(--
|
|
73
|
+
border-radius: calc(var(--su12) - var(--su2));
|
|
74
74
|
background-color: transparent;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
&::-webkit-scrollbar-thumb {
|
|
78
|
-
border-radius: calc(var(--
|
|
78
|
+
border-radius: calc(var(--su12) - var(--su2));
|
|
79
79
|
background-color: var(--scrollbar);
|
|
80
80
|
}
|
|
81
81
|
|
|
@@ -101,6 +101,6 @@ body {
|
|
|
101
101
|
// Show focus styles on keyboard focus.
|
|
102
102
|
&:focus-visible {
|
|
103
103
|
outline: none;
|
|
104
|
-
box-shadow: 0 0 0 var(--
|
|
104
|
+
box-shadow: 0 0 0 var(--su4) var(--focus-ring-muted);
|
|
105
105
|
}
|
|
106
106
|
}
|
package/lib/exports/mixins.less
CHANGED
|
@@ -1,52 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
// visit https://stackoverflow.design/
|
|
9
|
-
//
|
|
10
|
-
// ============================================================================
|
|
11
|
-
// $ Clearfix
|
|
12
|
-
// -----------------------------------------------------------------------------
|
|
13
|
-
.clearfix() {
|
|
14
|
-
&:before,
|
|
15
|
-
&:after {
|
|
16
|
-
content: "";
|
|
17
|
-
display: table;
|
|
18
|
-
}
|
|
19
|
-
&:after { clear: both; }
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
// ============================================================================
|
|
23
|
-
// -- LIGHTMODE
|
|
24
|
-
// .light-mode-forced ensures light color scheme is used in .theme-light__forced
|
|
25
|
-
//
|
|
26
|
-
// .light-mode-forced({ color: var(--black-600) });
|
|
27
|
-
//
|
|
28
|
-
// ---------------------------------------------------------------------------
|
|
29
|
-
|
|
30
|
-
.light-mode-forced(@rules) {
|
|
31
|
-
.theme-light__forced &,
|
|
32
|
-
body.theme-system .theme-light__forced &,
|
|
33
|
-
body.theme-dark .theme-light__forced & {
|
|
34
|
-
@rules();
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// ===========================================================================
|
|
39
|
-
// -- DARKMODE
|
|
40
|
-
// .darkmode renders a dark mode override behind the
|
|
41
|
-
// prefers-color-scheme: dark media query and .theme-system. It also
|
|
42
|
-
// renders the same rules outside of the media query with .theme-dark
|
|
43
|
-
//
|
|
44
|
-
// Usage example:
|
|
45
|
-
//
|
|
46
|
-
// .dark-mode({ background-color: var(--black-100); });
|
|
47
|
-
//
|
|
48
|
-
// ---------------------------------------------------------------------------
|
|
49
|
-
|
|
1
|
+
// COLOR MODE OVERRIDES
|
|
2
|
+
/**
|
|
3
|
+
* Applies styles rules when dark mode is active.
|
|
4
|
+
*
|
|
5
|
+
* Usage example:
|
|
6
|
+
* .dark-mode({ background-color: var(--black-100); });
|
|
7
|
+
*/
|
|
50
8
|
.dark-mode(@rules) {
|
|
51
9
|
body.theme-system & {
|
|
52
10
|
@media (prefers-color-scheme: dark) {
|
|
@@ -61,22 +19,24 @@
|
|
|
61
19
|
}
|
|
62
20
|
}
|
|
63
21
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
// .highcontrast-mode({ background-color: var(--black-100); });
|
|
71
|
-
//
|
|
72
|
-
// ---------------------------------------------------------------------------
|
|
73
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Applies styles rules when high contrast mode is active.
|
|
24
|
+
*
|
|
25
|
+
* Usage example:
|
|
26
|
+
* .highcontrast-mode({ background-color: var(--black-100); });
|
|
27
|
+
*/
|
|
74
28
|
.highcontrast-mode(@rules) {
|
|
75
29
|
body.theme-highcontrast & {
|
|
76
30
|
@rules();
|
|
77
31
|
}
|
|
78
32
|
}
|
|
79
33
|
|
|
34
|
+
/**
|
|
35
|
+
* Applies styles rules when high contrast and dark mode is active.
|
|
36
|
+
*
|
|
37
|
+
* Usage example:
|
|
38
|
+
* .highcontrast-dark-mode({ background-color: var(--black-100); });
|
|
39
|
+
*/
|
|
80
40
|
.highcontrast-dark-mode(@rules) {
|
|
81
41
|
body.theme-highcontrast.theme-system & {
|
|
82
42
|
@media (prefers-color-scheme: dark) {
|
|
@@ -88,31 +48,9 @@
|
|
|
88
48
|
}
|
|
89
49
|
}
|
|
90
50
|
|
|
91
|
-
//
|
|
92
|
-
// -- FONT FACE
|
|
93
|
-
// Used to load hosted, custom webfonts. You must provide the font's
|
|
94
|
-
// full file path in the mixin. All modern browsers the WOFF file format.
|
|
95
|
-
// Will automatically add various local()s to try using already-installed
|
|
96
|
-
// fonts before downloading.
|
|
97
|
-
// ---------------------------------------------------------------------------
|
|
98
|
-
/* stylelint-disable at-rule-descriptor-value-no-unknown */
|
|
99
|
-
.font-face(@family, @path, @weight, @style) {
|
|
100
|
-
@font-face {
|
|
101
|
-
font-family: "@{family}";
|
|
102
|
-
font-style: @style;
|
|
103
|
-
font-weight: @weight;
|
|
104
|
-
& when (@style=italic) {
|
|
105
|
-
#stacks-internals #font-face-src(@family, @path, @weight, " Italic");
|
|
106
|
-
}
|
|
107
|
-
& when not (@style=italic) {
|
|
108
|
-
#stacks-internals #font-face-src(@family, @path, @weight, "");
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
/* stylelint-enable at-rule-descriptor-value-no-unknown */
|
|
113
|
-
|
|
51
|
+
// FOCUS STYLES
|
|
114
52
|
/**
|
|
115
|
-
*
|
|
53
|
+
* Applies focus styles for the given context.
|
|
116
54
|
*
|
|
117
55
|
* Usage example:
|
|
118
56
|
* .focus-styles(true, true);
|
|
@@ -122,152 +60,29 @@
|
|
|
122
60
|
*/
|
|
123
61
|
.focus-styles(@inset: false, @border: false) {
|
|
124
62
|
& when not (@inset) and not (@border) {
|
|
125
|
-
box-shadow: 0 0 0 var(--
|
|
63
|
+
box-shadow: 0 0 0 var(--su2) var(--focus-neutral), 0 0 0 var(--su4) var(--focus-theme);
|
|
126
64
|
}
|
|
127
65
|
|
|
128
66
|
& when not (@inset) and (@border) {
|
|
129
67
|
border-color: var(--focus-neutral) !important;
|
|
130
|
-
box-shadow: 0 0 0 var(--
|
|
68
|
+
box-shadow: 0 0 0 var(--su1) var(--focus-neutral), 0 0 0 var(--su3) var(--focus-theme);
|
|
131
69
|
}
|
|
132
70
|
|
|
133
71
|
& when (@inset) and not (@border) {
|
|
134
|
-
box-shadow: inset 0 0 0 var(--
|
|
72
|
+
box-shadow: inset 0 0 0 var(--su2) var(--focus-theme), inset 0 0 0 var(--su4) var(--focus-neutral);
|
|
135
73
|
}
|
|
136
74
|
|
|
137
75
|
& when (@inset) and (@border) {
|
|
138
76
|
border-color: var(--focus-theme) !important;
|
|
139
|
-
box-shadow: inset 0 0 0 var(--
|
|
77
|
+
box-shadow: inset 0 0 0 var(--su1) var(--focus-theme), inset 0 0 0 var(--su3) var(--focus-neutral);
|
|
140
78
|
}
|
|
141
79
|
|
|
142
80
|
// We include a 2px transparent outline to ensure Windows High Contrast Forced Color Mode
|
|
143
81
|
// includes outlines as expected See https://blogs.windows.com/msedgedev/2020/09/17/styling-for-windows-high-contrast-with-new-standards-for-forced-colors/
|
|
144
|
-
outline: var(--
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
// =============================================================================
|
|
148
|
-
// -- COLORS
|
|
149
|
-
// The following mixins let us do color math on the browser. They take a
|
|
150
|
-
// color prefix, and they expect the different values to be stored in
|
|
151
|
-
// --{prefix}-h, --{prefix}-s and --{prefix}-l
|
|
152
|
-
// -----------------------------------------------------------------------------
|
|
153
|
-
|
|
154
|
-
.load-color-variables(@amount) {
|
|
155
|
-
@amountDecimal: (@amount / 100);
|
|
156
|
-
@amountPercentage: @amount * 1%;
|
|
157
|
-
@complementDecimal: 1 - @amountDecimal;
|
|
158
|
-
@additionDecimal: 1 + @amountDecimal;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.assemble-color(@color-prefix) {
|
|
162
|
-
@result: hsl(var(~"--@{color-prefix}-h"),
|
|
163
|
-
var(~"--@{color-prefix}-s"),
|
|
164
|
-
var(~"--@{color-prefix}-l"));
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
// Increase the lightness of a color in the HSL color space by an absolute amount.
|
|
168
|
-
.native-lighten(@color-prefix, @amount) {
|
|
169
|
-
.load-color-variables(@amount);
|
|
170
|
-
@result: hsl(var(~"--@{color-prefix}-h"),
|
|
171
|
-
var(~"--@{color-prefix}-s"),
|
|
172
|
-
calc(var(~"--@{color-prefix}-l") + @amountPercentage));
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
// Decrease the lightness and saturation of a color in the HSL color space by absolute amounts.
|
|
176
|
-
.native-darken-desaturate(@color-prefix, @darken-amount, @desaturate-amount) {
|
|
177
|
-
@darkenAmountPercentage: .load-color-variables(@darken-amount)[@amountPercentage];
|
|
178
|
-
@desaturateAmountPercentage: .load-color-variables(@desaturate-amount)[@amountPercentage];
|
|
179
|
-
@result: hsl(var(~"--@{color-prefix}-h"),
|
|
180
|
-
calc(var(~"--@{color-prefix}-s") - @desaturateAmountPercentage),
|
|
181
|
-
calc(var(~"--@{color-prefix}-l") - @darkenAmountPercentage));
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
// Decrease the lightness of a color in the HSL color space by an absolute amount.
|
|
186
|
-
.native-darken(@color-prefix, @amount) {
|
|
187
|
-
.load-color-variables(@amount);
|
|
188
|
-
@result: hsl(var(~"--@{color-prefix}-h"),
|
|
189
|
-
var(~"--@{color-prefix}-s"),
|
|
190
|
-
calc(var(~"--@{color-prefix}-l") - @amountPercentage));
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
// Mix color with white in variable proportion
|
|
194
|
-
.native-tint(@color-prefix, @amount) {
|
|
195
|
-
.load-color-variables(@amount);
|
|
196
|
-
@ramount: 255 * @amountDecimal;
|
|
197
|
-
@gamount: 255 * @amountDecimal;
|
|
198
|
-
@bamount: 255 * @amountDecimal;
|
|
199
|
-
@result: rgb(calc(@ramount + var(~"--@{color-prefix}-r") * @complementDecimal),
|
|
200
|
-
calc(@gamount + var(~"--@{color-prefix}-g") * @complementDecimal),
|
|
201
|
-
calc(@bamount + var(~"--@{color-prefix}-b") * @complementDecimal));
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
// Mix color with black in variable proportion
|
|
205
|
-
.native-shade(@color-prefix, @amount) {
|
|
206
|
-
.load-color-variables(@amount);
|
|
207
|
-
@result: rgb(calc(var(~"--@{color-prefix}-r") * @complementDecimal),
|
|
208
|
-
calc(var(~"--@{color-prefix}-g") * @complementDecimal),
|
|
209
|
-
calc(var(~"--@{color-prefix}-b") * @complementDecimal));
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
// Set the absolute opacity of a color.
|
|
213
|
-
.native-fade(@color-prefix, @amount) {
|
|
214
|
-
.load-color-variables(@amount);
|
|
215
|
-
@result: hsla(var(~"--@{color-prefix}-h"),
|
|
216
|
-
var(~"--@{color-prefix}-s"),
|
|
217
|
-
var(~"--@{color-prefix}-l"),
|
|
218
|
-
@amountDecimal);
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
// =============================================================================
|
|
222
|
-
// -- SIZE STYLES
|
|
223
|
-
// The following mixins let us generate pseudo-private custom properties
|
|
224
|
-
// for common sizes. They expect a size (@size), a prefix for the custom
|
|
225
|
-
// property (@prefix), and an array of comma-separates abbreviated styles
|
|
226
|
-
// (@styles).
|
|
227
|
-
// -----------------------------------------------------------------------------
|
|
228
|
-
|
|
229
|
-
.size-styles(@size, @prefix, @styles, @index: length(@styles)) {
|
|
230
|
-
& when (@index > 0) {
|
|
231
|
-
@style: extract(@styles, @index);
|
|
232
|
-
|
|
233
|
-
// xs
|
|
234
|
-
& when (@size = xs) and (@style = fs) {
|
|
235
|
-
--_@{prefix}-fs: var(--fs-fine);
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
// sm
|
|
239
|
-
& when (@size = sm) and (@style = fs) {
|
|
240
|
-
--_@{prefix}-fs: var(--fs-caption);
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
// md
|
|
244
|
-
& when (@size = md) and (@style = br) {
|
|
245
|
-
--_@{prefix}-br: calc(var(--br-md) + var(--su-static1));
|
|
246
|
-
}
|
|
247
|
-
& when (@size = md) and (@style = fs) {
|
|
248
|
-
--_@{prefix}-fs: var(--fs-body3);
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
// lg
|
|
252
|
-
& when (@size = lg) and (@style = br) {
|
|
253
|
-
--_@{prefix}-br: calc(var(--br-md) + var(--su-static1));
|
|
254
|
-
}
|
|
255
|
-
& when (@size = lg) and (@style = fs) {
|
|
256
|
-
--_@{prefix}-fs: var(--fs-title);
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
// xl
|
|
260
|
-
& when (@size = xl) and (@style = br) {
|
|
261
|
-
--_@{prefix}-br: var(--br-md);
|
|
262
|
-
}
|
|
263
|
-
& when (@size = xl) and (@style = fs) {
|
|
264
|
-
--_@{prefix}-fs: var(--fs-headline1);
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
.size-styles(@size, @prefix, @styles, @index: @index - 1);
|
|
268
|
-
}
|
|
82
|
+
outline: var(--su2) solid transparent !important;
|
|
269
83
|
}
|
|
270
84
|
|
|
85
|
+
// SIZING
|
|
271
86
|
/**
|
|
272
87
|
* Generate base and responsive atomic sizing classes.
|
|
273
88
|
*
|
|
@@ -310,7 +125,6 @@
|
|
|
310
125
|
);
|
|
311
126
|
}
|
|
312
127
|
|
|
313
|
-
|
|
314
128
|
/**
|
|
315
129
|
* Generate atomic sizing classes using predefined SU (spacing unit) values.
|
|
316
130
|
*
|
|
@@ -338,68 +152,3 @@
|
|
|
338
152
|
1 2 3 4 5 6 7 8 9 10 11 12
|
|
339
153
|
);
|
|
340
154
|
}
|
|
341
|
-
|
|
342
|
-
// =============================================================================
|
|
343
|
-
// -- WEBKIT AUTOFILL
|
|
344
|
-
// -----------------------------------------------------------------------------
|
|
345
|
-
.webkit-autofill() {
|
|
346
|
-
&:-webkit-autofill {
|
|
347
|
-
&:focus {
|
|
348
|
-
border-color: var(--blue-400);
|
|
349
|
-
// Since the box shadow is overwritten to show a background, we have to re-add the focus outline
|
|
350
|
-
-webkit-box-shadow: 0 0 0 1000px var(--blue-200) inset, 0 0 0 var(--su-static4) var(--focus-ring);
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
-webkit-box-shadow: 0 0 0 1000px var(--theme-secondary-200) inset; // This acts as a background color by stretching an inset box shadow across the input
|
|
354
|
-
-webkit-text-fill-color: var(--black);
|
|
355
|
-
border-color: var(--blue-400);
|
|
356
|
-
transition: background-color 0s 50000s; // A hack to infinitely delay background styles that come from the browser.
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
&::-webkit-contacts-auto-fill-button {
|
|
360
|
-
background-color: var(--black); // In Safari, make the autocomplete button darkmode-aware
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
// ===========================================================================
|
|
366
|
-
// Internals only beyond this point -- helpers for .font-face()
|
|
367
|
-
// ---------------------------------------------------------------------------
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
#stacks-internals() {
|
|
371
|
-
|
|
372
|
-
// Generate all common variants for local names that this font face may have.
|
|
373
|
-
// The CSS spec (Font Module Level 3, Section 4.3) says to use "only the Postscript
|
|
374
|
-
// name or the full font name".
|
|
375
|
-
// For example, given the family "Comic Sans MS", weight 800, italic, we're
|
|
376
|
-
// trying these local names:
|
|
377
|
-
//
|
|
378
|
-
// - Comic Sans MS Extra Bold Italic
|
|
379
|
-
// - ComicSansMS-ExtraBoldItalic
|
|
380
|
-
// - Comic Sans MS 800 Italic
|
|
381
|
-
// - ComicSansMS-800Italic
|
|
382
|
-
//
|
|
383
|
-
// For the weight 400 we also include the un-weight-postfixed name ("Comic Sans MS Italic").
|
|
384
|
-
|
|
385
|
-
#font-face-src(@family, @path, @weight, @style-postfix) {
|
|
386
|
-
@index: round(@weight/100);
|
|
387
|
-
@weight-names: "Thin", "Extra Light", "Light", "Regular", "Medium", "Semi Bold", "Bold", "Extra Bold", "Black";
|
|
388
|
-
@weight-name: extract(@weight-names, @index);
|
|
389
|
-
#stacks-internals #font-face-src-postfix(@family, @path, "@{weight-name}", @weight, @style-postfix);
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
#font-face-src-postfix(@family, @path, @postfix-name, @postfix-number, @style-postfix) {
|
|
393
|
-
@family-nospace: replace(@family, " ", "");
|
|
394
|
-
@postfix-name-nospace: replace("@{postfix-name}@{style-postfix}", " ", "");
|
|
395
|
-
@postfix-number-nospace: replace("@{postfix-number}@{style-postfix}", " ", "");
|
|
396
|
-
|
|
397
|
-
& when (@postfix-name="Regular") {
|
|
398
|
-
src: local("@{family} @{postfix-name}@{style-postfix}"), local("@{family-nospace}-@{postfix-name-nospace}"), local("@{family} @{postfix-number}@{style-postfix}"), local("@{family-nospace}-@{postfix-number-nospace}"), local("@{family}@{style-postfix}"), @path format("woff");
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
& when not (@postfix-name="Regular") {
|
|
402
|
-
src: local("@{family} @{postfix-name}@{style-postfix}"), local("@{family-nospace}-@{postfix-name-nospace}"), local("@{family} @{postfix-number}@{style-postfix}"), local("@{family-nospace}-@{postfix-number-nospace}"), @path format("woff");
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
}
|
package/lib/stacks-static.less
CHANGED
|
@@ -5,14 +5,52 @@
|
|
|
5
5
|
@import "base/icon.less";
|
|
6
6
|
@import "input-utils.less";
|
|
7
7
|
|
|
8
|
-
//
|
|
8
|
+
// LESS CONSTANTS AND MIXINS
|
|
9
|
+
@import "exports/exports.less";
|
|
10
|
+
|
|
11
|
+
// CUSTOM PROPERTIES
|
|
12
|
+
@import "atomic/sizing.less";
|
|
13
|
+
|
|
14
|
+
// FOUNDATIONAL CLASSES
|
|
15
|
+
@import "atomic/color.less";
|
|
16
|
+
@import "atomic/typography.less";
|
|
17
|
+
|
|
18
|
+
// ATOMIC CLASSES
|
|
19
|
+
@import "atomic/backgrounds.less";
|
|
20
|
+
@import "atomic/borders.less";
|
|
21
|
+
@import "atomic/border-radius.less";
|
|
22
|
+
@import "atomic/box-shadow.less";
|
|
23
|
+
@import "atomic/box-sizing.less";
|
|
24
|
+
@import "atomic/current-color.less";
|
|
25
|
+
@import "atomic/cursors.less";
|
|
26
|
+
@import "atomic/display.less";
|
|
27
|
+
@import "atomic/flex.less";
|
|
28
|
+
@import "atomic/floats.less";
|
|
29
|
+
@import "atomic/gap.less";
|
|
30
|
+
@import "atomic/grid.less";
|
|
31
|
+
@import "atomic/height.less";
|
|
32
|
+
@import "atomic/interactivity.less";
|
|
33
|
+
@import "atomic/lists.less";
|
|
34
|
+
@import "atomic/margin.less";
|
|
35
|
+
@import "atomic/object-fit.less";
|
|
36
|
+
@import "atomic/opacity.less";
|
|
37
|
+
@import "atomic/outline.less";
|
|
38
|
+
@import "atomic/overflow.less";
|
|
39
|
+
@import "atomic/padding.less";
|
|
40
|
+
@import "atomic/positioning.less";
|
|
41
|
+
@import "atomic/truncation.less";
|
|
42
|
+
@import "atomic/vertical-alignment.less";
|
|
43
|
+
@import "atomic/visibility.less";
|
|
44
|
+
@import "atomic/width.less";
|
|
45
|
+
@import "atomic/z-index.less";
|
|
46
|
+
|
|
47
|
+
// COMPONENTS
|
|
9
48
|
@import "components/activity-indicator/activity-indicator.less";
|
|
10
49
|
@import "components/anchor/anchor.less";
|
|
11
50
|
@import "components/avatar/avatar.less";
|
|
12
51
|
@import "components/badge/badge.less";
|
|
13
52
|
@import "components/banner/banner.less";
|
|
14
53
|
@import "components/bling/bling.less";
|
|
15
|
-
@import "components/block-link/block-link.less";
|
|
16
54
|
@import "components/breadcrumbs/breadcrumbs.less";
|
|
17
55
|
@import "components/button/button.less";
|
|
18
56
|
@import "components/button-group/button-group.less";
|
|
@@ -53,23 +91,6 @@
|
|
|
53
91
|
@import "components/user-card/user-card.less";
|
|
54
92
|
@import "components/vote/vote.less";
|
|
55
93
|
|
|
56
|
-
// LESS CONSTANTS AND MIXINS
|
|
57
|
-
@import "exports/exports.less";
|
|
58
|
-
|
|
59
|
-
// -- ATOMIC CLASSES
|
|
60
|
-
@import "atomic/border.less";
|
|
61
|
-
@import "atomic/color.less";
|
|
62
|
-
@import "atomic/flex.less";
|
|
63
|
-
@import "atomic/gap.less";
|
|
64
|
-
@import "atomic/grid.less";
|
|
65
|
-
@import "atomic/height.less";
|
|
66
|
-
@import "atomic/positioning.less";
|
|
67
|
-
@import "atomic/spacing.less";
|
|
68
|
-
@import "atomic/sizing.less";
|
|
69
|
-
@import "atomic/typography.less";
|
|
70
|
-
@import "atomic/misc.less";
|
|
71
|
-
@import "atomic/width.less";
|
|
72
|
-
|
|
73
94
|
/* stylelint-disable */
|
|
74
95
|
#stacks-internals #screen-lg({
|
|
75
96
|
#stacks-internals-collect-large();
|
|
@@ -93,4 +114,4 @@
|
|
|
93
114
|
|
|
94
115
|
// CONFIG
|
|
95
116
|
@import "base/configuration-static.less";
|
|
96
|
-
@import "base/internal.less";
|
|
117
|
+
@import "base/internal.less";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackoverflow/stacks",
|
|
3
3
|
"description": "Stack Overflow’s CSS and Design Pattern Library. Stacks is an atomic CSS library with classes and components for rapidly building Stack Overflow.",
|
|
4
|
-
"version": "3.0.0-beta.
|
|
4
|
+
"version": "3.0.0-beta.25",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
7
7
|
"lib",
|