@stackoverflow/stacks 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/stacks.css +1584 -1666
- package/dist/css/stacks.min.css +1 -1
- package/lib/css/atomic/colors.less +1 -1
- package/lib/css/components/badges.less +3 -3
- package/lib/css/components/button-groups.less +59 -83
- package/lib/css/components/buttons.less +384 -585
- package/lib/css/components/code-blocks.less +98 -125
- package/lib/css/components/inputs.less +38 -24
- package/lib/css/components/link-previews.less +110 -122
- package/lib/css/components/links.less +0 -16
- package/lib/css/components/notices.less +187 -180
- package/lib/css/components/post-summary.less +0 -9
- package/lib/css/components/progress-bars.less +236 -297
- package/lib/css/components/prose.less +293 -380
- package/lib/css/components/sidebar-widgets.less +251 -0
- package/lib/css/components/tables.less +0 -24
- package/lib/css/components/topbar.less +10 -11
- package/lib/css/stacks-dynamic.less +0 -1
- package/lib/css/stacks-static.less +1 -1
- package/package.json +9 -9
- package/lib/css/components/_styles-template.less +0 -78
- package/lib/css/components/widget-dynamic.less +0 -33
- package/lib/css/components/widget-static.less +0 -274
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
// visit https://stackoverflow.design/
|
|
8
8
|
//
|
|
9
9
|
// ============================================================================
|
|
10
|
-
//
|
|
10
|
+
// UTILITY OVERRIDES
|
|
11
11
|
// Instead of re-adding colors to unique class names, use these atomic classes
|
|
12
12
|
// for text and background colors
|
|
13
13
|
// ============================================================================
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
// Number counts
|
|
20
20
|
&&__rep,
|
|
21
21
|
&&__rep-down,
|
|
22
|
-
&&__votes,
|
|
22
|
+
&&__votes:not(&__answered),
|
|
23
23
|
// Users
|
|
24
24
|
&&__admin,
|
|
25
25
|
&&__moderator,
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
}
|
|
77
77
|
&&__rep,
|
|
78
78
|
&&__rep-down,
|
|
79
|
-
&&__votes {
|
|
79
|
+
&&__votes:not(&__answered) {
|
|
80
80
|
--_ba-bg: var(--white);
|
|
81
81
|
}
|
|
82
82
|
&&__answered {
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
--_ba-bc: var(--red-400);
|
|
97
97
|
--_ba-fc: var(--red-500);
|
|
98
98
|
}
|
|
99
|
-
&&__votes {
|
|
99
|
+
&&__votes:not(&__answered) {
|
|
100
100
|
--_ba-bc: var(--black-150);
|
|
101
101
|
--_ba-fc: var(--black-700);
|
|
102
102
|
}
|
|
@@ -1,104 +1,80 @@
|
|
|
1
|
-
//
|
|
2
|
-
// STACK OVERFLOW
|
|
3
|
-
// BUTTON GROUPS
|
|
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
|
-
// • BUTTON GROUP CONTAINER
|
|
11
|
-
|
|
12
|
-
// ============================================================================
|
|
13
|
-
// $ CONTAINER
|
|
14
|
-
// ----------------------------------------------------------------------------
|
|
15
1
|
.s-btn-group {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
margin-bottom: -1px; // When wrapping we need to account for the border
|
|
22
|
-
white-space: nowrap; // When the buttons wrap, they get super tall and mess up the whole layout
|
|
2
|
+
// CONTEXTUAL STYLES
|
|
3
|
+
#stacks-internals #screen-sm({
|
|
4
|
+
.s-btn {
|
|
5
|
+
&.s-btn__dropdown {
|
|
6
|
+
padding-right: 1.2em;
|
|
23
7
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
8
|
+
&:after {
|
|
9
|
+
right: 0.4em;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
28
12
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
border-radius: 0;
|
|
13
|
+
padding-left: 0.4em;
|
|
14
|
+
padding-right: 0.4em;
|
|
32
15
|
}
|
|
16
|
+
}, @force-selector: true);
|
|
33
17
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
18
|
+
// VARIANTS
|
|
19
|
+
&:not(&--radio) .s-btn:not(:first-child):not(:last-child),
|
|
20
|
+
&&--radio .s-btn:not(:first-of-type):not(:last-of-type) {
|
|
21
|
+
border-radius: 0;
|
|
22
|
+
}
|
|
39
23
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
24
|
+
&:not(&--radio) .s-btn:first-child:not(:only-child),
|
|
25
|
+
&&--radio .s-btn:first-of-type:not(:last-of-type) {
|
|
26
|
+
border-top-right-radius: 0;
|
|
27
|
+
border-bottom-right-radius: 0;
|
|
28
|
+
}
|
|
45
29
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
30
|
+
&:not(&--radio) .s-btn:last-child:not(:only-child),
|
|
31
|
+
&&--radio .s-btn:last-of-type:not(:first-of-type) {
|
|
32
|
+
border-top-left-radius: 0;
|
|
33
|
+
border-bottom-left-radius: 0;
|
|
34
|
+
}
|
|
50
35
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
36
|
+
&:not(&--radio) .s-btn:not(:last-child),
|
|
37
|
+
&&--radio .s-btn:not(:last-of-type) {
|
|
38
|
+
margin-right: calc(var(--su-static1) * -1);
|
|
39
|
+
}
|
|
55
40
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
41
|
+
// CHILD ELEMENTS
|
|
42
|
+
form {
|
|
43
|
+
&:not(:first-child):not(:last-child) {
|
|
44
|
+
.s-btn {
|
|
45
|
+
border-radius: 0;
|
|
59
46
|
}
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
&:active {
|
|
63
|
-
z-index: var(--zi-active);
|
|
64
47
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
.s-btn.s-btn__dropdown {
|
|
74
|
-
padding-right: 1.2em;
|
|
75
|
-
|
|
76
|
-
&:after {
|
|
77
|
-
right: 0.4em;
|
|
48
|
+
&:last-child:not(:only-child) {
|
|
49
|
+
.s-btn:not(:last-child) {
|
|
50
|
+
border-radius: 0;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
&:first-child:not(:only-child) {
|
|
54
|
+
.s-btn:not(:first-child) {
|
|
55
|
+
border-radius: 0;
|
|
78
56
|
}
|
|
79
57
|
}
|
|
80
|
-
}, @force-selector: true);
|
|
81
58
|
|
|
82
|
-
.s-btn-group--container {
|
|
83
59
|
display: flex;
|
|
60
|
+
margin-right: calc(var(--su-static1) * -1); // -1px
|
|
61
|
+
}
|
|
84
62
|
|
|
85
|
-
|
|
86
|
-
|
|
63
|
+
.s-btn {
|
|
64
|
+
&:active {
|
|
65
|
+
z-index: var(--zi-active);
|
|
87
66
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
67
|
+
&.is-selected,
|
|
68
|
+
&--radio:checked + .s-btn {
|
|
69
|
+
z-index: var(--zi-selected); // When the button is active or selected, it should pop above its siblings
|
|
91
70
|
}
|
|
92
71
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
border-bottom-right-radius: 0;
|
|
96
|
-
margin-left: 0;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
&:last-child .s-btn {
|
|
100
|
-
border-top-left-radius: 0;
|
|
101
|
-
border-bottom-left-radius: 0;
|
|
102
|
-
}
|
|
72
|
+
margin-bottom: calc(var(--su-static1) * -1); // When wrapping we need to account for the border
|
|
73
|
+
white-space: nowrap; // When the buttons wrap, they get super tall and mess up the whole layout
|
|
103
74
|
}
|
|
75
|
+
|
|
76
|
+
// STATIC COMPONENT STYLES
|
|
77
|
+
display: flex;
|
|
78
|
+
flex-wrap: wrap;
|
|
79
|
+
margin-bottom: var(--su-static1); // Compensate for buttons having a margin bottom of -1px to account for row wrapping
|
|
104
80
|
}
|