@stackoverflow/stacks 0.69.1 → 0.73.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.
Files changed (45) hide show
  1. package/README.md +1 -1
  2. package/dist/css/stacks.css +2166 -941
  3. package/dist/css/stacks.min.css +1 -1
  4. package/dist/js/stacks.js +167 -92
  5. package/dist/js/stacks.min.js +1 -1
  6. package/lib/css/atomic/_stacks-borders.less +18 -0
  7. package/lib/css/atomic/_stacks-flex.less +2 -7
  8. package/lib/css/atomic/_stacks-grid.less +2 -0
  9. package/lib/css/atomic/_stacks-misc.less +8 -4
  10. package/lib/css/atomic/_stacks-typography.less +23 -8
  11. package/lib/css/base/_stacks-configuration-dynamic.less +13 -56
  12. package/lib/css/components/_stacks-activity-indicator.less +26 -2
  13. package/lib/css/components/_stacks-avatars.less +9 -0
  14. package/lib/css/components/_stacks-badges.less +21 -9
  15. package/lib/css/components/_stacks-breadcrumbs.less +2 -0
  16. package/lib/css/components/_stacks-button-groups.less +11 -0
  17. package/lib/css/components/_stacks-buttons.less +143 -42
  18. package/lib/css/components/_stacks-cards.less +9 -13
  19. package/lib/css/components/_stacks-code-blocks.less +1 -1
  20. package/lib/css/components/_stacks-inputs.less +78 -9
  21. package/lib/css/components/_stacks-link-previews.less +10 -7
  22. package/lib/css/components/_stacks-links.less +29 -9
  23. package/lib/css/components/_stacks-menu.less +4 -4
  24. package/lib/css/components/_stacks-modals.less +1 -1
  25. package/lib/css/components/_stacks-navigation.less +43 -0
  26. package/lib/css/components/_stacks-notices.less +40 -3
  27. package/lib/css/components/_stacks-page-titles.less +1 -1
  28. package/lib/css/components/_stacks-pagination.less +4 -2
  29. package/lib/css/components/_stacks-popovers.less +26 -6
  30. package/lib/css/components/_stacks-post-summary.less +121 -3
  31. package/lib/css/components/_stacks-progress-bars.less +29 -6
  32. package/lib/css/components/_stacks-prose.less +18 -4
  33. package/lib/css/components/_stacks-tables.less +10 -6
  34. package/lib/css/components/_stacks-tags.less +22 -19
  35. package/lib/css/components/_stacks-toggle-switches.less +12 -0
  36. package/lib/css/components/_stacks-topbar.less +440 -0
  37. package/lib/css/components/_stacks-uploader.less +22 -0
  38. package/lib/css/components/_stacks-widget-static.less +15 -3
  39. package/lib/css/exports/_stacks-constants-colors.less +700 -220
  40. package/lib/css/exports/_stacks-constants-helpers.less +1 -2
  41. package/lib/css/exports/_stacks-mixins.less +26 -0
  42. package/lib/css/stacks-dynamic.less +0 -1
  43. package/lib/css/stacks-static.less +15 -0
  44. package/lib/ts/controllers/s-tooltip.ts +4 -0
  45. package/package.json +15 -12
@@ -11,9 +11,8 @@
11
11
  // ----------------------------------------------------------------------------
12
12
 
13
13
  #stacks-internals #responsify('.d-block', { display: block !important; });
14
- @media print { .print\:d-block { display: block !important; } }
15
- .d-flex { display: flex !important; }
16
- .d-inline-flex { display: inline-flex !important; }
14
+ #stacks-internals #responsify('.d-flex', { display: flex !important; });
15
+ #stacks-internals #responsify('.d-inline-flex', { display: inline-flex !important; });
17
16
  #stacks-internals #responsify('.d-grid', { display: grid !important; });
18
17
  #stacks-internals #responsify('.d-inline-grid', { display: inline-grid !important; });
