@webority/theme 0.9.21 → 0.9.22
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/webority-theme.css +1 -1
- package/package.json +1 -1
- package/scss/wui/_shell.scss +44 -26
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webority/theme",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.22",
|
|
4
4
|
"description": "Webority shared design system — Bootstrap 5.3 SCSS overrides, --wui-* tokens, and shared component CSS. The single source of brand chrome for React portals and Razor sites.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"publishConfig": {
|
package/scss/wui/_shell.scss
CHANGED
|
@@ -188,12 +188,14 @@
|
|
|
188
188
|
// package claiming them would silently restyle every consumer's Bootstrap nav.
|
|
189
189
|
// ============================================================================
|
|
190
190
|
|
|
191
|
-
// The rail width and the expanded width are variables because
|
|
192
|
-
// things must agree on them: the grid column
|
|
193
|
-
//
|
|
191
|
+
// The rail width and the expanded width are variables because two separate
|
|
192
|
+
// things must agree on them: the grid column and the footer's left inset.
|
|
193
|
+
// Hardcoding them in both places is how they drift.
|
|
194
194
|
.app-shell {
|
|
195
195
|
--app-sidebar-w: 260px;
|
|
196
196
|
--app-sidebar-rail-w: 88px;
|
|
197
|
+
// The equal space above (below the rule) and below the collapse toggle.
|
|
198
|
+
--app-sidebar-toggle-gap: 12px;
|
|
197
199
|
|
|
198
200
|
position: relative;
|
|
199
201
|
display: grid;
|
|
@@ -225,13 +227,15 @@
|
|
|
225
227
|
display: flex;
|
|
226
228
|
flex-direction: column;
|
|
227
229
|
gap: 2px;
|
|
228
|
-
|
|
230
|
+
// The bottom inset matches the gap between the collapse toggle and the rule above it,
|
|
231
|
+
// so the toggle row sits evenly spaced between the rule and the sidebar's bottom edge.
|
|
232
|
+
padding: 20px 16px var(--app-sidebar-toggle-gap);
|
|
229
233
|
overflow: hidden;
|
|
230
234
|
background: var(--color-surface);
|
|
231
235
|
transition: padding 0.2s var(--wui-ease-ui);
|
|
232
236
|
}
|
|
233
237
|
.app-shell.collapsed .app-sidebar {
|
|
234
|
-
padding: 20px 12px;
|
|
238
|
+
padding: 20px 12px var(--app-sidebar-toggle-gap);
|
|
235
239
|
}
|
|
236
240
|
.app-sidebar-brand {
|
|
237
241
|
display: flex;
|
|
@@ -535,42 +539,56 @@
|
|
|
535
539
|
}
|
|
536
540
|
}
|
|
537
541
|
|
|
538
|
-
//
|
|
539
|
-
//
|
|
540
|
-
//
|
|
542
|
+
// The collapse toggle is the sidebar's last row, pinned under the scrolling nav (and under
|
|
543
|
+
// any sidebar footer). It is in-flow, not fixed, so it moves with the sidebar and needs no
|
|
544
|
+
// viewport maths to stay aligned with the rail. It spans the sidebar's full width with the
|
|
545
|
+
// chevron centred, expanded or collapsed.
|
|
541
546
|
.app-sidebar-toggle {
|
|
542
|
-
|
|
543
|
-
//
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
547
|
+
flex: none;
|
|
548
|
+
// A full-width row, shaped like a nav item (same height and radius), with the chevron
|
|
549
|
+
// centred, so the whole row is the hit area in both the expanded and collapsed states.
|
|
550
|
+
display: flex;
|
|
551
|
+
align-items: center;
|
|
552
|
+
justify-content: center;
|
|
553
|
+
width: 100%;
|
|
554
|
+
position: relative;
|
|
555
|
+
min-height: var(--wui-control-height);
|
|
556
|
+
// 8px above the rule, the 1px rule, then the same gap below it as under the row.
|
|
557
|
+
margin-top: calc(9px + var(--app-sidebar-toggle-gap));
|
|
558
|
+
padding: 0;
|
|
552
559
|
border: 0;
|
|
553
|
-
border-radius:
|
|
554
|
-
|
|
560
|
+
border-radius: var(--radius-xl);
|
|
561
|
+
corner-shape: squircle;
|
|
562
|
+
background: transparent;
|
|
555
563
|
color: var(--color-text-muted);
|
|
556
564
|
cursor: pointer;
|
|
557
565
|
transition:
|
|
558
|
-
|
|
559
|
-
color 0.12s ease;
|
|
566
|
+
color 0.12s ease,
|
|
567
|
+
background-color 0.12s ease;
|
|
568
|
+
}
|
|
569
|
+
.app-sidebar-toggle::before {
|
|
570
|
+
// A rule marking the toggle off from the nav, matching the rule between nav groups. It is a
|
|
571
|
+
// pseudo-element, not the button's own border, so the rounded hover tint stays a clean pill
|
|
572
|
+
// and the rule spans the row's full width without being clipped by the radius.
|
|
573
|
+
content: "";
|
|
574
|
+
position: absolute;
|
|
575
|
+
top: calc(-1px - var(--app-sidebar-toggle-gap));
|
|
576
|
+
left: 0;
|
|
577
|
+
right: 0;
|
|
578
|
+
border-top: 1px solid var(--color-border);
|
|
579
|
+
pointer-events: none;
|
|
560
580
|
}
|
|
561
581
|
.app-sidebar-toggle:hover {
|
|
562
582
|
color: var(--color-primary);
|
|
583
|
+
background: var(--color-bg-muted);
|
|
563
584
|
}
|
|
564
585
|
.app-sidebar-toggle:focus-visible {
|
|
565
586
|
outline: 2px solid var(--color-primary);
|
|
566
587
|
outline-offset: 2px;
|
|
567
588
|
}
|
|
568
|
-
.app-shell.collapsed .app-sidebar-toggle {
|
|
569
|
-
left: calc(var(--app-sidebar-rail-w) - 12px);
|
|
570
|
-
}
|
|
571
589
|
.app-sidebar-toggle > * {
|
|
572
590
|
// `block` kills the inline-block baseline gap (.wui-icon is inline-block), which otherwise
|
|
573
|
-
// pushes the glyph a hair down in the
|
|
591
|
+
// pushes the glyph a hair down in the button, so the grid can centre it exactly.
|
|
574
592
|
display: block;
|
|
575
593
|
transition: transform 0.2s ease;
|
|
576
594
|
}
|