@stackoverflow/stacks 1.4.1 → 1.5.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 +2090 -536
- package/dist/css/stacks.min.css +1 -1
- package/lib/css/atomic/flex.less +53 -2
- package/lib/css/atomic/gap.less +13 -13
- package/lib/css/components/_styles-template.less +7 -4
- package/lib/css/components/activity-indicator.less +4 -3
- package/lib/css/components/avatars.less +2 -1
- package/lib/css/components/badges.less +12 -9
- package/lib/css/components/cards.less +4 -1
- package/lib/css/components/empty-states.less +6 -5
- package/lib/css/components/expandable.less +69 -59
- package/lib/css/components/labels.less +1 -1
- package/lib/css/components/menu.less +2 -0
- package/lib/css/components/modals.less +95 -120
- package/lib/css/components/navigation.less +1 -2
- package/lib/css/components/page-titles.less +1 -13
- package/lib/css/components/pagination.less +1 -1
- package/lib/css/components/popovers.less +132 -181
- package/lib/css/components/prose.less +0 -12
- package/lib/css/components/spinner.less +54 -104
- package/lib/css/components/tags.less +17 -17
- package/lib/css/components/toggle-switches.less +69 -120
- package/lib/css/components/uploader.less +48 -57
- package/lib/css/components/user-cards.less +91 -144
- package/package.json +7 -7
|
@@ -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
|
}
|
|
@@ -63,7 +63,6 @@
|
|
|
63
63
|
});
|
|
64
64
|
|
|
65
65
|
// STATES
|
|
66
|
-
// Selected
|
|
67
66
|
&.is-selected {
|
|
68
67
|
--_na-item-bg: var(--theme-primary-color);
|
|
69
68
|
--_na-item-fc: var(--white);
|
|
@@ -92,7 +91,7 @@
|
|
|
92
91
|
padding-right: 2em;
|
|
93
92
|
}
|
|
94
93
|
|
|
95
|
-
//
|
|
94
|
+
// INTERACTION
|
|
96
95
|
&:hover,
|
|
97
96
|
&:active {
|
|
98
97
|
background-color: var(--_na-item-bg-hover);
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
//
|
|
2
|
-
// STACK OVERFLOW
|
|
3
|
-
// PAGE TITLES
|
|
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
|
-
// ============================================================================
|
|
10
|
-
// $ BASE
|
|
11
|
-
// ----------------------------------------------------------------------------
|
|
12
|
-
|
|
13
1
|
.s-page-title {
|
|
14
2
|
--_pt-ai: flex-end;
|
|
15
3
|
--_pt-fd: row;
|
|
@@ -46,7 +34,7 @@
|
|
|
46
34
|
font-weight: normal;
|
|
47
35
|
line-height: var(--lh-sm);
|
|
48
36
|
margin: 0;
|
|
49
|
-
margin-bottom: 0; // TODO: investigate why this exists. I assume it's so margin-bottom isn't
|
|
37
|
+
margin-bottom: 0; // TODO: investigate why this exists. I assume it's so margin-bottom isn't overridden, but 🤷♂️
|
|
50
38
|
}
|
|
51
39
|
.s-breadcrumbs {
|
|
52
40
|
margin-bottom: var(--_pt-breadcrums-mb);
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
--_pa-item-bg: transparent;
|
|
4
4
|
--_pa-item-bc: var(--bc-medium);
|
|
5
5
|
--_pa-item-fc: var(--fc-medium);
|
|
6
|
-
// hover
|
|
7
6
|
--_pa-item-bg-hover: var(--black-100);
|
|
8
7
|
--_pa-item-bc-hover: var(--bc-darker);
|
|
9
8
|
--_pa-item-fc-hover: var(--fc-dark);
|
|
10
9
|
|
|
10
|
+
// CONTEXTUAL STYLES
|
|
11
11
|
.highcontrast-mode({ text-decoration: none; });
|
|
12
12
|
|
|
13
13
|
// MODIFIERS
|
|
@@ -1,197 +1,148 @@
|
|
|
1
|
-
//
|
|
2
|
-
// STACK OVERFLOW
|
|
3
|
-
// POPOVERS
|
|
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
|
-
// • VARIABLES
|
|
11
|
-
// • BASE STYLE
|
|
12
|
-
// • ARROWS
|
|
13
|
-
// • LOCATIONS
|
|
14
|
-
//
|
|
15
|
-
// ============================================================================
|
|
16
|
-
// $ BASE STYLES
|
|
17
|
-
// ----------------------------------------------------------------------------
|
|
18
1
|
.s-popover {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
2
|
+
--_po-bg: var(--white);
|
|
3
|
+
--_po-bc: var(--bc-medium);
|
|
4
|
+
--_po-bs: var(--bs-md);
|
|
5
|
+
--_po-d: none;
|
|
6
|
+
--_po-wmn: 12rem;
|
|
7
|
+
--_po-w: 100%;
|
|
8
|
+
// arrow
|
|
9
|
+
--_po-arrow-fc: var(--white);
|
|
10
|
+
--_po-arrow-b: unset;
|
|
11
|
+
--_po-arrow-l: unset;
|
|
12
|
+
--_po-arrow-r: unset;
|
|
13
|
+
--_po-arrow-t: unset;
|
|
14
|
+
--_po-arrow-ps: calc(var(--su6) * -1); // ps suffix used for placement, not positioning value
|
|
15
|
+
--_po-arrow-after-b: unset;
|
|
16
|
+
--_po-arrow-after-l: unset;
|
|
17
|
+
--_po-arrow-after-r: unset;
|
|
18
|
+
--_po-arrow-after-t: unset;
|
|
19
|
+
--_po-arrow-after-bs: unset;
|
|
20
|
+
|
|
21
|
+
// CONTEXTUAL STYLES
|
|
37
22
|
.dark-mode({
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
23
|
+
--_po-bg: var(--black-075);
|
|
24
|
+
--_po-bc: var(--bc-light);
|
|
25
|
+
--_po-bs: var(--bs-lg);
|
|
26
|
+
--_po-arrow-fc: var(--black-075);
|
|
41
27
|
});
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
width: auto;
|
|
45
|
-
min-width: unset;
|
|
46
|
-
}
|
|
47
|
-
|
|
28
|
+
|
|
29
|
+
// MODIFIERS
|
|
48
30
|
&.is-visible {
|
|
49
|
-
|
|
31
|
+
--_po-d: block;
|
|
50
32
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
.s-popover--arrow__bl,
|
|
55
|
-
.s-popover--arrow__br {
|
|
56
|
-
bottom: calc(var(--su6) * -1);
|
|
57
|
-
|
|
58
|
-
&:after {
|
|
59
|
-
bottom: 1px;
|
|
60
|
-
box-shadow: 2px 2px 5px 0 hsla(0, 0, 0, 0.07), 2px 2px 2px -1px hsla(0, 0, 0, 0.1);
|
|
61
|
-
|
|
62
|
-
.highcontrast-mode({
|
|
63
|
-
box-shadow: 1px 1px 0 0 var(--bc-medium);
|
|
64
|
-
});
|
|
65
|
-
}
|
|
33
|
+
&&__tooltip {
|
|
34
|
+
--_po-wmn: unset;
|
|
35
|
+
--_po-w: auto;
|
|
66
36
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
.highcontrast-mode({
|
|
79
|
-
box-shadow: -1px -1px 0 0 var(--bc-medium);
|
|
80
|
-
});
|
|
81
|
-
}
|
|
37
|
+
|
|
38
|
+
// CHILD ELEMENTS
|
|
39
|
+
// Arrow
|
|
40
|
+
&[data-popper-placement^="top"] > &--arrow,
|
|
41
|
+
& &--arrow__bc,
|
|
42
|
+
& &--arrow__bl,
|
|
43
|
+
& &--arrow__br {
|
|
44
|
+
--_po-arrow-b: var(--_po-arrow-ps);
|
|
45
|
+
--_po-arrow-after-b: var(--su-static1);
|
|
46
|
+
--_po-arrow-after-bs: 2px 2px 5px 0 hsla(0, 0%, 0%, 0.07), 2px 2px 2px -1px hsla(0, 0%, 0%, 0.1);
|
|
47
|
+
.highcontrast-mode({ --_po-arrow-after-bs: 1px 1px 0 0 var(--bc-medium); });
|
|
82
48
|
}
|
|
83
|
-
|
|
84
|
-
&
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
right: 1px;
|
|
92
|
-
box-shadow: 2px -2px 5px 0 hsla(0, 0, 0, 0.07), 2px -2px 2px -1px hsla(0, 0, 0, 0.1);
|
|
93
|
-
|
|
94
|
-
.highcontrast-mode({
|
|
95
|
-
box-shadow: 1px -1px 0 0 var(--bc-medium);
|
|
96
|
-
});
|
|
97
|
-
}
|
|
49
|
+
&[data-popper-placement^="bottom"] > &--arrow,
|
|
50
|
+
& &--arrow__tc,
|
|
51
|
+
& &--arrow__tl,
|
|
52
|
+
& &--arrow__tr {
|
|
53
|
+
--_po-arrow-t: var(--_po-arrow-ps);
|
|
54
|
+
--_po-arrow-after-t: var(--su-static1);
|
|
55
|
+
--_po-arrow-after-bs: -1px -1px 1px 0 hsla(0, 0%, 0%, 0.12);
|
|
56
|
+
.highcontrast-mode({ --_po-arrow-after-bs: -1px -1px 0 0 var(--bc-medium); });
|
|
98
57
|
}
|
|
99
|
-
|
|
100
|
-
&
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
left: 1px;
|
|
108
|
-
box-shadow: -2px 2px 5px 0 hsla(0, 0, 0, 0.07), -2px 2px 2px -1px hsla(0, 0, 0, 0.1);
|
|
109
|
-
|
|
110
|
-
.highcontrast-mode({
|
|
111
|
-
box-shadow: -1px 1px 0 0 var(--bc-medium);
|
|
112
|
-
});
|
|
113
|
-
}
|
|
58
|
+
&[data-popper-placement^="left"] > &--arrow,
|
|
59
|
+
& &--arrow__rc,
|
|
60
|
+
& &--arrow__rt,
|
|
61
|
+
& &--arrow__rb {
|
|
62
|
+
--_po-arrow-r: var(--_po-arrow-ps);
|
|
63
|
+
--_po-arrow-after-r: var(--su-static1);
|
|
64
|
+
--_po-arrow-after-bs: 2px -2px 5px 0 hsla(0, 0%, 0%, 0.07), 2px -2px 2px -1px hsla(0, 0%, 0%, 0.1);
|
|
65
|
+
.highcontrast-mode({ --_po-arrow-after-bs: 1px -1px 0 0 var(--bc-medium); });
|
|
114
66
|
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
67
|
+
&[data-popper-placement^="right"] > &--arrow,
|
|
68
|
+
& &--arrow__lc,
|
|
69
|
+
& &--arrow__lt,
|
|
70
|
+
& &--arrow__lb {
|
|
71
|
+
--_po-arrow-l: var(--_po-arrow-ps);
|
|
72
|
+
--_po-arrow-after-l: var(--su-static1);
|
|
73
|
+
--_po-arrow-after-bs: -2px 2px 5px 0 hsla(0, 0%, 0%, 0.07), -2px 2px 2px -1px hsla(0, 0%, 0%, 0.1);
|
|
74
|
+
.highcontrast-mode({ --_po-arrow-after-bs: -1px 1px 0 0 var(--bc-medium); });
|
|
119
75
|
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
top: calc(50% - var(--su6));
|
|
76
|
+
& &--arrow__tc,
|
|
77
|
+
& &--arrow__bc {
|
|
78
|
+
--_po-arrow-l: calc(50% - var(--su6));
|
|
124
79
|
}
|
|
125
|
-
|
|
126
|
-
|
|
80
|
+
& &--arrow__lc,
|
|
81
|
+
& &--arrow__rc {
|
|
82
|
+
--_po-arrow-t: calc(50% - var(--su6));
|
|
83
|
+
}
|
|
84
|
+
& &--arrow__tr,
|
|
127
85
|
.s-popover--arrow__br {
|
|
128
|
-
|
|
86
|
+
--_po-arrow-r: var(--su12);
|
|
129
87
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
bottom: var(--su12);
|
|
88
|
+
& &--arrow__rb,
|
|
89
|
+
& &--arrow__lb {
|
|
90
|
+
--_po-arrow-b: var(--su12);
|
|
134
91
|
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
//
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
// • LEFT & RIGHT DIRECTIONS (Top, Center, Bottom)
|
|
161
|
-
//
|
|
162
|
-
// ============================================================================
|
|
163
|
-
// $ BASE STYLE
|
|
164
|
-
// Sets the base arrow style for tooltips, popovers, and dropdowns.
|
|
165
|
-
// ----------------------------------------------------------------------------
|
|
92
|
+
& &--arrow {
|
|
93
|
+
&,
|
|
94
|
+
&:before,
|
|
95
|
+
&:after {
|
|
96
|
+
display: block;
|
|
97
|
+
height: var(--su12);
|
|
98
|
+
position: absolute;
|
|
99
|
+
width: var(--su12);
|
|
100
|
+
z-index: -1;
|
|
101
|
+
}
|
|
102
|
+
&:before, // This renders our border
|
|
103
|
+
&:after {
|
|
104
|
+
content: '';
|
|
105
|
+
transform: rotate(45deg);
|
|
106
|
+
}
|
|
107
|
+
&:after { // This renders our foreground color
|
|
108
|
+
bottom: var(--_po-arrow-after-b);
|
|
109
|
+
box-shadow: var(--_po-arrow-after-bs);
|
|
110
|
+
left: var(--_po-arrow-after-l);
|
|
111
|
+
right: var(--_po-arrow-after-r);
|
|
112
|
+
top: var(--_po-arrow-after-t);
|
|
113
|
+
|
|
114
|
+
background: currentColor;
|
|
115
|
+
border-radius: calc(var(--su-static1) * 1.5);
|
|
116
|
+
}
|
|
166
117
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
118
|
+
bottom: var(--_po-arrow-b);
|
|
119
|
+
color: var(--_po-arrow-fc);
|
|
120
|
+
left: var(--_po-arrow-l);
|
|
121
|
+
right: var(--_po-arrow-r);
|
|
122
|
+
top: var(--_po-arrow-t);
|
|
123
|
+
}
|
|
124
|
+
// Close btn
|
|
125
|
+
& &--close {
|
|
126
|
+
float: right; // Use floats for title wrapping
|
|
127
|
+
top: calc(var(--su8) * -1); // Compensate for s-popover's padding
|
|
128
|
+
right: calc(var(--su8) * -1); // Compensate for s-popover's padding
|
|
129
|
+
padding: var(--su8) !important;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
background-color: var(--_po-bg);
|
|
133
|
+
border: 1px solid var(--_po-bc);
|
|
134
|
+
box-shadow: var(--_po-bs);
|
|
135
|
+
display: var(--_po-d);
|
|
136
|
+
min-width: var(--_po-wmn);
|
|
137
|
+
width: var(--_po-w);
|
|
138
|
+
|
|
139
|
+
border-radius: var(--br-md);
|
|
140
|
+
color: var(--fc-dark);
|
|
141
|
+
font-size: var(--fs-body1);
|
|
142
|
+
max-width: 24rem;
|
|
143
|
+
padding: var(--su12);
|
|
170
144
|
position: absolute;
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
.s-popover--arrow {
|
|
178
|
-
color: var(--white);
|
|
179
|
-
|
|
180
|
-
.dark-mode({
|
|
181
|
-
color: var(--black-075);
|
|
182
|
-
});
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
.s-popover--arrow:before {
|
|
186
|
-
// This renders our border
|
|
187
|
-
content: '';
|
|
188
|
-
transform: rotate(45deg);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.s-popover--arrow:after {
|
|
192
|
-
// This renders our foreground color
|
|
193
|
-
content: '';
|
|
194
|
-
transform: rotate(45deg);
|
|
195
|
-
border-radius: 1.5px;
|
|
196
|
-
background: currentColor;
|
|
197
|
-
}
|
|
145
|
+
white-space: normal; // Guard against popovers being in a container with white-space: nowrap. Without this, the content pops *out* of the popover.
|
|
146
|
+
z-index: var(--zi-popovers);
|
|
147
|
+
}
|
|
148
|
+
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
//
|
|
2
|
-
// STACK OVERFLOW
|
|
3
|
-
// PROSE
|
|
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
|
-
// ============================================================================
|
|
10
|
-
// $ BASE
|
|
11
|
-
// ----------------------------------------------------------------------------
|
|
12
|
-
|
|
13
1
|
.s-prose {
|
|
14
2
|
--s-prose-line-height: 1.5;
|
|
15
3
|
--s-prose-spacing: 1.1em;
|