@stackoverflow/stacks 1.4.2 → 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 +3565 -2093
- package/dist/css/stacks.min.css +1 -1
- package/lib/css/atomic/colors.less +1 -1
- package/lib/css/atomic/flex.less +53 -2
- package/lib/css/components/activity-indicator.less +3 -3
- package/lib/css/components/badges.less +11 -11
- 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/expandable.less +69 -59
- 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/modals.less +95 -120
- package/lib/css/components/notices.less +187 -180
- package/lib/css/components/popovers.less +132 -181
- 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/spinner.less +54 -104
- package/lib/css/components/tables.less +0 -24
- package/lib/css/components/toggle-switches.less +69 -120
- package/lib/css/components/topbar.less +10 -11
- package/lib/css/components/user-cards.less +91 -144
- package/lib/css/stacks-dynamic.less +0 -1
- package/lib/css/stacks-static.less +1 -1
- package/package.json +11 -11
- 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
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
//
|
|
2
|
-
// STACK OVERFLOW
|
|
3
|
-
// TYPOGRAPHY
|
|
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
|
-
// • LINKS
|
|
11
|
-
//
|
|
12
|
-
|
|
13
|
-
// ============================================================================
|
|
14
|
-
// $ LINKS
|
|
15
|
-
// ----------------------------------------------------------------------------
|
|
16
|
-
|
|
17
1
|
a,
|
|
18
2
|
.s-link {
|
|
19
3
|
text-decoration: none;
|
|
@@ -1,133 +1,108 @@
|
|
|
1
|
-
//
|
|
2
|
-
// STACK OVERFLOW
|
|
3
|
-
// MODALS
|
|
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
|
-
// • BASE STYLE
|
|
11
|
-
// • LAYOUT TRANSITIONS
|
|
12
|
-
//
|
|
13
|
-
// ============================================================================
|
|
14
|
-
// $ BASE STYLE
|
|
15
|
-
// ----------------------------------------------------------------------------
|
|
16
1
|
.s-modal {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
&[aria-hidden="false"],
|
|
36
|
-
&[aria-hidden="false"] .s-modal--dialog {
|
|
37
|
-
visibility: visible;
|
|
38
|
-
z-index: var(--zi-modals);
|
|
39
|
-
opacity: 1;
|
|
40
|
-
transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
|
|
41
|
-
transition: opacity 100ms var(--te-smooth) 10ms, z-index 0s 0s, visibility 0s 0s, transform 100ms var(--te-smooth) 10ms, transform 100ms var(--te-smooth) 10ms; // Transition in
|
|
2
|
+
--_mo-bg: fade(@black-900, 50%); // Background remains fixed
|
|
3
|
+
--_mo-hmx: unset;
|
|
4
|
+
--_mo-wmx: unset;
|
|
5
|
+
--_mo-close-t: var(--su8);
|
|
6
|
+
--_mo-dialog-bg: var(--white);
|
|
7
|
+
--_mo-dialog-pt: var(--su24);
|
|
8
|
+
--_mo-header-fc: var(--fc-dark);
|
|
9
|
+
|
|
10
|
+
// CONTEXTUAL STYLES
|
|
11
|
+
&[aria-hidden="false"] {
|
|
12
|
+
&,
|
|
13
|
+
.s-modal--dialog {
|
|
14
|
+
opacity: 1;
|
|
15
|
+
transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
|
|
16
|
+
transition: opacity 100ms var(--te-smooth) 10ms, z-index 0s 0s, visibility 0s 0s, transform 100ms var(--te-smooth) 10ms, transform 100ms var(--te-smooth) 10ms; // Transition in
|
|
17
|
+
visibility: visible;
|
|
18
|
+
z-index: var(--zi-modals);
|
|
19
|
+
}
|
|
42
20
|
}
|
|
43
|
-
}
|
|
44
21
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
max-width: 600px;
|
|
50
|
-
max-height: 100%;
|
|
51
|
-
padding: var(--su24);
|
|
52
|
-
border-radius: var(--br-lg);
|
|
53
|
-
background-color: var(--white);
|
|
54
|
-
box-shadow: var(--bs-lg);
|
|
55
|
-
opacity: 0;
|
|
56
|
-
backface-visibility: hidden;
|
|
57
|
-
transform: translate3d(0, 30%, 0) scale3d(0.6, 0.6, 0.6);
|
|
58
|
-
|
|
59
|
-
.dark-mode({
|
|
60
|
-
background-color: var(--black-100);
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
@scrollbar-styles();
|
|
22
|
+
// MODIFIERS
|
|
23
|
+
&&__celebration {
|
|
24
|
+
--_mo-close-t: var(--su48);
|
|
25
|
+
--_mo-dialog-pt: var(--su64);
|
|
64
26
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
.s-modal[aria-hidden="false"] & {
|
|
69
|
-
transform: translate3d(0, 0, 0) scale3d(1, 1, 1); // Transition in
|
|
27
|
+
.s-modal--dialog {
|
|
28
|
+
.bg-confetti-animated;
|
|
29
|
+
}
|
|
70
30
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
.s-modal--close {
|
|
75
|
-
position: absolute !important; // [1]
|
|
76
|
-
top: var(--su8);
|
|
77
|
-
right: var(--su8);
|
|
78
|
-
padding: var(--su12) !important; // [1]
|
|
79
|
-
|
|
80
|
-
.svg-icon {
|
|
81
|
-
margin: 0 !important;
|
|
31
|
+
&&__full {
|
|
32
|
+
--_mo-hmx: calc(100% - var(--su48));
|
|
33
|
+
--_mo-wmx: calc(100% - var(--su48));
|
|
82
34
|
}
|
|
83
|
-
}
|
|
84
35
|
|
|
85
|
-
//
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
color: var(--fc-dark);
|
|
91
|
-
font-size: var(--fs-headline1);
|
|
92
|
-
font-weight: normal;
|
|
93
|
-
line-height: var(--lh-sm);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.s-modal--body {
|
|
97
|
-
margin-bottom: var(--su24);
|
|
98
|
-
color: var(--fc-medium);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.s-modal--footer {
|
|
102
|
-
margin-top: var(--su24);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
// ============================================================================
|
|
107
|
-
// $ STATES
|
|
108
|
-
// ----------------------------------------------------------------------------
|
|
109
|
-
.s-modal.has-danger,
|
|
110
|
-
.s-modal.s-modal__danger {
|
|
111
|
-
background-color: darken(fade(@red-900, 50%), 23%);
|
|
112
|
-
|
|
113
|
-
.s-modal--header {
|
|
114
|
-
color: var(--red-600);
|
|
36
|
+
// VARIANTS
|
|
37
|
+
&.has-danger,
|
|
38
|
+
&&__danger {
|
|
39
|
+
--_mo-bg: darken(fade(@red-900, 50%), 23%);
|
|
40
|
+
--_mo-header-fc: var(--red-600);
|
|
115
41
|
}
|
|
116
|
-
}
|
|
117
42
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
43
|
+
// CHILD ELEMENTS
|
|
44
|
+
& &--body {
|
|
45
|
+
color: var(--fc-medium);
|
|
46
|
+
margin-bottom: var(--su24);
|
|
47
|
+
}
|
|
48
|
+
& &--close {
|
|
49
|
+
// [1] To override .s-btn class attributes
|
|
50
|
+
.svg-icon {
|
|
51
|
+
margin: 0 !important;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
padding: var(--su12) !important; // [1]
|
|
55
|
+
position: absolute !important; // [1]
|
|
56
|
+
right: var(--su8);
|
|
57
|
+
top: var(--_mo-close-t);
|
|
58
|
+
}
|
|
59
|
+
& &--dialog {
|
|
60
|
+
.dark-mode({
|
|
61
|
+
--_mo-dialog-bg: var(--black-100);
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
padding: var(--_mo-dialog-pt) var(--su24) var(--su24);
|
|
65
|
+
|
|
66
|
+
@scrollbar-styles();
|
|
67
|
+
backface-visibility: hidden;
|
|
68
|
+
background-color: var(--_mo-dialog-bg);
|
|
69
|
+
border-radius: var(--br-lg);
|
|
70
|
+
box-shadow: var(--bs-lg);
|
|
71
|
+
max-height: 100%;
|
|
72
|
+
max-width: 600px;
|
|
73
|
+
opacity: 0;
|
|
74
|
+
overflow-y: auto;
|
|
75
|
+
transform: translate3d(0, 30%, 0) scale3d(0.6, 0.6, 0.6);
|
|
76
|
+
transition: opacity 200ms var(--te-smooth) 0s, z-index 0s 100ms, visibility 0s 100ms, transform 100ms var(--te-smooth) 0s, transform 100ms var(--te-smooth) 0s; // Transition out
|
|
77
|
+
visibility: hidden;
|
|
78
|
+
will-change: visibility, z-index, opacity, transform; // Not supported by Edge
|
|
79
|
+
z-index: var(--zi-hide); // Make sure it's also below everything so we can't interact with it.
|
|
80
|
+
}
|
|
81
|
+
& &--footer {
|
|
82
|
+
margin-top: var(--su24);
|
|
83
|
+
}
|
|
84
|
+
& &--header {
|
|
85
|
+
color: var(--_mo-header-fc);
|
|
121
86
|
|
|
122
|
-
|
|
123
|
-
|
|
87
|
+
font-size: var(--fs-headline1);
|
|
88
|
+
font-weight: normal;
|
|
89
|
+
line-height: var(--lh-sm);
|
|
90
|
+
margin-bottom: var(--su16);
|
|
124
91
|
}
|
|
125
|
-
}
|
|
126
92
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
93
|
+
background-color: var(--_mo-bg);
|
|
94
|
+
max-height: var(--_mo-hmx);
|
|
95
|
+
max-width: var(--_mo-wmx);
|
|
96
|
+
|
|
97
|
+
align-items: center;
|
|
98
|
+
backface-visibility: hidden;
|
|
99
|
+
display: flex;
|
|
100
|
+
inset: 0; // This fills the entire viewport without having to worry about size.
|
|
101
|
+
justify-content: center;
|
|
102
|
+
opacity: 0;
|
|
103
|
+
position: fixed;
|
|
104
|
+
transition: opacity 100ms var(--te-smooth) 0s, z-index 0s 100ms, visibility 0s 100ms; // Transition out
|
|
105
|
+
visibility: hidden;
|
|
106
|
+
will-change: visibility, z-index, opacity; // Not supported in Edge
|
|
107
|
+
z-index: var(--zi-hide); // Make sure it's also below everything so we can't interact with it.
|
|
133
108
|
}
|