@stackoverflow/stacks 1.0.0 → 1.0.1

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 (71) hide show
  1. package/README.md +47 -47
  2. package/dist/css/stacks.css +108 -0
  3. package/dist/css/stacks.min.css +1 -1
  4. package/lib/css/atomic/borders.less +378 -378
  5. package/lib/css/atomic/colors.less +209 -209
  6. package/lib/css/atomic/flex.less +375 -375
  7. package/lib/css/atomic/grid.less +174 -174
  8. package/lib/css/atomic/misc.less +343 -343
  9. package/lib/css/atomic/spacing.less +332 -314
  10. package/lib/css/atomic/typography.less +273 -273
  11. package/lib/css/atomic/width-height.less +194 -194
  12. package/lib/css/base/body.less +44 -44
  13. package/lib/css/base/configuration-static.less +61 -61
  14. package/lib/css/base/icons.less +20 -20
  15. package/lib/css/base/internals.less +220 -220
  16. package/lib/css/base/reset-meyer.less +64 -64
  17. package/lib/css/base/reset-normalize.less +449 -449
  18. package/lib/css/base/reset.less +20 -20
  19. package/lib/css/components/activity-indicator.less +45 -45
  20. package/lib/css/components/avatars.less +189 -189
  21. package/lib/css/components/badges.less +209 -209
  22. package/lib/css/components/banners.less +80 -80
  23. package/lib/css/components/blank-states.less +26 -26
  24. package/lib/css/components/breadcrumbs.less +44 -44
  25. package/lib/css/components/button-groups.less +104 -104
  26. package/lib/css/components/buttons.less +665 -665
  27. package/lib/css/components/cards.less +44 -44
  28. package/lib/css/components/code-blocks.less +130 -130
  29. package/lib/css/components/collapsible.less +104 -104
  30. package/lib/css/components/inputs.less +728 -728
  31. package/lib/css/components/link-previews.less +136 -136
  32. package/lib/css/components/links.less +218 -218
  33. package/lib/css/components/menu.less +47 -47
  34. package/lib/css/components/modals.less +133 -133
  35. package/lib/css/components/navigation.less +146 -146
  36. package/lib/css/components/notices.less +233 -233
  37. package/lib/css/components/page-titles.less +60 -60
  38. package/lib/css/components/pagination.less +55 -55
  39. package/lib/css/components/popovers.less +197 -197
  40. package/lib/css/components/post-summary.less +425 -425
  41. package/lib/css/components/progress-bars.less +330 -330
  42. package/lib/css/components/prose.less +503 -503
  43. package/lib/css/components/spinner.less +107 -107
  44. package/lib/css/components/tables.less +341 -341
  45. package/lib/css/components/tags.less +236 -236
  46. package/lib/css/components/toggle-switches.less +144 -144
  47. package/lib/css/components/topbar.less +427 -427
  48. package/lib/css/components/uploader.less +210 -210
  49. package/lib/css/components/user-cards.less +169 -169
  50. package/lib/css/components/widget-dynamic.less +33 -33
  51. package/lib/css/components/widget-static.less +273 -273
  52. package/lib/css/exports/constants-colors.less +1092 -1092
  53. package/lib/css/exports/constants-helpers.less +108 -108
  54. package/lib/css/exports/constants-type.less +153 -153
  55. package/lib/css/exports/exports.less +15 -15
  56. package/lib/css/exports/mixins.less +237 -237
  57. package/lib/css/stacks-dynamic.less +35 -35
  58. package/lib/css/stacks-static.less +86 -86
  59. package/lib/css/stacks.less +13 -13
  60. package/lib/ts/controllers/index.ts +7 -7
  61. package/lib/ts/controllers/s-expandable-control.ts +188 -188
  62. package/lib/ts/controllers/s-modal.ts +321 -321
  63. package/lib/ts/controllers/s-navigation-tablist.ts +117 -117
  64. package/lib/ts/controllers/s-popover.ts +547 -547
  65. package/lib/ts/controllers/s-table.ts +220 -220
  66. package/lib/ts/controllers/s-tooltip.ts +246 -246
  67. package/lib/ts/controllers/s-uploader.ts +172 -172
  68. package/lib/ts/index.ts +20 -20
  69. package/lib/ts/stacks.ts +88 -88
  70. package/lib/tsconfig.json +13 -13
  71. package/package.json +87 -87
