@stackoverflow/stacks 2.3.3 → 2.4.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.
@@ -316,24 +316,6 @@
316
316
  });
317
317
  }
318
318
 
319
- // DEPRECATED - THE PRIMARY BUTTON STYLE IS TO BE REMOVED WITH V1 COLORS
320
- &&__primary {
321
- --_bu-bg: var(--theme-button-primary-background-color, var(--theme-secondary-400));
322
- --_bu-bg-active: var(--theme-button-primary-active-background-color, var(--theme-secondary-600));
323
- --_bu-bg-hover: var(--theme-button-primary-hover-background-color, var(--theme-secondary-500));
324
- --_bu-bg-selected: var(--theme-button-primary-selected-background-color, var(--theme-secondary-500));
325
- --_bu-fc: var(--theme-button-primary-color, var(--white));
326
- --_bu-fc-active: var(--theme-button-primary-hover-color, var(--white));
327
- --_bu-fc-hover: var(--theme-button-primary-hover-color, var(--white));
328
- --_bu-fc-selected: var(--theme-button-primary-selected-color, var(--white));
329
- --_bu-number-fc: var(--theme-button-primary-number-color, var(--theme-secondary-600));
330
- --_bu-number-fc-selected: var(--theme-button-primary-number-color, var(--theme-secondary-600));
331
-
332
- .highcontrast-mode({
333
- --_bu-bc: transparent;
334
- });
335
- }
336
-
337
319
  // Social
338
320
  &&__facebook,
