@solexllc/usx 0.1.1 → 0.1.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solexllc/usx",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Compiled USWDS-based component styles for USX.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,6 +1,16 @@
1
1
  @use 'pkg:@solexllc/usx-theme/variables' as *;
2
2
 
3
3
  /* stylelint-disable selector-class-pattern, no-descending-specificity -- Public USX classes use BEM naming; intentional cascade order. */
4
+
5
+ // Keeps utilityContent and the search box on one row regardless of the
6
+ // parent's own flex-direction (USWDS's .usa-nav__secondary stacks its
7
+ // children in a column at desktop).
8
+ .usx-nav__utility {
9
+ align-items: center;
10
+ display: flex;
11
+ gap: 0.5rem;
12
+ }
13
+
4
14
  .usx-header {
5
15
  @if $usx-header-bg {
6
16
  background-color: $usx-header-bg;
@@ -91,6 +101,19 @@
91
101
  padding-left: 2rem;
92
102
  padding-right: 2rem;
93
103
  position: relative;
104
+
105
+ // .usa-nav__close (mobile-only) is hidden at this width, and
106
+ // .usa-nav__secondary is taken out of flow via its own absolute
107
+ // positioning — so .usa-nav__primary and .usx-nav__end-slot are the
108
+ // only two participants in this row, letting margin-left: auto push
109
+ // the slot flush right, vertically centered with the nav links.
110
+ display: flex;
111
+ align-items: center;
112
+ }
113
+
114
+ .usx-nav__end-slot {
115
+ flex-shrink: 0;
116
+ margin-left: auto;
94
117
  }
95
118
 
96
119
  // USWDS's own .usa-header--extended .usa-nav__primary-item > .usa-nav__link:hover::after
@@ -10,12 +10,27 @@
10
10
  // instead of leaving the compiled defaults frozen.
11
11
 
12
12
  .usa-in-page-nav-container {
13
+ // Lets the sticky <aside> inside stick across its ancestor's full height
14
+ // (e.g. Layout's right sidebar, which stretches via CSS grid) instead of
15
+ // being bounded by this container's own (much shorter) content height.
16
+ height: 100%;
17
+
13
18
  main,
14
19
  .usx-in-page-nav__content {
15
20
  max-width: 100%;
16
21
  }
17
22
  }
18
23
 
24
+ .usx-layout__sidebar--right {
25
+
26
+ .usa-in-page-nav-container {
27
+
28
+ .usa-in-page-nav.usx-in-page-nav {
29
+ margin: 0;
30
+ }
31
+ }
32
+ }
33
+
19
34
  .usa-in-page-nav__nav {
20
35
  @if $usx-in-page-nav-bg {
21
36
  background-color: $usx-in-page-nav-bg;
@@ -13,17 +13,9 @@
13
13
  // | gutter | content (max-width 960px) | gutter |
14
14
 
15
15
  &__single-column {
16
- max-width: $max-layout-width;
16
+ max-width: calc($max-layout-width + units(4));
17
17
  margin: 0 auto;
18
- padding: 0 units(2.5);
19
-
20
- @include at-media('tablet') {
21
- padding: 0 units(4);
22
- }
23
-
24
- @include at-media('desktop') {
25
- padding: 0;
26
- }
18
+ padding: 0 units(2);
27
19
  }
28
20
 
29
21
  // ── Multi-column grid layout ──────────────────────────────────────────────
@@ -52,6 +44,7 @@
52
44
  &__content {
53
45
  grid-column: content-start / span content-end;
54
46
  grid-row: 1;
47
+ max-width: calc($max-layout-width + units(4));
55
48
 
56
49
 
57
50
  // Content that leaves space for a left sidebar
@@ -62,8 +55,7 @@
62
55
 
63
56
  @include at-media('desktop') {
64
57
  grid-column: content-start / span right-sidebar-end;
65
- width: $dynamic-content-width;
66
- margin: 0 units(4) 0 0;
58
+ padding-right: units(4);
67
59
  }
68
60
  }
69
61
 
@@ -75,9 +67,8 @@
75
67
 
76
68
  @include at-media('desktop') {
77
69
  grid-column: left-sidebar-start / span content-end;
78
- width: $dynamic-content-width;
79
- margin: 0 0 0 units(4);
80
70
  justify-self: flex-end;
71
+ padding-left: units(4);
81
72
  }
82
73
  }
83
74
  }
@@ -87,11 +78,13 @@
87
78
  &__sidebar--left {
88
79
  grid-column: left-sidebar-start / span content-start;
89
80
  grid-row: 1;
81
+ height: 100%;
90
82
  }
91
83
 
92
84
  &__sidebar--right {
93
85
  grid-column: content-end / span right-sidebar-end;
94
86
  grid-row: 1;
87
+ height: 100%;
95
88
  }
96
89
 
97
90
  // Hide sidebars on mobile/tablet, show on desktop