Download web/src/styles/wave41/relational.css from fsanyoto/loopable: direct link, hf CLI and curl.
- Browser
- Download file 9.2 kB
-
https://huggingface.co/spaces/fsanyoto/loopable/resolve/main/web/src/styles/wave41/relational.css
- Command line
-
hf download hf://spaces/fsanyoto/loopable/web/src/styles/wave41/relational.css
-
curl -L -o relational.css https://huggingface.co/spaces/fsanyoto/loopable/resolve/main/web/src/styles/wave41/relational.css
9.2 kB
| /* wave 41 lane stylesheet: relational. Kept separate so no lane edits index.css. | |
| Tokens live in index.css :root and customer-grid/theme.ts -- declare there, consume here. */ | |
| /* ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| W41-T42 -- the Relational pivot (owner instruction 23, rulings R9/R10/R11). | |
| THE CASCADE RULE THIS FILE HAS TO OBEY, MEASURED RATHER THAN ASSUMED. index.css imports this | |
| sheet from line 13, inside the @import block at the very top of the file, because an @import | |
| must precede every other at-rule. Everything index.css declares is therefore LATER than | |
| everything here, so at EQUAL specificity index.css wins and a rule written here is dead. | |
| That is a rule about TIES, not about this sheet being powerless: | |
| .cg-tb-btn--relational.is-active (0,2,0) LOSES to .cg-tb-btn.is-active (0,2,0) | |
| .cg-toolbar.cg-toolbar--frozen (0,2,0) BEATS .cg-toolbar (0,1,0) | |
| .cg-toolbar--frozen .cg-tb-btn (0,2,0) BEATS .cg-tb-btn (0,1,0) | |
| .cg-toolbar--frozen .cg-tb-btn.is-active (0,3,0) BEATS .cg-tb-btn.is-active (0,2,0) | |
| So a NEW class name, or an existing one qualified by a new ancestor, works from here. Only a | |
| like-for-like override of an existing selector does not, which is why this ticket takes the | |
| neutral blue active state for the Relational button instead of declaring a tone. | |
| ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ */ | |
| /* ββ R11: the PRIMARY control row under an active pivot ββββββββββββββββββββββββββββββββββββββ | |
| Visible, greyed, and inert. `inert` on the element is what actually removes it from hit | |
| testing, tab order and the accessibility tree; `pointer-events` here is the mouse-only | |
| fallback for a browser that does not implement it, and the greying is what says so on screen. */ | |
| .cg-toolbar.cg-toolbar--frozen { | |
| background: var(--lp-wash); | |
| pointer-events: none; | |
| user-select: none; | |
| } | |
| .cg-toolbar--frozen .cg-tb-btn, | |
| .cg-toolbar--frozen .cg-tb-btn.is-active, | |
| .cg-toolbar--frozen .cg-tb-lock, | |
| .cg-toolbar--frozen .cg-count, | |
| .cg-toolbar--frozen .cg-search-input { | |
| background: transparent; | |
| color: var(--lp-muted); | |
| cursor: default; | |
| } | |
| .cg-toolbar--frozen .cg-tb-btn svg, | |
| .cg-toolbar--frozen .cg-tb-btn.is-active svg { | |
| color: var(--lp-muted); | |
| } | |
| /* ββ the pivot itself, standing in the grid's own box βββββββββββββββββββββββββββββββββββββββ */ | |
| .cg-rel-surface { | |
| position: absolute; | |
| inset: 0; | |
| display: flex; | |
| flex-direction: column; | |
| min-width: 0; | |
| min-height: 0; | |
| background: var(--lp-surface); | |
| color: var(--lp-ink); | |
| font-size: var(--lp-fs-xs); | |
| } | |
| /* The header states the path and both counts. One line, quiet, on the wash the note stratum | |
| already uses so it reads as a label on the table rather than as an alert above it. */ | |
| .cg-rel-head { | |
| flex: 0 0 auto; | |
| display: flex; | |
| align-items: baseline; | |
| gap: 12px; | |
| padding: 8px 12px; | |
| background: var(--lp-wash); | |
| border-bottom: 1px solid var(--lp-line); | |
| min-width: 0; | |
| } | |
| .cg-rel-path { | |
| font-weight: 600; | |
| color: var(--lp-ink); | |
| white-space: nowrap; | |
| overflow: hidden; | |
| text-overflow: ellipsis; | |
| } | |
| .cg-rel-counts { | |
| color: var(--lp-muted); | |
| font-variant-numeric: tabular-nums; | |
| white-space: nowrap; | |
| } | |
| .cg-rel-window { | |
| margin-left: auto; | |
| color: var(--lp-muted); | |
| font-size: var(--lp-fs-2xs); | |
| white-space: nowrap; | |
| } | |
| /* DESIGN section 4, never over-explain: every one of these states is ONE line. */ | |
| .cg-rel-note { | |
| flex: 0 0 auto; | |
| padding: 12px; | |
| color: var(--lp-muted); | |
| line-height: var(--lp-lh); | |
| } | |
| .cg-rel-note[role="alert"] { | |
| color: var(--lp-red-deep); | |
| background: var(--lp-red-tint); | |
| } | |
| /* Rows scroll INSIDE their own box, so the surface never grows a horizontal scrollbar of its | |
| own and the header stays put while the table moves. */ | |
| .cg-rel-rows { | |
| flex: 1 1 auto; | |
| min-height: 0; | |
| overflow: auto; | |
| } | |
| .cg-rel-table { | |
| border-collapse: collapse; | |
| width: 100%; | |
| font-size: var(--lp-fs-xs); | |
| } | |
| .cg-rel-table th, | |
| .cg-rel-table td { | |
| text-align: left; | |
| padding: 6px 12px; | |
| border-bottom: 1px solid var(--lp-line); | |
| white-space: nowrap; | |
| max-width: 320px; | |
| overflow: hidden; | |
| text-overflow: ellipsis; | |
| } | |
| .cg-rel-table th { | |
| position: sticky; | |
| top: 0; | |
| z-index: 1; | |
| background: var(--lp-surface-2); | |
| color: var(--lp-muted); | |
| font-weight: 600; | |
| } | |
| .cg-rel-table tbody tr:hover td { | |
| background: var(--lp-blue-tint); | |
| } | |
| /* One line plus the ACTION. The way back has to exist in this region too: when the pivot could | |
| not be served there is no secondary control row, and the primary one is inert. */ | |
| .cg-rel-back { | |
| flex: 0 0 auto; | |
| padding: 8px 12px; | |
| border-top: 1px solid var(--lp-line); | |
| } | |
| .cg-rel-back-btn { | |
| /* DESIGN section 4: a button resets native chrome before it is styled. */ | |
| border: 0; | |
| background: transparent; | |
| font: inherit; | |
| color: var(--lp-blue-solid); | |
| padding: 4px 6px; | |
| border-radius: var(--lp-r-sm); | |
| cursor: pointer; | |
| } | |
| .cg-rel-back-btn:hover { | |
| background: var(--lp-blue-tint); | |
| } | |
| .cg-rel-back-btn:focus-visible { | |
| outline: 2px solid var(--lp-blue-deep); | |
| outline-offset: 1px; | |
| } | |
| /* The window group inside the Relational popover is a second question under the first, so it | |
| gets the separation the eye needs and nothing else. */ | |
| .cg-pop-title.cg-rel-window-title { | |
| margin-top: 10px; | |
| padding-top: 8px; | |
| border-top: 1px solid var(--lp-line); | |
| } | |
| /* ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| W41-T44 -- the RECORD-LEVEL pivot, inside the record drawer's Details pane. | |
| THE ONE THING THIS BLOCK HAS TO GET RIGHT. Every `.cg-rel-*` rule above was written for the | |
| pivot standing in the GRID's own box, where `.cg-rel-surface` is `position: absolute; inset: | |
| 0` and its children are flex items of a fixed-height column. The Details pane is neither: it | |
| is a normal document flow inside a scrolling panel, so a child that says `flex: 1 1 auto` has | |
| nothing to fill and a table with no bound grows until it buries the sections beneath it. | |
| `.cg-detail-linkgrid` above solved the same problem for the embedded grids with a fixed | |
| viewport, and this takes the same answer. | |
| β EVERY RULE HERE IS ANCESTOR-SCOPED BY `.cg-rel-record`, which is what makes it win. Read the | |
| cascade table at the top of this file: a like-for-like override of `.cg-rel-note` (0,1,0) | |
| written here would tie with the copy in this same sheet and be decided by source order, which | |
| is a coin toss nobody should have to reason about. `.cg-rel-record .cg-rel-note` is (0,2,0) | |
| and beats it outright; the `[role="alert"]` variant needs (0,3,0) for the same reason, because | |
| `.cg-rel-note[role="alert"]` is already (0,2,0). | |
| ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ */ | |
| .cg-detail-relsec { | |
| display: flex; | |
| flex-direction: column; | |
| gap: 8px; | |
| } | |
| .cg-rel-record { | |
| display: flex; | |
| flex-direction: column; | |
| min-width: 0; | |
| font-size: var(--lp-fs-xs); | |
| } | |
| /* DESIGN section 4, never over-explain: every state in this section is ONE line. The padding is | |
| vertical only, because in the pane these notes sit in the section's own left margin rather | |
| than inside a bordered box the way the grid's do. */ | |
| .cg-rel-record .cg-rel-note { | |
| margin: 0; | |
| padding: 8px 0; | |
| } | |
| /* The refusal is the one state that carries a tint, so it is the one that needs a box to hold | |
| it. Horizontal padding is restored here and nowhere else. */ | |
| .cg-rel-record .cg-rel-note[role="alert"] { | |
| padding: 8px 10px; | |
| border-radius: var(--lp-r-sm); | |
| } | |
| /* The path-and-counts line reads as a caption over the table, so it loses the divider it wears | |
| in the grid (there it is welded to the rows; here a gap separates them). */ | |
| .cg-rel-record .cg-rel-head { | |
| margin-top: 8px; | |
| border-bottom: 0; | |
| border-radius: var(--lp-r-md); | |
| } | |
| /* THE BOUND. Without a maximum this table is as tall as the answer, and one 500-row pivot would | |
| push the time series off the end of the pane. It scrolls inside its own box, so the pane's own | |
| scrollbar still belongs to the pane. */ | |
| .cg-rel-record .cg-rel-rows { | |
| max-height: 320px; | |
| margin-top: 6px; | |
| border: 1px solid var(--lp-line); | |
| border-radius: var(--lp-r-md); | |
| background: var(--lp-surface); | |
| } | |