loopable / web /src /styles /wave41 /rail-nav.css
fsanyoto's picture
Deploy AIOS web (React glide grid + FastAPI slice)
39a9177 verified
Raw History Blame
5.34 kB
/* wave 41 lane stylesheet: rail-nav. Kept separate so no lane edits index.css.
Tokens live in index.css :root and customer-grid/theme.ts -- declare there, consume here. */
/* ==========================================================================
W41-T32 (owner instructions 4 + 29, ruling R2) -- THE RAIL IS A PATH STACK
==========================================================================
R2: the rail shows ONE level at a time and swaps as you drill. The database
list stopped being a portalled dialog (`.shell-dbfly`) and became a LEVEL
inside `.shell-nav`, so it inherits the rail's own width, scroll and fold.
Everything here consumes tokens; nothing declares one. No literal font-size
anywhere -- `verify_ui.py` scans every sheet under `src/` for one, and this
file is in that scan.
NAMING: nothing new here is called `.shell-nav-*`. `verify_ui.py`'s
`nav_type_drift` forbids a per-row `.shell-nav-<x>` selector from declaring
any font property, because that is how the rail's rows drifted out of one
type register once already. The path chrome is not a row and does not
borrow the row's namespace.
-------------------------------------------------------------------------- */
/* The level swap. The same mechanism `.shell-nav.is-rail-loading` uses in
`shell/navExtras.css`, aimed at a different child: hide every direct child of
the rail that is not the level. A `display: none` row is out of the tab order
and out of the accessibility tree, so "one level at a time" is true for a
keyboard and a screen reader, not only for the eye.
ORDER MATTERS AND IS DELIBERATE: while `/nav` is in flight, the skeleton rule
hides `.shell-level` too (it is not `.shell-rail-skeleton`), so a database
list can never paint over a loading frame. */
.shell-nav.is-datalevel > *:not(.shell-level) {
display: none;
}
.shell-level {
display: flex;
flex-direction: column;
min-height: 0;
}
/* --- the path header: `<` `>` and the level's name ----------------------- */
.shell-path {
display: flex;
align-items: center;
gap: 2px;
min-width: 0;
padding: 2px 0 4px;
}
/* The quiet-button register, copied from `.shell-newfolder` in
`shell/navExtras.css` -- transparent, muted ink, a wash on hover and nothing
else. DESIGN 4: new nav joins the existing rhythm, never a new control shape.
The four native-chrome resets are stated explicitly because a `<button>` that
inherits the UA's border, background and font is the drift this rule exists
to stop. */
.shell-path-step {
display: grid;
place-items: center;
flex: 0 0 auto;
width: 22px;
height: 22px;
border: 0;
background: transparent;
font: inherit;
color: var(--lp-muted);
border-radius: var(--lp-r-sm);
cursor: pointer;
}
.shell-path-step:hover:not(:disabled) {
background: var(--lp-wash);
color: var(--lp-ink);
}
/* The end of the walk STATES itself rather than vanishing: a control that
disappears when it cannot act slides the other one under the cursor. */
.shell-path-step:disabled {
opacity: 0.35;
cursor: default;
}
.shell-path-step:focus-visible {
outline: 2px solid var(--lp-blue-deep);
outline-offset: -2px;
}
/* `.shell-nav-open`'s geometry at full strength. That class hides itself until
its row is hovered, which is right for a disclosure hint on a link and wrong
for a control the reader has to find before pointing at it. */
.shell-path-caret {
width: 11px;
height: 11px;
fill: none;
stroke: currentColor;
stroke-width: 1.35;
stroke-linecap: round;
stroke-linejoin: round;
}
/* The level's name. One short plain noun (DESIGN 2), in the row register so the
header sits on the same type ladder as the list under it. */
.shell-path-here {
flex: 1 1 auto;
min-width: 0;
padding-left: 4px;
font-size: var(--lp-fs-xs);
font-weight: 600;
color: var(--lp-ink);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* The search box came from the deleted panel and keeps its class (its rule is in
`index.css`, which is off this lane's board). It only needs the gap the
panel's own head used to give it. */
.shell-level .shell-dbfly-head {
flex: 0 0 auto;
padding-bottom: 2px;
}
/* The list is the part that scrolls, so a long database list cannot push the
create doors below the fold -- the same property the panel had, restated for a
level. `.shell-nav-list`'s own rule in `index.css` supplies the rest. */
.shell-level .shell-nav-list {
flex: 1 1 auto;
min-height: 0;
overflow-y: auto;
}
/* Folded to 56px there is no room for a name or a search field, and the rail's
own rules already hide `.shell-nav-label`. The two `<` `>` buttons survive,
because they are the way back out of a level. */
.shell-side.is-collapsed .shell-path-here,
.shell-side.is-collapsed .shell-level .shell-dbfly-head {
display: none;
}
/* --- W51-T29 (owner instruction 3): the topbar path segment is DELETED ----
Two rules stood here, styling the separator and the database name that
W41-T32 had put beside the logo. Owner instruction 3 of wave 51 removed the
segment itself, so the rules go with it rather than surviving as dead
selectors: `verify_shell_rail.py` greps this file, `index.css` and
`Shell.tsx` for the removed class name and expects none. */