@@ -1,209 +1,209 @@
1
- //
2
- // STACK OVERFLOW
3
- // BADGES
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
- // • STYLE VARIATIONS
12
- // • LAYOUTS & SIZES
13
- //
14
- // ===========================================================================
15
- // $ MIXIN
16
- // Any badge we use will always modify the same items, so to save time,
17
- // here's a mixin to state all that CSS.
18
- // ---------------------------------------------------------------------------
19
- .badge-styles(@border: transparent, @background: transparent, @color: inherit) {
20
- border-color: @border;
21
- background-color: @background;
22
- color: @color;
23
- }
24
-
25
- // ===========================================================================
26
- // $ BASE STYLE
27
- // The same style is applied to all badges. Do not modify the core style.
28
- // ---------------------------------------------------------------------------
29
- .s-badge {
30
- display: inline-flex;
31
- align-items: center;
32
- justify-content: center;
33
- min-width: 0;
34
- padding: 0 var(--su6);
35
- border-width: 1px;
36
- border-style: solid;
37
- border-radius: var(--br-sm);
38
- font-size: var(--fs-caption);
39
- font-weight: normal;
40
- line-height: 2;
41
- text-decoration: none;
42
- vertical-align: middle;
43
- white-space: nowrap;
44
-
45
- .badge-styles(var(--bc-medium), var(--black-050), var(--black-700));
46
-
47
- a&:hover {
48
- text-decoration: none;
49
- }
50
- }
51
-
52
- // $ BADGE IMAGE
53
- // When we have a badge image
54
- // ---------------------------------------------------------------------------
55
- .s-badge--image {
56
- display: inline-flex;
57
- align-self: center;
58
- margin-right: var(--su1);
59
- margin-left: calc((var(--su4) + var(--su1)) * -1);
60
- }
61
-
62
- // $ BADGE SIZES
63
- // ---------------------------------------------------------------------------
64
- .s-badge__sm {
65
- min-width: 18px;
66
- align-self: flex-start;
67
- padding-right: var(--su4);
68
- padding-left: var(--su4);
69
- font-size: var(--fs-fine);
70
- line-height: 1.8;
71
- }
72
-
73
- .s-badge__xs {
74
- align-self: flex-start;
75
- padding-right: var(--su2);
76
- padding-left: var(--su2);
77
- font-size: var(--fs-fine);
78
- line-height: 1.5;
79
- }
80
-
81
- // $$ Badge Counts
82
- // ---------------------------------------------------------------------------
83
- .s-badge__gold {
84
- .badge-styles(var(--gold-darker), var(--gold-lighter), var(--black-700));
85
- }
86
- .s-badge__silver {
87
- .badge-styles(var(--silver-darker), var(--silver-lighter), var(--black-700));
88
- }
89
- .s-badge__bronze {
90
- .badge-styles(var(--bronze-darker), var(--bronze-lighter), var(--black-700));
91
- }
92
- .s-badge__gold,
93
- .s-badge__silver,
94
- .s-badge__bronze {
95
- .highcontrast-mode({
96
- border-color: currentColor;
97
- color: var(--black-900);
98
- });
99
- }
100
-
101
- // $$ Number Counts
102
- // ---------------------------------------------------------------------------
103
- .s-badge__bounty {
104
- .badge-styles(transparent, var(--blue-600), var(--white));
105
- }
106
- .s-badge__votes {
107
- .badge-styles(var(--black-150), var(--white), var(--black-700));
108
-
109
- .highcontrast-mode({ border-color: currentColor; });
110
- }
111
- .s-badge__answered {
112
- .badge-styles(transparent, var(--green-400), var(--white));
113
- }
114
- .s-badge__rep {
115
- .badge-styles(var(--green-400), var(--white), var(--green-500));
116
- .highcontrast-mode({ border-color: currentColor; });
117
- }
118
- .s-badge__rep-down {
119
- .badge-styles(var(--red-400), var(--white), var(--red-500));
120
- .highcontrast-mode({ border-color: currentColor; });
121
- }
122
- .s-badge__important {
123
- .badge-styles(transparent, var(--red-600), var(--white));
124
- }
125
-
126
- // $$ Users
127
- // ---------------------------------------------------------------------------
128
- .s-badge__admin {
129
- .badge-styles(var(--theme-primary-200), var(--theme-primary-075), var(--theme-primary-800));
130
- .highcontrast-mode({ border-color: currentColor; });
131
- }
132
- .s-badge__moderator {
133
- .badge-styles(var(--theme-secondary-200), var(--theme-secondary-075), var(--theme-secondary-800));
134
- .highcontrast-mode({ border-color: currentColor; });
135
-
136
- &:before {
137
- --s-badge-moderator-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");
138
-
139
- content: "";
140
- display: inline-block;
141
- background-color: currentColor;
142
- -webkit-mask: var(--s-badge-moderator-icon) no-repeat center;
143
- mask: var(--s-badge-moderator-icon) no-repeat center;
144
- -webkit-mask-size: contain;
145
- mask-size: contain;
146
-
147
- width: 12px;
148
- height: 14px;
149
- margin-top: -1px;
150
- margin-right: 3px;
151
- }
152
-
153
- &.s-badge__sm:before {
154
- --s-badge-moderator-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");
155
-
156
- width: 9px;
157
- height: 11px;
158
- margin-top: 0;
159
- margin-right: 2px;
160
- }
161
-
162
- &.s-badge__xs:before {
163
- --s-badge-moderator-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");
164
-
165
- width: 7px;
166
- height: 9px;
167
- margin-top: 0;
168
- }
169
- }
170
-
171
- .s-badge__staff {
172
- // Staff badges are always "Stack Overflow Orange"
173
- .badge-styles(var(--orange-300), var(--orange-100), var(--orange-900));
174
- .highcontrast-mode({ border-color: currentColor; });
175
- }
176
-
177
- // $$ Award Count
178
- // ---------------------------------------------------------------------------
179
- .s-award-bling {
180
- display: flex;
181
- align-items: center;
182
- color: inherit;
183
-
184
- &:before {
185
- content: "";
186
- margin-right: 4px;
187
- width: 8px;
188
- height: 8px;
189
- border-radius: 100%;
190
- }
191
-
192
- &.s-award-bling__gold {
193
- &:before {
194
- background-color: var(--gold);
195
- }
196
- }
197
-
198
- &.s-award-bling__silver {
199
- &:before {
200
- background-color: var(--silver);
201
- }
202
- }
203
-
204
- &.s-award-bling__bronze {
205
- &:before {
206
- background-color: var(--bronze);
207
- }
208
- }
209
- }
1
+ //
2
+ // STACK OVERFLOW
3
+ // BADGES
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
+ // • STYLE VARIATIONS
12
+ // • LAYOUTS & SIZES
13
+ //
14
+ // ===========================================================================
15
+ // $ MIXIN
16
+ // Any badge we use will always modify the same items, so to save time,
17
+ // here's a mixin to state all that CSS.
18
+ // ---------------------------------------------------------------------------
19
+ .badge-styles(@border: transparent, @background: transparent, @color: inherit) {
20
+ border-color: @border;
21
+ background-color: @background;
22
+ color: @color;
23
+ }
24
+
25
+ // ===========================================================================
26
+ // $ BASE STYLE
27
+ // The same style is applied to all badges. Do not modify the core style.
28
+ // ---------------------------------------------------------------------------
29
+ .s-badge {
30
+ display: inline-flex;
31
+ align-items: center;
32
+ justify-content: center;
33
+ min-width: 0;
34
+ padding: 0 var(--su6);
35
+ border-width: 1px;
36
+ border-style: solid;
37
+ border-radius: var(--br-sm);
38
+ font-size: var(--fs-caption);
39
+ font-weight: normal;
40
+ line-height: 2;
41
+ text-decoration: none;
42
+ vertical-align: middle;
43
+ white-space: nowrap;
44
+
45
+ .badge-styles(var(--bc-medium), var(--black-050), var(--black-700));
46
+
47
+ a&:hover {
48
+ text-decoration: none;
49
+ }
50
+ }
51
+
52
+ // $ BADGE IMAGE
53
+ // When we have a badge image
54
+ // ---------------------------------------------------------------------------
55
+ .s-badge--image {
56
+ display: inline-flex;
57
+ align-self: center;
58
+ margin-right: var(--su1);
59
+ margin-left: calc((var(--su4) + var(--su1)) * -1);
60
+ }
61
+
62
+ // $ BADGE SIZES
63
+ // ---------------------------------------------------------------------------
64
+ .s-badge__sm {
65
+ min-width: 18px;
66
+ align-self: flex-start;
67
+ padding-right: var(--su4);
68
+ padding-left: var(--su4);
69
+ font-size: var(--fs-fine);
70
+ line-height: 1.8;
71
+ }
72
+
73
+ .s-badge__xs {
74
+ align-self: flex-start;
75
+ padding-right: var(--su2);
76
+ padding-left: var(--su2);
77
+ font-size: var(--fs-fine);
78
+ line-height: 1.5;
79
+ }
80
+
81
+ // $$ Badge Counts
82
+ // ---------------------------------------------------------------------------
83
+ .s-badge__gold {
84
+ .badge-styles(var(--gold-darker), var(--gold-lighter), var(--black-700));
85
+ }
86
+ .s-badge__silver {
87
+ .badge-styles(var(--silver-darker), var(--silver-lighter), var(--black-700));
88
+ }
89
+ .s-badge__bronze {
90
+ .badge-styles(var(--bronze-darker), var(--bronze-lighter), var(--black-700));
91
+ }
92
+ .s-badge__gold,
93
+ .s-badge__silver,
94
+ .s-badge__bronze {
95
+ .highcontrast-mode({
96
+ border-color: currentColor;
97
+ color: var(--black-900);
98
+ });
99
+ }
100
+
101
+ // $$ Number Counts
102
+ // ---------------------------------------------------------------------------
103
+ .s-badge__bounty {
104
+ .badge-styles(transparent, var(--blue-600), var(--white));
105
+ }
106
+ .s-badge__votes {
107
+ .badge-styles(var(--black-150), var(--white), var(--black-700));
108
+
109
+ .highcontrast-mode({ border-color: currentColor; });
110
+ }
111
+ .s-badge__answered {
112
+ .badge-styles(transparent, var(--green-400), var(--white));
113
+ }
114
+ .s-badge__rep {
115
+ .badge-styles(var(--green-400), var(--white), var(--green-500));
116
+ .highcontrast-mode({ border-color: currentColor; });
117
+ }
118
+ .s-badge__rep-down {
119
+ .badge-styles(var(--red-400), var(--white), var(--red-500));
120
+ .highcontrast-mode({ border-color: currentColor; });
121
+ }
122
+ .s-badge__important {
123
+ .badge-styles(transparent, var(--red-600), var(--white));
124
+ }
125
+
126
+ // $$ Users
127
+ // ---------------------------------------------------------------------------
128
+ .s-badge__admin {
129
+ .badge-styles(var(--theme-primary-200), var(--theme-primary-075), var(--theme-primary-800));
130
+ .highcontrast-mode({ border-color: currentColor; });
131
+ }
132
+ .s-badge__moderator {
133
+ .badge-styles(var(--theme-secondary-200), var(--theme-secondary-075), var(--theme-secondary-800));
134
+ .highcontrast-mode({ border-color: currentColor; });
135
+
136
+ &:before {
137
+ --s-badge-moderator-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");
138
+
139
+ content: "";
140
+ display: inline-block;
141
+ background-color: currentColor;
142
+ -webkit-mask: var(--s-badge-moderator-icon) no-repeat center;
143
+ mask: var(--s-badge-moderator-icon) no-repeat center;
144
+ -webkit-mask-size: contain;
145
+ mask-size: contain;
146
+
147
+ width: 12px;
148
+ height: 14px;
149
+ margin-top: -1px;
150
+ margin-right: 3px;
151
+ }
152
+
153
+ &.s-badge__sm:before {
154
+ --s-badge-moderator-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");
155
+
156
+ width: 9px;
157
+ height: 11px;
158
+ margin-top: 0;
159
+ margin-right: 2px;
160
+ }
161
+
162
+ &.s-badge__xs:before {
163
+ --s-badge-moderator-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");
164
+
165
+ width: 7px;
166
+ height: 9px;
167
+ margin-top: 0;
168
+ }
169
+ }
170
+
171
+ .s-badge__staff {
172
+ // Staff badges are always "Stack Overflow Orange"
173
+ .badge-styles(var(--orange-300), var(--orange-100), var(--orange-900));
174
+ .highcontrast-mode({ border-color: currentColor; });
175
+ }
176
+
177
+ // $$ Award Count
178
+ // ---------------------------------------------------------------------------
179
+ .s-award-bling {
180
+ display: flex;
181
+ align-items: center;
182
+ color: inherit;
183
+
184
+ &:before {
185
+ content: "";
186
+ margin-right: 4px;
187
+ width: 8px;
188
+ height: 8px;
189
+ border-radius: 100%;
190
+ }
191
+
192
+ &.s-award-bling__gold {
193
+ &:before {
194
+ background-color: var(--gold);
195
+ }
196
+ }
197
+
198
+ &.s-award-bling__silver {
199
+ &:before {
200
+ background-color: var(--silver);
201
+ }
202
+ }
203
+
204
+ &.s-award-bling__bronze {
205
+ &:before {
206
+ background-color: var(--bronze);
207
+ }
208
+ }
209
+ }
@@ -1,80 +1,80 @@
1
- //
2
- // STACK OVERFLOW
3
- // BANNERS
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
- // • SYSTEM BANNERS
11
- //
12
- // ============================================================================
13
- // When we use .s-banner, we need to adjust the padding-top on
14
- // the body tag. This class correctly adjusts the body padding ONLY if
15
- // the notice is one line. If it wraps to multiple lines, more classes or
16
- // (ideally) JS will need to be used to determine the notice's height
17
- // at the time of render. The padding value is determined like so:
18
- //
19
- // 50px (top bar) + 44px (notice height) - 1px (bottom border)
20
- //
21
- // The borders subtraction are necessary to neatly tuck everything together.
22
- // ----------------------------------------------------------------------------
23
- .s-banner__body-pt {
24
- padding-top: 93px;
25
- }
26
-
27
- // ============================================================================
28
- // $ SYSTEM BANNERS
29
- // ----------------------------------------------------------------------------
30
- .s-banner {
31
- position: fixed;
32
- z-index: calc(var(--zi-navigation-fixed) - 1); // Tuck below topbar
33
- top: 0;
34
- right: 0;
35
- left: 0;
36
- width: 100%;
37
- padding: var(--su12);
38
- border-top: 1px solid transparent;
39
- border-bottom: 1px solid transparent;
40
- border-radius: 0;
41
- box-shadow: none;
42
- color: var(--fc-medium);
43
- font-size: var(--fs-body1);
44
-
45
- // If you want to hide and reveal the banner
46
- &[aria-hidden="true"] {
47
- visibility: hidden;
48
- opacity: 0;
49
- -webkit-transform: translate3d(0, -50px, 0);
50
- transform: translate3d(0, -50px, 0);
51
- }
52
-
53
- &[aria-hidden="false"] {
54
- visibility: visible;
55
- opacity: 1;
56
- -webkit-transform: translate3d(0, 49px, 0);
57
- transform: translate3d(0, 49px, 0);
58
- }
59
-
60
- // If you want to put the banner above the topbar
61
- &.is-pinned {
62
- z-index: calc(var(--zi-navigation-fixed) + 1);
63
- -webkit-transform: translate3d(0, 0, 0);
64
- transform: translate3d(0, 0, 0);
65
- }
66
-
67
- // If it's a really important banner
68
- &.s-banner__important {
69
- border-color: transparent;
70
- color: var(--white);
71
- }
72
- }
73
-
74
- // -- When we want to keep hero content capped
75
- .s-banner--container {
76
- position: relative;
77
- width: 100%;
78
- max-width: calc(var(--s-step) * 10);
79
- margin: 0 auto;
80
- }
1
+ //
2
+ // STACK OVERFLOW
3
+ // BANNERS
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
+ // • SYSTEM BANNERS
11
+ //
12
+ // ============================================================================
13
+ // When we use .s-banner, we need to adjust the padding-top on
14
+ // the body tag. This class correctly adjusts the body padding ONLY if
15
+ // the notice is one line. If it wraps to multiple lines, more classes or
16
+ // (ideally) JS will need to be used to determine the notice's height
17
+ // at the time of render. The padding value is determined like so:
18
+ //
19
+ // 50px (top bar) + 44px (notice height) - 1px (bottom border)
20
+ //
21
+ // The borders subtraction are necessary to neatly tuck everything together.
22
+ // ----------------------------------------------------------------------------
23
+ .s-banner__body-pt {
24
+ padding-top: 93px;
25
+ }
26
+
27
+ // ============================================================================
28
+ // $ SYSTEM BANNERS
29
+ // ----------------------------------------------------------------------------
30
+ .s-banner {
31
+ position: fixed;
32
+ z-index: calc(var(--zi-navigation-fixed) - 1); // Tuck below topbar
33
+ top: 0;
34
+ right: 0;
35
+ left: 0;
36
+ width: 100%;
37
+ padding: var(--su12);
38
+ border-top: 1px solid transparent;
39
+ border-bottom: 1px solid transparent;
40
+ border-radius: 0;
41
+ box-shadow: none;
42
+ color: var(--fc-medium);
43
+ font-size: var(--fs-body1);
44
+
45
+ // If you want to hide and reveal the banner
46
+ &[aria-hidden="true"] {
47
+ visibility: hidden;
48
+ opacity: 0;
49
+ -webkit-transform: translate3d(0, -50px, 0);
50
+ transform: translate3d(0, -50px, 0);
51
+ }
52
+
53
+ &[aria-hidden="false"] {
54
+ visibility: visible;
55
+ opacity: 1;
56
+ -webkit-transform: translate3d(0, 49px, 0);
57
+ transform: translate3d(0, 49px, 0);
58
+ }
59
+
60
+ // If you want to put the banner above the topbar
61
+ &.is-pinned {
62
+ z-index: calc(var(--zi-navigation-fixed) + 1);
63
+ -webkit-transform: translate3d(0, 0, 0);
64
+ transform: translate3d(0, 0, 0);
65
+ }
66
+
67
+ // If it's a really important banner
68
+ &.s-banner__important {
69
+ border-color: transparent;
70
+ color: var(--white);
71
+ }
72
+ }
73
+
74
+ // -- When we want to keep hero content capped
75
+ .s-banner--container {
76
+ position: relative;
77
+ width: 100%;
78
+ max-width: calc(var(--s-step) * 10);
79
+ margin: 0 auto;
80
+ }
@@ -1,26 +1,26 @@
1
- //
2
- // STACK OVERFLOW
3
- // EMPTY STATES
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 STYLE
11
- // ----------------------------------------------------------------------------
12
- .s-empty-state {
13
- color: var(--fc-light);
14
- text-align: center;
15
- margin-left: auto;
16
- margin-right: auto;
17
-
18
- p {
19
- font-size: var(--fs-body1);
20
- margin-bottom: var(--su12);
21
-
22
- strong {
23
- color: var(--fc-dark);
24
- }
25
- }
26
- }
1
+ //
2
+ // STACK OVERFLOW
3
+ // EMPTY STATES
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 STYLE
11
+ // ----------------------------------------------------------------------------
12
+ .s-empty-state {
13
+ color: var(--fc-light);
14
+ text-align: center;
15
+ margin-left: auto;
16
+ margin-right: auto;
17
+
18
+ p {
19
+ font-size: var(--fs-body1);
20
+ margin-bottom: var(--su12);
21
+
22
+ strong {
23
+ color: var(--fc-dark);
24
+ }
25
+ }
26
+ }