339
321
  &&__github {
@@ -17,7 +17,7 @@ const baseChild = `
17
17
  This is a description of the card’s content.
18
18
  </p>
19
19
  <div class="d-flex gx4">
20
- <button class="flex--item s-btn s-btn__primary s-btn__sm">
20
+ <button class="flex--item s-btn s-btn__filled s-btn__sm">
21
21
  Call to action
22
22
  </button>
23
23
  <button class="flex--item s-btn s-btn__sm">Cancel</button>
@@ -39,7 +39,7 @@ const createModal = ({
39
39
  </p>
40
40
 
41
41
  <div class="d-flex gx8 s-modal--footer">
42
- <button class="flex--item s-btn s-btn__primary" type="button">Save changes</button>
42
+ <button class="flex--item s-btn s-btn__filled" type="button">Save changes</button>
43
43
  <button class="flex--item s-btn" type="button" data-action="s-modal#hide">Cancel</button>
44
44
  </div>
45
45
 
@@ -1,4 +1,6 @@
1
1
  .s-topbar {
2
+ --_tb-bt: var(--theme-topbar-accent-border, 3px solid var(--theme-primary));
3
+ --_tb-h: var(--theme-topbar-height, calc(var(--su-static48) + var(--su-static8)));
2
4
  // CHILD COMPONENT CUSTOM PROPERTIES
3
5
  // Item
4
6
  --_tb-item-bg: unset;
@@ -109,6 +111,21 @@
109
111
  }
110
112
 
111
113
  // CHILD ELEMENTS
114
+ &:has(> &--skip-link:focus) {
115
+ .s-topbar {
116
+ &--container {
117
+ height: var(--_tb-h);
118
+ }
119
+ &--skip-link {
120
+ border-bottom: var(--_tb-bt);
121
+ }
122
+ }
123
+
124
+ border-top: none;
125
+ display: block;
126
+ height: auto;
127
+ }
128
+
112
129
  & a&--logo {
113
130
  &:focus-visible {
114
131
  .focus-styles(true);
@@ -401,6 +418,20 @@
401
418
  padding: var(--_tb-searchbar-p);
402
419
  }
403
420
 
421
+ & &--skip-link {
422
+ &:not(:focus) {
423
+ &:extend(.v-visible-sr);
424
+ }
425
+
426
+ background-color: var(--theme-secondary-100);
427
+ border-bottom: var(--_tb-bt);
428
+ display: block;
429
+ outline: none;
430
+ padding: var(--su12);
431
+ text-align: center;
432
+ }
433
+
434
+
404
435
  .s-navigation {
405
436
  .s-navigation--item {
406
437
  &:not(.is-selected) {
@@ -427,13 +458,12 @@
427
458
  }
428
459
  }
429
460
 
430
- // STATIC COMPONENT STYLES
431
461
  align-items: center;
432
462
  background-color: var(--theme-topbar-background-color, var(--white));
433
463
  border-bottom: var(--theme-topbar-bottom-border, var(--su-static1) solid var(--black-225));
434
- border-top: var(--theme-topbar-accent-border, 3px solid var(--theme-primary));
464
+ border-top: var(--_tb-bt);
435
465
  display: flex;
436
- height: var(--theme-topbar-height, calc(var(--su-static48) + var(--su-static8)));
466
+ height: var(--_tb-h);
437
467
  min-width: auto;
438
468
  position: relative;
439
469
  width: 100%;
@@ -122,6 +122,7 @@ const topbarChildren = ({
122
122
  unsetItem?: boolean;
123
123
  }) => {
124
124
  return `
125
+ <a href="#content" class="s-topbar--skip-link">Skip to main content</a>
125
126
  <div class="s-topbar--container">
126
127
  ${hamburger ? (hamburger === "unselected" ? children.hamburger.unselected : children.hamburger.selected) : ""}
127
128
  ${children.logo}
@@ -177,8 +177,6 @@
177
177
  // THEMING -- PUBLIC API
178
178
  /**
179
179
  * Creates theme h/s/l and r/g/b variables based on the given color for a specified theme.
180
- * Replaces .generate-calculated-themed-variables() (referenced in Core)
181
- * Maintains API parity with legacy .generate-calculated-themed-variables()
182
180
  *
183
181
  * Usage example:
184
182
  * .create-custom-theme-hsl-variables("#ff1100", secondary, dark);
@@ -11,6 +11,5 @@
11
11
  // ============================================================================
12
12
  @import "constants-type.less"; // Type styles, sizes, and line-heights
13
13
  @import "constants-helpers.less"; // Border radius, z-index, spacing, transitions, etc
14
- @import "v1/constants-colors.less"; // Colors v1 (deprecated)
15
14
  @import "color.less"; // Colors v2
16
15
  @import "mixins.less";
@@ -56,11 +56,6 @@
56
56
  // LESS CONSTANTS AND MIXINS
57
57
  @import "exports/exports.less";
58
58
 
59
- // -- ATOMIC CLASSES (v1 colors)
60
- @import "atomic/v1/border.less"; // Deprecated
61
- @import "atomic/v1/color.less"; // Deprecated
62
- @import "atomic/v1/typography.less"; // Deprecated
63
-
64
59
  // -- ATOMIC CLASSES
65
60
  @import "atomic/border.less";
66
61
  @import "atomic/color.less";
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "type": "git",
6
6
  "url": "https://github.com/StackExchange/Stacks.git"
7
7
  },
8
- "version": "2.3.3",
8
+ "version": "2.4.0",
9
9
  "files": [
10
10
  "dist",
11
11
  "lib"
@@ -54,8 +54,8 @@
54
54
  "@types/cssbeautify": "^0.3.5",
55
55
  "@types/less": "^3.0.6",
56
56
  "@types/mocha": "^10.0.6",
57
- "@typescript-eslint/eslint-plugin": "^7.4.0",
58
- "@typescript-eslint/parser": "^7.4.0",
57
+ "@typescript-eslint/eslint-plugin": "^7.6.0",
58
+ "@typescript-eslint/parser": "^7.6.0",
59
59
  "@web/dev-server-esbuild": "^1.0.2",
60
60
  "@web/dev-server-rollup": "^0.6.1",
61
61
  "@web/test-runner": "^0.18.1",
@@ -66,7 +66,7 @@
66
66
  "concurrently": "^8.2.2",
67
67
  "css-loader": "^6.10.0",
68
68
  "cssbeautify": "^0.3.1",
69
- "cssnano": "^6.1.0",
69
+ "cssnano": "^6.1.2",
70
70
  "docsearch.js": "^2.6.3",
71
71
  "eleventy-plugin-highlightjs": "^1.1.0",
72
72
  "eleventy-plugin-nesting-toc": "^1.3.0",
@@ -87,8 +87,8 @@
87
87
  "stylelint-config-standard": "^36.0.0",
88
88
  "terser-webpack-plugin": "^5.3.10",
89
89
  "ts-loader": "^9.5.1",
90
- "typescript": "^5.4.3",
91
- "vitest": "^1.4.0",
90
+ "typescript": "^5.4.5",
91
+ "vitest": "^1.5.0",
92
92
  "webpack": "^5.91.0",
93
93
  "webpack-cli": "^5.1.4",
94
94
  "webpack-merge": "^5.10.0"