19
18
  #stacks-internals #responsify('.d-inline', { display: inline !important; });
@@ -21,7 +20,6 @@
21
20
  .d-table { display: table !important; }
22
21
  .d-table-cell { display: table-cell !important; }
23
22
  #stacks-internals #responsify('.d-none', { display: none !important; });
24
- @media print { .print\:d-none { display: none !important; } }
25
23
  .d-unset { display: unset !important; }
26
24
 
27
25
  // ============================================================================
@@ -336,3 +334,9 @@
336
334
  // -- Delays
337
335
  .t-delay { transition-delay: 0.25s !important; }
338
336
  .t-delay-unset { transition-delay: 0s !important; }
337
+
338
+ // ============================================================================
339
+ // $ TABLE LAYOUT
340
+ // ----------------------------------------------------------------------------
341
+ .tl-fixed { table-layout: fixed !important; }
342
+ .tl-auto { table-layout: auto !important; }
@@ -63,7 +63,7 @@ p {
63
63
  &.has-border {
64
64
  width: 100%;
65
65
  padding: @su4 0;
66
- border-top: 1px solid var(--black-100);
66
+ border-top: 1px solid var(--bc-medium);
67
67
  }
68
68
  }
69
69
 
@@ -194,11 +194,6 @@ p {
194
194
  .wb-unset { word-break: unset !important; }
195
195
 
196
196
  // -- Overflow Wrap
197
- // This property will create a line break only if an entire word cannot be
198
- // placed on its own line without overflowing. This was formerly called
199
- // word-wrap, which was an unprefixed Microsoft vendor property implemented
200
- // by most browsers. Word-wrap is still a supported alias, but can be removed
201
- // once we no longer support IE11.
202
197
  .ow-normal {
203
198
  overflow-wrap: normal !important;
204
199
  word-wrap: normal !important;
@@ -224,8 +219,6 @@ p {
224
219
  word-wrap: unset !important;
225
220
  }
226
221
 
227
- .ww-break-word { word-wrap: break-word !important; }
228
-
229
222
  // -- Hyphenation
230
223
  .hyphens-none { hyphens: none !important; }
231
224
  .hyphens-auto {
@@ -235,9 +228,31 @@ p {
235
228
  }
236
229
  .hyphens-unset { hyphens: unset !important; }
237
230
 
231
+ // -- Break word
232
+ .break-word {
233
+ word-break: break-word !important;
234
+ word-wrap: break-word !important;
235
+ overflow-wrap: break-word !important;
236
+ -webkit-hyphens: auto !important;
237
+ -moz-hyphens: auto !important;
238
+ -ms-hyphens: auto !important;
239
+ hyphens: auto !important;
240
+ }
241
+
238
242
  // ============================================================================
239
243
  // $ LISTS
240
244
  // ----------------------------------------------------------------------------
245
+ ul,
246
+ ol {
247
+ padding: 0;
248
+ margin-left: 2.8em;
249
+
250
+ ul,
251
+ ol {
252
+ margin-bottom: 0;
253
+ }
254
+ }
255
+
241
256
  .list-reset {
242
257
  list-style: none;
243
258
  margin: 0;
@@ -21,38 +21,9 @@
21
21
  @body-font-color: var(--theme-body-font-color);
22
22
  @body-type-face: var(--theme-body-font-family);
23
23
  @body-background: var(--white);
24
- @body-site-width: 1060px;
25
-
26
- // Links
27
- @link-color: var(--theme-secondary-400);
28
- @link-color-hover: var(--theme-secondary-350);
29
- @link-color-visited: var(--theme-secondary-500);
30
-
31
- // Button Default
32
- @button-color: var(--theme-secondary-400);
33
- @button-background-color: transparent;
34
- @button-hover-color: var(--theme-secondary-500);
35
- @button-hover-background-color: var(--theme-secondary-050);
36
- @button-active-background-color: var(--theme-secondary-100);
37
- @button-selected-color: var(--theme-secondary-900);
38
- @button-selected-background-color: var(--theme-secondary-150);
39
-
40
- // Button Filled
41
- @button-filled-color: var(--theme-secondary-700);
42
- @button-filled-background-color: var(--theme-secondary-050);
43
- @button-filled-border-color: var(--theme-secondary-350);
44
- @button-filled-hover-color: var(--theme-secondary-800);
45
- @button-filled-hover-background-color: var(--theme-secondary-100);
46
- @button-filled-active-background-color: var(--theme-secondary-150);
47
- @button-filled-active-border-color: var(--theme-secondary-350);
48
- @button-filled-selected-color: var(--theme-secondary-900);
49
- @button-filled-selected-background-color: var(--theme-secondary-300);
50
- @button-filled-selected-border-color: var(--theme-secondary-500);
51
-
52
- // Button Outline
53
- @button-outlined-border-color: var(--theme-secondary-300);
54
- @button-outlined-selected-border-color: var(--theme-secondary-400);
24
+ @body-site-width: 1060px; // DEPRECATED will be removed in a future release
55
25
 
26
+ // DEPRECATED will be removed in a future release
56
27
  // Button Muted
57
28
  @button-muted-color: var(--black-500);
58
29
  @button-muted-hover-color: var(--black-600);
@@ -61,10 +32,12 @@
61
32
  @button-muted-selected-color: var(--black-700);
62
33
  @button-muted-selected-background-color: var(--black-075);
63
34
 
35
+ // DEPRECATED will be removed in a future release
64
36
  // Button Muted Outlined
65
37
  @button-muted-outlined-border-color: var(--black-300);
66
38
  @button-muted-outlined-selected-border-color: var(--black-400);
67
39
 
40
+ // DEPRECATED will be removed in a future release
68
41
  // Button Muted Filled
69
42
  @button-muted-filled-color: var(--black-700);
70
43
  @button-muted-filled-background-color: var(--black-100);
@@ -74,6 +47,7 @@
74
47
  @button-muted-filled-selected-color: var(--black-800);
75
48
  @button-muted-filled-selected-background-color: var(--black-350);
76
49
 
50
+ // DEPRECATED will be removed in a future release
77
51
  // Button Danger
78
52
  @button-danger-color: var(--red-600);
79
53
  @button-danger-hover-color: var(--red-700);
@@ -82,10 +56,12 @@
82
56
  @button-danger-selected-color: var(--red-900);
83
57
  @button-danger-selected-background-color: var(--red-200);
84
58
 
59
+ // DEPRECATED will be removed in a future release
85
60
  // Button Danger Outlined
86
61
  @button-danger-outlined-border-color: var(--red-500);
87
62
  @button-danger-outlined-selected-border-color: var(--red-600);
88
63
 
64
+ // DEPRECATED will be removed in a future release
89
65
  // Button Danger Filled
90
66
  @button-danger-filled-color: @white;
91
67
  @button-danger-filled-background-color: var(--red-500);
@@ -96,38 +72,19 @@
96
72
  @button-danger-filled-selected-background-color: var(--red-800);
97
73
  @button-danger-filled-number-color: var(--black-900);
98
74
 
99
- // Button Primary
100
- @button-primary-color: @white;
101
- @button-primary-background-color: var(--theme-secondary-400);
102
- @button-primary-hover-color: @white;
103
- @button-primary-hover-background-color: var(--theme-secondary-500);
104
- @button-primary-active-background-color: var(--theme-secondary-700);
105
- @button-primary-selected-color: var(--white);
106
- @button-primary-selected-background-color: var(--theme-secondary-700);
107
- @button-primary-number-color: var(--theme-secondary-900);
108
-
75
+ // DEPRECATED will be removed in a future release
109
76
  // Tags
110
- @tags-border: transparent;
111
- @tags-background: var(--powder-100);
112
- @tags-color: var(--powder-700);
113
- @tags-hover-border: transparent;
114
- @tags-hover-background: var(--powder-200);
115
- @tags-hover-color: var(--powder-800);
116
- @tags-selected-border: transparent;
117
- @tags-selected-background: var(--powder-400);
118
- @tags-selected-color: var(--powder-900);
119
-
120
- @tags-moderator-border: var(--red-100);
77
+ @tags-moderator-border: var(--red-200);
121
78
  @tags-moderator-background: var(--red-050);
122
- @tags-moderator-color: var(--red-600);
123
- @tags-moderator-hover-border: var(--red-200);
79
+ @tags-moderator-color: var(--red-800);
80
+ @tags-moderator-hover-border: var(--red-300);
124
81
  @tags-moderator-hover-background: var(--red-100);
125
- @tags-moderator-hover-color: var(--red-700);
82
+ @tags-moderator-hover-color: var(--red-900);
126
83
  @tags-moderator-selected-border: var(--red-400);
127
84
  @tags-moderator-selected-background: var(--red-200);
128
85
  @tags-moderator-selected-color: var(--red-800);
129
86
 
130
- @tags-required-border: var(--black-200);
87
+ @tags-required-border: var(--bc-darker);
131
88
  @tags-required-background: var(--black-075);
132
89
  @tags-required-color: var(--black-700);
133
90
  @tags-required-hover-border: var(--black-300);
@@ -13,9 +13,33 @@
13
13
 
14
14
  .s-activity-indicator {
15
15
  display: inline-block;
16
- width: @su12;
16
+ min-width: @su12;
17
17
  height: @su12;
18
+ padding-left: @su4;
19
+ padding-right: @su4;
20
+ line-height: 1.1; // Custom line-height to satisfy 1x screens
18
21
  background-color: var(--theme-secondary-400);
19
22
  box-shadow: 0 0 0 @su4 var(--focus-ring);
20
- border-radius: 100%;
23
+ border-radius: 1000px;
24
+ font-size: @fs-fine;
25
+ font-weight: 600;
26
+ color: @white;
27
+ text-transform: uppercase;
28
+
29
+ .highcontrast-mode({ color: var(--white); });
30
+ }
31
+
32
+ .s-activity-indicator__success {
33
+ background-color: var(--green-500);
34
+ box-shadow: 0 0 0 @su4 var(--focus-ring-success);
35
+ }
36
+
37
+ .s-activity-indicator__warning {
38
+ background-color: var(--yellow-600);
39
+ box-shadow: 0 0 0 @su4 var(--focus-ring-warning);
40
+ }
41
+
42
+ .s-activity-indicator__danger {
43
+ background-color: var(--red-500);
44
+ box-shadow: 0 0 0 @su4 var(--focus-ring-error);
21
45
  }
@@ -26,6 +26,15 @@
26
26
  background-size: 100%;
27
27
  vertical-align: bottom; // Make our avatars play more nicely with text next to it.
28
28
 
29
+ .highcontrast-mode({
30
+ background-color: var(--black);
31
+ box-shadow: 0 0 0 1px var(--black);
32
+
33
+ .s-avatar--letter {
34
+ color: var(--white);
35
+ }
36
+ });
37
+
29
38
  .s-avatar--letter {
30
39
  display: block; // Make sure we're treating the letter as a block-level element
31
40
  color: @white; // Force a light appearance of text rendering
@@ -20,10 +20,6 @@
20
20
  border-color: @border;
21
21
  background-color: @background;
22
22
  color: @color;
23
-
24
- .s-tag--dismiss {
25
- background-color: transparent;
26
- }
27
23
  }
28
24
 
29
25
  // ===========================================================================
@@ -46,7 +42,7 @@
46
42
  vertical-align: middle;
47
43
  white-space: nowrap;
48
44
 
49
- .badge-styles(var(--black-100), var(--black-050), var(--black-700));
45
+ .badge-styles(var(--bc-medium), var(--black-050), var(--black-700));
50
46
 
51
47
  a&:hover {
52
48
  text-decoration: none;
@@ -93,6 +89,14 @@
93
89
  .s-badge__bronze {
94
90
  .badge-styles(var(--bronze-darker), var(--bronze-lighter), var(--black-700));
95
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
+ }
96
100
 
97
101
  // $$ Number Counts
98
102
  // ---------------------------------------------------------------------------
@@ -101,15 +105,19 @@
101
105
  }
102
106
  .s-badge__votes {
103
107
  .badge-styles(var(--black-150), var(--white), var(--black-700));
108
+
109
+ .highcontrast-mode({ border-color: currentColor; });
104
110
  }
105
111
  .s-badge__answered {
106
112
  .badge-styles(transparent, var(--green-400), var(--white));
107
113
  }
108
114
  .s-badge__rep {
109
115
  .badge-styles(var(--green-400), var(--white), var(--green-500));
116
+ .highcontrast-mode({ border-color: currentColor; });
110
117
  }
111
118
  .s-badge__rep-down {
112
119
  .badge-styles(var(--red-400), var(--white), var(--red-500));
120
+ .highcontrast-mode({ border-color: currentColor; });
113
121
  }
114
122
  .s-badge__important {
115
123
  .badge-styles(transparent, var(--red-600), var(--white));
@@ -118,10 +126,12 @@
118
126
  // $$ Users
119
127
  // ---------------------------------------------------------------------------
120
128
  .s-badge__admin {
121
- .badge-styles(transparent, var(--theme-primary-075), var(--theme-primary-800));
129
+ .badge-styles(var(--theme-primary-200), var(--theme-primary-075), var(--theme-primary-800));
130
+ .highcontrast-mode({ border-color: currentColor; });
122
131
  }
123
132
  .s-badge__moderator {
124
- .badge-styles(transparent, var(--theme-secondary-075), var(--theme-secondary-800));
133
+ .badge-styles(var(--theme-secondary-200), var(--theme-secondary-075), var(--theme-secondary-800));
134
+ .highcontrast-mode({ border-color: currentColor; });
125
135
 
126
136
  &:before {
127
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");
@@ -150,16 +160,18 @@
150
160
  }
151
161
 
152
162
  &.s-badge__xs:before {
153
- --s-badge-moderator-icon: url("data:image/svg+xml,%3Csvg width='7' height='9' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.798.246c.3-.329 1.1-.327 1.399 0l2.579 3.66c.3.329.298.864 0 1.192L4.196 8.75c-.299.329-1.1.327-1.398 0L.224 5.098a.904.904 0 010-1.192L2.798.246z' fill='%23fff'/%3E%3C/svg%3E");
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");
154
164
 
155
165
  width: 7px;
156
166
  height: 9px;
157
167
  margin-top: 0;
158
168
  }
159
169
  }
170
+
160
171
  .s-badge__staff {
161
172
  // Staff badges are always "Stack Overflow Orange"
162
- .badge-styles(transparent, var(--orange-100), var(--orange-900));
173
+ .badge-styles(var(--orange-300), var(--orange-100), var(--orange-900));
174
+ .highcontrast-mode({ border-color: currentColor; });
163
175
  }
164
176
 
165
177
  // $$ Award Count
@@ -26,6 +26,8 @@
26
26
  margin-right: @su4;
27
27
  margin-left: @su4;
28
28
 
29
+ .highcontrast-mode({ color: var(--black-350); });
30
+
29
31
  #stacks-internals #screen-sm({
30
32
  margin-right: @su2;
31
33
  margin-left: @su2;
@@ -48,6 +48,17 @@
48
48
  z-index: @zi-selected;
49
49
  }
50
50
 
51
+ .highcontrast-mode({
52
+ &.is-selected {
53
+ background-color: var(--black-400);
54
+ color: var(--white);
55
+
56
+ .s-btn--number {
57
+ color: var(--black);
58
+ }
59
+ }
60
+ });
61
+
51
62
  &:active {
52
63
  z-index: @zi-active;
53
64
  }