@bwui/css 0.0.0-stage → 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/LICENSE +21 -0
- package/dist/brickwork.css +13684 -0
- package/package.json +34 -3
- package/src/components.css +325 -0
- package/src/layers/_index-reference.css +108 -0
- package/src/layers/components.css +6437 -0
- package/src/layers/marketing.css +3593 -0
- package/src/layers/nav.css +566 -0
- package/src/layers/shell.css +1460 -0
- package/src/layout.css +119 -0
- package/src/primitives.css +133 -0
- package/src/reset.css +95 -0
- package/src/wave-b.css +343 -0
- package/src/wave-e.css +181 -0
- package/README.md +0 -3
|
@@ -0,0 +1,566 @@
|
|
|
1
|
+
/* Navigation styling. Active state uses a leading (inline-start) border plus a
|
|
2
|
+
* background tint (NAV-007), both from theme-aware tokens with a logical border
|
|
3
|
+
* so it flips correctly under RTL. Structure only; visibility/active state is
|
|
4
|
+
* computed server-side.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
.bw-nav__list {
|
|
8
|
+
list-style: none;
|
|
9
|
+
margin: 0;
|
|
10
|
+
padding: 0;
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
gap: var(--bw-space-0-5);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.bw-nav__list--nested {
|
|
17
|
+
margin-inline-start: var(--bw-space-4);
|
|
18
|
+
margin-block-start: var(--bw-space-0-5);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.bw-nav__link {
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
gap: var(--bw-space-2);
|
|
25
|
+
/* Fill the list column and allow shrink below content min-size so
|
|
26
|
+
* .bw-nav__label's text-overflow: ellipsis can engage in a narrow rail
|
|
27
|
+
* (docs shell, long page titles). Without this the flex link sizes to its
|
|
28
|
+
* label and overflows the column; measured on icvoss.com docs rail
|
|
29
|
+
* (icvoss/django-brickwork#623). Horizontal bands reset inline-size below. */
|
|
30
|
+
inline-size: 100%;
|
|
31
|
+
min-inline-size: 0;
|
|
32
|
+
padding-block: var(--bw-density-row-padding-block);
|
|
33
|
+
padding-inline: var(--bw-density-row-padding-inline);
|
|
34
|
+
border-radius: var(--bw-radius-md);
|
|
35
|
+
color: var(--bw-color-fg);
|
|
36
|
+
/* Chrome runs at body-sm so the workspace content (body-md) is the point of
|
|
37
|
+
* the page; matches the breadcrumbs and account menu. */
|
|
38
|
+
font-size: var(--bw-text-body-sm-size);
|
|
39
|
+
line-height: var(--bw-text-body-sm-line-height);
|
|
40
|
+
text-decoration: none;
|
|
41
|
+
border-inline-start: var(--bw-size-border-nav-marker) solid transparent;
|
|
42
|
+
transition: var(--bw-transition-colors);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* Transparent resting background, so the transient overlays apply directly as
|
|
46
|
+
* background-color; the active item instead layers them via background-image
|
|
47
|
+
* so the persistent tint composes rather than being replaced.
|
|
48
|
+
*/
|
|
49
|
+
.bw-nav__link:hover {
|
|
50
|
+
background-color: var(--bw-state-hover-overlay);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.bw-nav__link:active {
|
|
54
|
+
background-color: var(--bw-state-active-overlay);
|
|
55
|
+
transition-duration: var(--bw-duration-instant);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.bw-nav__link--active {
|
|
59
|
+
background-color: var(--bw-component-nav-item-active-bg);
|
|
60
|
+
color: var(--bw-component-nav-item-active-text);
|
|
61
|
+
border-inline-start-color: var(--bw-component-nav-item-active-border);
|
|
62
|
+
font-weight: var(--bw-font-weight-semibold);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* Re-assert background-color: the plain :hover/:active rules outrank
|
|
66
|
+
* .bw-nav__link--active alone, and the tint must not vanish under the faint
|
|
67
|
+
* overlay.
|
|
68
|
+
*/
|
|
69
|
+
.bw-nav__link--active:hover {
|
|
70
|
+
background-color: var(--bw-component-nav-item-active-bg);
|
|
71
|
+
background-image: linear-gradient(
|
|
72
|
+
var(--bw-state-hover-overlay),
|
|
73
|
+
var(--bw-state-hover-overlay)
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.bw-nav__link--active:active {
|
|
78
|
+
background-color: var(--bw-component-nav-item-active-bg);
|
|
79
|
+
background-image: linear-gradient(
|
|
80
|
+
var(--bw-state-active-overlay),
|
|
81
|
+
var(--bw-state-active-overlay)
|
|
82
|
+
);
|
|
83
|
+
transition-duration: var(--bw-duration-instant);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/* An ancestor of the active leaf gets a lighter treatment (NAV-008). */
|
|
87
|
+
.bw-nav__link--active-ancestor {
|
|
88
|
+
color: var(--bw-component-nav-item-active-text);
|
|
89
|
+
font-weight: var(--bw-font-weight-medium);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.bw-nav__link--disabled {
|
|
93
|
+
display: flex;
|
|
94
|
+
align-items: center;
|
|
95
|
+
gap: var(--bw-space-2);
|
|
96
|
+
padding-block: var(--bw-density-row-padding-block);
|
|
97
|
+
padding-inline: var(--bw-density-row-padding-inline);
|
|
98
|
+
border-radius: var(--bw-radius-md);
|
|
99
|
+
/* Flat disabled ink (COL-018 pattern): colour token alone, never opacity.
|
|
100
|
+
Stacking opacity on top historically double-dimmed to roughly 1.9:1. */
|
|
101
|
+
color: var(--bw-component-nav-item-disabled-text);
|
|
102
|
+
font-size: var(--bw-text-body-sm-size);
|
|
103
|
+
line-height: var(--bw-text-body-sm-line-height);
|
|
104
|
+
cursor: not-allowed;
|
|
105
|
+
/* Transparent marker matches the enabled link's so rows stay aligned. */
|
|
106
|
+
border-inline-start: var(--bw-size-border-nav-marker) solid transparent;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.bw-nav__label {
|
|
110
|
+
flex: 1 1 auto;
|
|
111
|
+
min-width: 0;
|
|
112
|
+
overflow: hidden;
|
|
113
|
+
text-overflow: ellipsis;
|
|
114
|
+
white-space: nowrap;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/* labels="wrap" on {% bw_nav %} (icvoss/django-brickwork#671): clear the
|
|
118
|
+
* truncate defaults so long document titles remain readable in a docs rail.
|
|
119
|
+
* App sidebars keep the truncate default by omitting the option. */
|
|
120
|
+
.bw-nav__list--labels-wrap .bw-nav__label {
|
|
121
|
+
overflow: visible;
|
|
122
|
+
text-overflow: unset;
|
|
123
|
+
white-space: normal;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.bw-nav__badge {
|
|
127
|
+
flex-shrink: 0;
|
|
128
|
+
min-inline-size: var(--bw-space-5);
|
|
129
|
+
padding-block: var(--bw-space-0-5);
|
|
130
|
+
padding-inline: var(--bw-space-1);
|
|
131
|
+
border-radius: var(--bw-radius-full);
|
|
132
|
+
/* A quiet bordered count chip: the number stays legible without out-shouting
|
|
133
|
+
* the primary button (the inverse pill was the darkest object on the page). */
|
|
134
|
+
background: var(--bw-color-surface-sunken);
|
|
135
|
+
color: var(--bw-color-fg);
|
|
136
|
+
border: var(--bw-size-border-hairline) solid var(--bw-color-border);
|
|
137
|
+
font-size: var(--bw-text-caption-size);
|
|
138
|
+
font-weight: var(--bw-font-weight-medium);
|
|
139
|
+
font-variant-numeric: tabular-nums;
|
|
140
|
+
line-height: var(--bw-font-line-height-none);
|
|
141
|
+
text-align: center;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.bw-nav__external {
|
|
145
|
+
flex-shrink: 0;
|
|
146
|
+
color: var(--bw-color-fg-muted);
|
|
147
|
+
transition: var(--bw-transition-colors);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/* The icon follows the row's hover/active colour so it reads as part of the
|
|
151
|
+
* row rather than a detached glyph.
|
|
152
|
+
*/
|
|
153
|
+
.bw-nav__link:hover .bw-nav__external,
|
|
154
|
+
.bw-nav__link--active .bw-nav__external {
|
|
155
|
+
color: inherit;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.bw-nav__section {
|
|
159
|
+
margin-block-start: var(--bw-density-stack-gap);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/* Section labels adopt the overline type role (uppercase applied here at the
|
|
163
|
+
* component, per the role contract).
|
|
164
|
+
*/
|
|
165
|
+
.bw-nav__section-label {
|
|
166
|
+
display: block;
|
|
167
|
+
padding-inline: var(--bw-density-row-padding-inline);
|
|
168
|
+
padding-block-end: var(--bw-space-1);
|
|
169
|
+
color: var(--bw-component-nav-section-text);
|
|
170
|
+
font-family: var(--bw-text-overline-family);
|
|
171
|
+
font-size: var(--bw-text-overline-size);
|
|
172
|
+
font-weight: var(--bw-text-overline-weight);
|
|
173
|
+
line-height: var(--bw-text-overline-line-height);
|
|
174
|
+
text-transform: uppercase;
|
|
175
|
+
letter-spacing: var(--bw-text-overline-tracking);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/* --- Horizontal band (SHL-001 topbar + {% bw_nav orientation="horizontal" }) */
|
|
179
|
+
|
|
180
|
+
/* Two entry points share one shape (NAV-024 / #430):
|
|
181
|
+
* 1. [data-layout="topbar"] .bw-sidebar... : shell layout forces a horizontal
|
|
182
|
+
* band; the SAME nav render inside the mobile drawer keeps its vertical
|
|
183
|
+
* column (NAV-016: one DOM, two shapes).
|
|
184
|
+
* 2. .bw-nav__list--horizontal : explicit orientation on {% bw_nav %} so an
|
|
185
|
+
* app-shell consumer can place a horizontal row without reaching into
|
|
186
|
+
* package-private BEM.
|
|
187
|
+
* Nested lists (.bw-nav__list--nested) deliberately keep their vertical stack
|
|
188
|
+
* inside the parent item: there is no dropdown JS on the no-JS floor
|
|
189
|
+
* (BR-BW-HTMX-001), so a nested group simply flows in the wrap as a taller
|
|
190
|
+
* item. Known limitation of the horizontal band; a consumer wanting true
|
|
191
|
+
* dropdown submenus layers them via progressive enhancement (BR-BW-TPL-002).
|
|
192
|
+
*/
|
|
193
|
+
|
|
194
|
+
/* The top-level list flows as a wrapping inline row; a section's own list
|
|
195
|
+
* joins the row so its items sit beside its label. */
|
|
196
|
+
[data-layout="topbar"] .bw-sidebar__nav > .bw-nav__list,
|
|
197
|
+
[data-layout="topbar"] .bw-sidebar .bw-nav__section > .bw-nav__list,
|
|
198
|
+
.bw-nav__list--horizontal,
|
|
199
|
+
.bw-nav__list--horizontal > .bw-nav__section > .bw-nav__list {
|
|
200
|
+
flex-direction: row;
|
|
201
|
+
flex-wrap: wrap;
|
|
202
|
+
align-items: center;
|
|
203
|
+
gap: var(--bw-space-1);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
[data-layout="topbar"] .bw-sidebar__nav > .bw-nav__list,
|
|
207
|
+
.bw-nav__list--horizontal {
|
|
208
|
+
padding-block: var(--bw-density-row-padding-block);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/* Links keep their radius/hover/active treatment; the 3px active marker moves
|
|
212
|
+
* from the leading (inline-start) edge to the bottom (block-end) edge, where
|
|
213
|
+
* it reads correctly in a horizontal bar. Same marker width token; the
|
|
214
|
+
* transparent resting border keeps rows aligned exactly as in the sidebar.
|
|
215
|
+
* .bw-nav__link--disabled carries .bw-nav__link too, so both are covered. */
|
|
216
|
+
[data-layout="topbar"] .bw-sidebar .bw-nav__link,
|
|
217
|
+
.bw-nav__list--horizontal .bw-nav__link {
|
|
218
|
+
/* Content-sized chips in a wrapping row; do not stretch to 100% of the band. */
|
|
219
|
+
inline-size: auto;
|
|
220
|
+
border-inline-start: none;
|
|
221
|
+
border-block-end: var(--bw-size-border-nav-marker) solid transparent;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
[data-layout="topbar"] .bw-sidebar .bw-nav__link--active,
|
|
225
|
+
.bw-nav__list--horizontal .bw-nav__link--active {
|
|
226
|
+
border-block-end-color: var(--bw-component-nav-item-active-border);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/* Sections sit inline in the row; their labels become overline separators. */
|
|
230
|
+
[data-layout="topbar"] .bw-sidebar .bw-nav__section,
|
|
231
|
+
.bw-nav__list--horizontal > .bw-nav__section {
|
|
232
|
+
display: flex;
|
|
233
|
+
flex-wrap: wrap;
|
|
234
|
+
align-items: center;
|
|
235
|
+
margin-block-start: 0;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
[data-layout="topbar"] .bw-sidebar .bw-nav__section-label,
|
|
239
|
+
.bw-nav__list--horizontal > .bw-nav__section > .bw-nav__section-label {
|
|
240
|
+
padding-block-end: 0;
|
|
241
|
+
margin-inline: var(--bw-space-2);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/* --- Marketing-header renderer ({% bw_nav_header %}, brickwork#102) --------- */
|
|
245
|
+
|
|
246
|
+
/* A horizontal row of plain-weight links over the same prepared NavItem tree,
|
|
247
|
+
* matching the visual weight the marketing shell already gives plain anchors
|
|
248
|
+
* (.bw-marketing-header__nav :where(a) in marketing.css: label type role,
|
|
249
|
+
* muted resting ink, ink on hover), plus the active treatment plain anchors
|
|
250
|
+
* cannot express. Flat by design: the template renders no nested lists, so no
|
|
251
|
+
* dropdown CSS exists here (BR-BW-HTMX-001; a consumer layering a disclosure
|
|
252
|
+
* does so as progressive enhancement, BR-BW-TPL-002).
|
|
253
|
+
*
|
|
254
|
+
* Every link rule is scoped under .bw-nav-header__list (the renderer's own
|
|
255
|
+
* markup guarantees the ancestor): marketing.css's
|
|
256
|
+
* `.bw-marketing-header__nav :where(a)` rule shares single-class specificity
|
|
257
|
+
* and sits LATER in the compiled bundle, so a bare .bw-nav-header__link rule
|
|
258
|
+
* would lose the cascade inside the marketing header (notably the active
|
|
259
|
+
* underline against its `text-decoration: none`). The descendant scope keeps
|
|
260
|
+
* these rules winning wherever the row is placed.
|
|
261
|
+
*/
|
|
262
|
+
.bw-nav-header__list {
|
|
263
|
+
list-style: none;
|
|
264
|
+
margin: 0;
|
|
265
|
+
padding: 0;
|
|
266
|
+
display: flex;
|
|
267
|
+
flex-wrap: wrap;
|
|
268
|
+
align-items: center;
|
|
269
|
+
/* the same gap the marketing shell gives its plain-anchor nav row */
|
|
270
|
+
gap: var(--bw-space-4);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.bw-nav-header__item {
|
|
274
|
+
display: inline-flex;
|
|
275
|
+
align-items: center;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/* min-block-size (icvoss/django-brickwork#208, same shape swept in on the
|
|
279
|
+
* fix for the three named components): a horizontal nav-bar link is a
|
|
280
|
+
* navigational control, not inline prose, so it needs the WCAG 2.5.8 floor;
|
|
281
|
+
* it was sized to its label's line-height alone (16-18px at 375px). */
|
|
282
|
+
.bw-nav-header__list .bw-nav-header__link {
|
|
283
|
+
display: inline-flex;
|
|
284
|
+
align-items: center;
|
|
285
|
+
gap: var(--bw-space-1);
|
|
286
|
+
min-block-size: 1.5rem;
|
|
287
|
+
color: var(--bw-color-fg-muted);
|
|
288
|
+
font-size: var(--bw-text-label-size);
|
|
289
|
+
font-weight: var(--bw-text-label-weight);
|
|
290
|
+
line-height: var(--bw-text-label-line-height);
|
|
291
|
+
text-decoration: none;
|
|
292
|
+
transition: var(--bw-transition-colors);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.bw-nav-header__list .bw-nav-header__link:hover {
|
|
296
|
+
color: var(--bw-color-fg);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/* Active: full ink plus an accent underline marker, so the current page is
|
|
300
|
+
* signalled by more than colour alone (the horizontal counterpart of the
|
|
301
|
+
* sidebar's inline-start marker, NAV-007). The exact active item carries
|
|
302
|
+
* aria-current="page"; an ancestor of the active route (whose children this
|
|
303
|
+
* flat renderer does not show) gets the same visual treatment. */
|
|
304
|
+
.bw-nav-header__list .bw-nav-header__link--active,
|
|
305
|
+
.bw-nav-header__list .bw-nav-header__link--active-ancestor {
|
|
306
|
+
color: var(--bw-color-fg);
|
|
307
|
+
text-decoration-line: underline;
|
|
308
|
+
text-decoration-color: var(--bw-color-accent);
|
|
309
|
+
text-decoration-thickness: var(--bw-size-border-nav-marker);
|
|
310
|
+
text-underline-offset: var(--bw-space-1-5);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
/* The colour token alone dims the entry (the documented nav exception); the
|
|
314
|
+
* hover override keeps a disabled entry inert under the pointer. */
|
|
315
|
+
.bw-nav-header__list .bw-nav-header__link--disabled,
|
|
316
|
+
.bw-nav-header__list .bw-nav-header__link--disabled:hover {
|
|
317
|
+
color: var(--bw-component-nav-item-disabled-text);
|
|
318
|
+
cursor: not-allowed;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/* The same quiet bordered count chip as the sidebar renderer's badge. */
|
|
322
|
+
.bw-nav-header__badge {
|
|
323
|
+
flex-shrink: 0;
|
|
324
|
+
min-inline-size: var(--bw-space-5);
|
|
325
|
+
padding-block: var(--bw-space-0-5);
|
|
326
|
+
padding-inline: var(--bw-space-1);
|
|
327
|
+
border-radius: var(--bw-radius-full);
|
|
328
|
+
background: var(--bw-color-surface-sunken);
|
|
329
|
+
color: var(--bw-color-fg);
|
|
330
|
+
border: var(--bw-size-border-hairline) solid var(--bw-color-border);
|
|
331
|
+
font-size: var(--bw-text-caption-size);
|
|
332
|
+
font-weight: var(--bw-font-weight-medium);
|
|
333
|
+
font-variant-numeric: tabular-nums;
|
|
334
|
+
line-height: var(--bw-font-line-height-none);
|
|
335
|
+
text-align: center;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.bw-nav-header__external {
|
|
339
|
+
flex-shrink: 0;
|
|
340
|
+
color: var(--bw-color-fg-muted);
|
|
341
|
+
transition: var(--bw-transition-colors);
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.bw-nav-header__list .bw-nav-header__link:hover .bw-nav-header__external {
|
|
345
|
+
color: inherit;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
/* --- Compact rail renderer ({% bw_nav_rail %}, brickwork#82) ---------------- */
|
|
349
|
+
|
|
350
|
+
/* Tier one of the capability-rail + contextual-sidebar (two-tier) layout: a
|
|
351
|
+
* compact icon+label column over the same prepared NavItem tree. Labels stay
|
|
352
|
+
* VISIBLE at caption size in the default density (a designed compact state,
|
|
353
|
+
* not the collapsed sidebar's clipped labels, SHL-004). density="icons"
|
|
354
|
+
* (brickwork#701) rests icon-only and expands on hover/focus-within. Link
|
|
355
|
+
* entries are real anchors; menu_trigger items share the link skin as
|
|
356
|
+
* buttons (brickwork#702). Children belong to the paired contextual
|
|
357
|
+
* {% bw_nav %}, so no flyout panel CSS ships (BR-BW-HTMX-001). */
|
|
358
|
+
.bw-nav-rail__list {
|
|
359
|
+
list-style: none;
|
|
360
|
+
margin: 0;
|
|
361
|
+
padding: 0;
|
|
362
|
+
display: flex;
|
|
363
|
+
flex-direction: column;
|
|
364
|
+
gap: var(--bw-space-1);
|
|
365
|
+
/* compact by construction: as wide as the widest entry, floored at the
|
|
366
|
+
* collapsed-sidebar width so a short label set still reads as a rail */
|
|
367
|
+
inline-size: max-content;
|
|
368
|
+
min-inline-size: var(--bw-density-sidebar-width-collapsed);
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.bw-nav-rail__link {
|
|
372
|
+
position: relative; /* seats the badge on the entry's corner */
|
|
373
|
+
display: flex;
|
|
374
|
+
flex-direction: column;
|
|
375
|
+
align-items: center;
|
|
376
|
+
gap: var(--bw-space-0-5);
|
|
377
|
+
padding-block: var(--bw-space-2);
|
|
378
|
+
padding-inline: var(--bw-space-2);
|
|
379
|
+
border-radius: var(--bw-radius-md);
|
|
380
|
+
color: var(--bw-color-fg);
|
|
381
|
+
font-size: var(--bw-text-caption-size);
|
|
382
|
+
font-weight: var(--bw-font-weight-medium);
|
|
383
|
+
line-height: var(--bw-text-caption-line-height);
|
|
384
|
+
text-align: center;
|
|
385
|
+
text-decoration: none;
|
|
386
|
+
border: none;
|
|
387
|
+
border-inline-start: var(--bw-size-border-nav-marker) solid transparent;
|
|
388
|
+
background: transparent;
|
|
389
|
+
cursor: pointer;
|
|
390
|
+
font-family: inherit;
|
|
391
|
+
transition: var(--bw-transition-colors);
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
.bw-nav-rail__link:hover {
|
|
395
|
+
background-color: var(--bw-state-hover-overlay);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.bw-nav-rail__link:active {
|
|
399
|
+
background-color: var(--bw-state-active-overlay);
|
|
400
|
+
transition-duration: var(--bw-duration-instant);
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
/* Active state mirrors the sidebar treatment (NAV-007): tint, active ink, the
|
|
404
|
+
* inline-start marker. The rail highlights its AREA: the exact active entry
|
|
405
|
+
* and an ancestor of the active route (whose children live in the contextual
|
|
406
|
+
* tier) read the same; aria-current sits on the exact item only. */
|
|
407
|
+
.bw-nav-rail__link--active,
|
|
408
|
+
.bw-nav-rail__link--active-ancestor {
|
|
409
|
+
background-color: var(--bw-component-nav-item-active-bg);
|
|
410
|
+
color: var(--bw-component-nav-item-active-text);
|
|
411
|
+
border-inline-start-color: var(--bw-component-nav-item-active-border);
|
|
412
|
+
font-weight: var(--bw-font-weight-semibold);
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
/* Re-assert background-color under the transient overlays, exactly as the
|
|
416
|
+
* sidebar renderer does: the persistent tint composes, never vanishes. */
|
|
417
|
+
.bw-nav-rail__link--active:hover,
|
|
418
|
+
.bw-nav-rail__link--active-ancestor:hover {
|
|
419
|
+
background-color: var(--bw-component-nav-item-active-bg);
|
|
420
|
+
background-image: linear-gradient(
|
|
421
|
+
var(--bw-state-hover-overlay),
|
|
422
|
+
var(--bw-state-hover-overlay)
|
|
423
|
+
);
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
.bw-nav-rail__link--active:active,
|
|
427
|
+
.bw-nav-rail__link--active-ancestor:active {
|
|
428
|
+
background-color: var(--bw-component-nav-item-active-bg);
|
|
429
|
+
background-image: linear-gradient(
|
|
430
|
+
var(--bw-state-active-overlay),
|
|
431
|
+
var(--bw-state-active-overlay)
|
|
432
|
+
);
|
|
433
|
+
transition-duration: var(--bw-duration-instant);
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
/* Colour token alone dims the entry (the documented nav exception); the hover
|
|
437
|
+
* override keeps a disabled entry inert under the pointer. */
|
|
438
|
+
.bw-nav-rail__link--disabled,
|
|
439
|
+
.bw-nav-rail__link--disabled:hover {
|
|
440
|
+
background-color: transparent;
|
|
441
|
+
color: var(--bw-component-nav-item-disabled-text);
|
|
442
|
+
cursor: not-allowed;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
/* Wraps rather than truncates: a rail entry's visible name IS the accessible
|
|
446
|
+
* name and the destination, so it never ellipsises away. */
|
|
447
|
+
.bw-nav-rail__label {
|
|
448
|
+
overflow-wrap: anywhere;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
/* The count chip seats on the entry's top trailing corner, the standard rail
|
|
452
|
+
* badge affordance; same quiet bordered treatment as the sidebar badge. */
|
|
453
|
+
.bw-nav-rail__badge {
|
|
454
|
+
position: absolute;
|
|
455
|
+
inset-block-start: var(--bw-space-1);
|
|
456
|
+
inset-inline-end: var(--bw-space-1);
|
|
457
|
+
min-inline-size: var(--bw-space-5);
|
|
458
|
+
padding-block: var(--bw-space-0-5);
|
|
459
|
+
padding-inline: var(--bw-space-1);
|
|
460
|
+
border-radius: var(--bw-radius-full);
|
|
461
|
+
background: var(--bw-color-surface-sunken);
|
|
462
|
+
color: var(--bw-color-fg);
|
|
463
|
+
border: var(--bw-size-border-hairline) solid var(--bw-color-border);
|
|
464
|
+
font-size: var(--bw-text-caption-size);
|
|
465
|
+
font-weight: var(--bw-font-weight-medium);
|
|
466
|
+
font-variant-numeric: tabular-nums;
|
|
467
|
+
line-height: var(--bw-font-line-height-none);
|
|
468
|
+
text-align: center;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
.bw-nav-rail__external {
|
|
472
|
+
color: var(--bw-color-fg-muted);
|
|
473
|
+
transition: var(--bw-transition-colors);
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
.bw-nav-rail__link:hover .bw-nav-rail__external,
|
|
477
|
+
.bw-nav-rail__link--active .bw-nav-rail__external {
|
|
478
|
+
color: inherit;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
/* --- Icon-only / hover-expand density (brickwork#701) ----------------------- */
|
|
482
|
+
|
|
483
|
+
/* Resting: --bw-density-rail-width, labels clipped (still in the a11y tree).
|
|
484
|
+
* Hover or focus-within: expand to --bw-density-rail-width-expanded and
|
|
485
|
+
* reveal labels. No JS required; prefers-reduced-motion skips the width
|
|
486
|
+
* transition only. */
|
|
487
|
+
.bw-nav-rail__list--icons {
|
|
488
|
+
inline-size: var(--bw-density-rail-width);
|
|
489
|
+
min-inline-size: var(--bw-density-rail-width);
|
|
490
|
+
max-inline-size: var(--bw-density-rail-width-expanded);
|
|
491
|
+
overflow: hidden;
|
|
492
|
+
transition: inline-size var(--bw-duration-normal) var(--bw-ease-standard);
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
.bw-nav-rail__list--icons .bw-nav-rail__link {
|
|
496
|
+
flex-direction: row;
|
|
497
|
+
justify-content: flex-start;
|
|
498
|
+
gap: var(--bw-space-2);
|
|
499
|
+
text-align: start;
|
|
500
|
+
min-block-size: var(--bw-size-touch-target-min);
|
|
501
|
+
padding-inline: var(--bw-space-2);
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
.bw-nav-rail__list--icons .bw-nav-rail__icon {
|
|
505
|
+
flex-shrink: 0;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
.bw-nav-rail__list--icons .bw-nav-rail__label,
|
|
509
|
+
.bw-nav-rail__list--icons .bw-nav-rail__external {
|
|
510
|
+
position: absolute;
|
|
511
|
+
inline-size: var(--bw-space-px);
|
|
512
|
+
block-size: var(--bw-space-px);
|
|
513
|
+
margin: calc(var(--bw-space-px) * -1);
|
|
514
|
+
padding: 0;
|
|
515
|
+
overflow: hidden;
|
|
516
|
+
clip-path: inset(50%);
|
|
517
|
+
white-space: nowrap;
|
|
518
|
+
border: 0;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
.bw-nav-rail__list--icons:hover,
|
|
522
|
+
.bw-nav-rail__list--icons:focus-within {
|
|
523
|
+
inline-size: var(--bw-density-rail-width-expanded);
|
|
524
|
+
min-inline-size: var(--bw-density-rail-width-expanded);
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
.bw-nav-rail__list--icons:hover .bw-nav-rail__label,
|
|
528
|
+
.bw-nav-rail__list--icons:focus-within .bw-nav-rail__label,
|
|
529
|
+
.bw-nav-rail__list--icons:hover .bw-nav-rail__external,
|
|
530
|
+
.bw-nav-rail__list--icons:focus-within .bw-nav-rail__external {
|
|
531
|
+
position: static;
|
|
532
|
+
inline-size: auto;
|
|
533
|
+
block-size: auto;
|
|
534
|
+
margin: 0;
|
|
535
|
+
overflow: visible;
|
|
536
|
+
clip-path: none;
|
|
537
|
+
white-space: normal;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
@media (prefers-reduced-motion: reduce) {
|
|
541
|
+
.bw-nav-rail__list--icons {
|
|
542
|
+
transition: none;
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
/* --- The two-tier pairing container (brickwork#82) -------------------------- */
|
|
547
|
+
|
|
548
|
+
/* A consumer-placed wrapper inside {% block sidebar %}: the rail (tier one)
|
|
549
|
+
* beside a contextual {% bw_nav %} (tier two), hairline-divided. The sidebar's
|
|
550
|
+
* own width token seats the pair: widen --bw-density-sidebar-width in the
|
|
551
|
+
* brand CSS to fit both tiers; the wrapper imposes no width of its own.
|
|
552
|
+
* Prefer layout="regions" (brickwork#700) when the rail and sidebar should be
|
|
553
|
+
* sibling shell columns under a full-width topbar instead. */
|
|
554
|
+
.bw-nav-two-tier {
|
|
555
|
+
display: grid;
|
|
556
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
557
|
+
column-gap: var(--bw-space-3);
|
|
558
|
+
align-items: start;
|
|
559
|
+
block-size: 100%;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
.bw-nav-two-tier > .bw-nav-rail__list {
|
|
563
|
+
block-size: 100%;
|
|
564
|
+
padding-inline-end: var(--bw-space-2);
|
|
565
|
+
border-inline-end: var(--bw-size-border-hairline) solid var(--bw-color-border);
|
|
566
|
+
}
|