Download web/src/styles/wave50/grid.css from fsanyoto/loopable: direct link, hf CLI and curl.
- Browser
- Download file 16.3 kB
-
https://huggingface.co/spaces/fsanyoto/loopable/resolve/main/web/src/styles/wave50/grid.css
- Command line
-
hf download hf://spaces/fsanyoto/loopable/web/src/styles/wave50/grid.css
-
curl -L -o grid.css https://huggingface.co/spaces/fsanyoto/loopable/resolve/main/web/src/styles/wave50/grid.css
16.3 kB
| /* ββ WAVE 50 Β· W50-T01 (owner ruling R1, 2026-09-03) β THE SHARED MODE SCROLLER. | |
| * | |
| * The client render cap is retired. Grid and List paint every loaded row on the virtualised | |
| * canvas; the DOM card views paint a WINDOW of the same complete list. A window only works if | |
| * the thing it is a window ONTO can actually scroll, and `.cg-grid-box` is `overflow: hidden` | |
| * on purpose (the canvas owns its own scrolling and a second scrollbar around it double-scrolls | |
| * the header). So the mode views get their OWN scroller, one level in. | |
| * | |
| * β THE HEIGHT IS THE LOAD-BEARING HALF, not `overflow: auto`. An `auto` box with an unbounded | |
| * height never overflows, so it never scrolls: the view would mount its small window, be unable | |
| * to reach anything below it, and look exactly like the cap that was just deleted while passing | |
| * a naive node count. `flex: 1 1 auto` + `min-height: 0` inside a column-flex section whose own | |
| * height is 100% is what bounds it. `min-height: 0` is not decoration either - a flex item's | |
| * default `min-height: auto` floors at content height, which is the same unbounded box again. | |
| * | |
| * β `index.css` is NOT this ticket's file. Every rule W50-T01 needs lives here and in | |
| * `customer-grid/GalleryTimelineViews.css`, and this sheet is side-effect imported by | |
| * `CustomerGrid.tsx` beside the wave 44/45/46 sheets. A stylesheet nothing imports does nothing. | |
| */ | |
| .cg-mode-scroll { | |
| flex: 1 1 auto; | |
| min-height: 0; | |
| overflow: auto; | |
| overscroll-behavior: contain; | |
| } | |
| /* The two spacers that stand in for the rows a window does not mount. They carry the height of | |
| what is absent, so the scrollbar describes the WHOLE list and the last record is reachable. | |
| Full-width in either grid, and inert: a spacer is never a target. */ | |
| .cg-window-pad { | |
| grid-column: 1 / -1; | |
| pointer-events: none; | |
| } | |
| /* βββ W50-T01 (R1) β KANBAN: the lane window's geometry ββββββββββββββββββββββββββββββββββββββ | |
| * | |
| * β EVERY NUMBER HERE IS A CUSTOM PROPERTY `viewModes.tsx` SETS INLINE, and that is the whole | |
| * point of the block. The lane mounts a window and reserves the rest as two spacers, so the | |
| * pitch it assumes and the height the browser paints have to be the same number. Two numbers | |
| * that agree today drift the first time either is tuned, and the drift shows up as the LAST | |
| * CARD BEING UNREACHABLE - the same failure the render cap produced, which is what this ruling | |
| * deleted. | |
| * | |
| * β SCOPED TO `.is-clamped`, WHICH IS THE DEFAULT MODE, AND ONLY TO IT. Item 3 (C-DISP) already | |
| * says the clamp "trims every card to a standard height"; until now it clamped the TEXT and let | |
| * the box size itself, so two cards could differ by a line. Nothing is cut by pinning the box, | |
| * because the box is the SUM of the pieces pinned below and the clamp already caps the content | |
| * at exactly that. β With the clamp OFF the title wraps on purpose, so no height is pinned | |
| * there and the window runs on an estimate that `guardedWindow` keeps safe. | |
| * | |
| * β THE SELECTORS CARRY `.cg-kb-cards` PURELY FOR SPECIFICITY. `index.css` owns the base rules | |
| * and one of them (`.cg-kbview.is-clamped .cg-kb-cell .cg-lv-v`) matches at the same weight as | |
| * the natural selector here would; at equal weight the winner is source order, and source order | |
| * between two sheets is a bundler's business rather than a contract. The extra ancestor is a | |
| * real one, and it decides the cascade rather than hoping. */ | |
| .cg-kbview.is-clamped .cg-kb-cards .cg-kb-card { | |
| height: var(--cg-kb-card-h); | |
| margin-bottom: var(--cg-kb-card-gap); | |
| overflow: hidden; | |
| } | |
| .cg-kbview.is-clamped .cg-kb-cards .cg-kb-title { | |
| height: var(--cg-kb-title-h); | |
| line-height: var(--cg-kb-line-h); | |
| } | |
| .cg-kbview.is-clamped .cg-kb-cards .cg-kb-cell { | |
| height: var(--cg-kb-cell-h); | |
| overflow: hidden; | |
| } | |
| .cg-kbview.is-clamped .cg-kb-cards .cg-kb-cell .cg-lv-k, | |
| .cg-kbview.is-clamped .cg-kb-cards .cg-kb-cell .cg-lv-v { | |
| line-height: var(--cg-kb-line-h); | |
| } | |
| /* βββ W50-T01 (R1) β CALENDAR: one day's chip list, and its window βββββββββββββββββββββββββββ | |
| * | |
| * The list is the day cell's unbounded axis: a busy day in a 32,000-order book used to mount a | |
| * chip per record. It is bounded here and windowed in `CalendarDayChips`. | |
| * | |
| * β `max-height` + `overflow: auto` IS a bounded scroller - the height is stated outright, so | |
| * there is no flex minimum to zero and nothing to inherit an unbounded height from. It is | |
| * deliberately shorter than the 150px `.cg-cal-cell` box that contains it, minus the day | |
| * number: the INNER list is the one that scrolls, and the outer cell's scrollbar stays idle. | |
| * | |
| * β A CHIP'S HEIGHT IS PINNED so the pitch is exact. `.cg-cal-chip` is already one line by | |
| * construction (`white-space: nowrap` + ellipsis), but "one line" is a line-height this file | |
| * did not previously state, and an unstated number is the drift the block above is about. */ | |
| .cg-cal-chips { | |
| max-height: var(--cg-cal-chips-h); | |
| overflow: auto; | |
| overscroll-behavior: contain; | |
| } | |
| .cg-cal-chips > .cg-cal-chip { | |
| height: var(--cg-cal-chip-h); | |
| margin-bottom: var(--cg-cal-chip-gap); | |
| line-height: var(--cg-cal-chip-line-h); | |
| } | |
| /* βββ W50-T03 (owner instruction 1, ruling R2) β THE SUMMARY BAR βββββββββββββββββββββββββββ | |
| * | |
| * β THE HEIGHT IS A CONTRACT WITH THE COMPONENT, NOT A STYLE. `SummaryBar.tsx` exports | |
| * `SUMMARY_BAR_PX` and `CustomerGrid` hands glide `boxHeight - SUMMARY_BAR_PX`, so the canvas | |
| * stops exactly where this strip starts. Paint it taller and the bar covers the last row; paint | |
| * it shorter and a white band opens under the grid. Two numbers that agree today drift the | |
| * first time either is tuned β the same failure the kanban block above pins for the same | |
| * reason, and `verify_grid_ux.py` holds this declaration and that constant together. | |
| * | |
| * β ABSOLUTE INSIDE `.cg-grid-box`, WHICH IS ALREADY `position: relative` AND | |
| * `overflow: hidden` (index.css). A `position: sticky` footer needs a scrolling ancestor and | |
| * this box deliberately has none β the canvas owns its own scrolling β so `sticky` here would | |
| * compute to `static` and the bar would sit wherever the flow left it. Pinned to the bottom | |
| * edge is what "sticky under the grid" actually means on this surface. | |
| * | |
| * β NO NEW TOKEN AND NO LITERAL TYPE SIZE: `index.css` is not this ticket's file, and | |
| * `verify_ui.py` scans every stylesheet under `web/src` for a literal `font-size`. | |
| */ | |
| /* β THE PROPERTY IS DECLARED ON THE BOX, NOT ON THE BAR, AND THAT IS LOAD-BEARING. The DOM | |
| modes are SIBLINGS of the bar, so a value declared on the bar itself cannot reach them and | |
| the reserve below would silently compute to `padding-bottom: 0` - the list's last row back | |
| under the strip, with every source scan green. */ | |
| .cg-grid-box.has-summary { | |
| --cg-sum-h: 30px; | |
| } | |
| /* The canvas is shortened in JS (`SUMMARY_BAR_PX`) because glide is given a height as a NUMBER. | |
| The DOM modes lay themselves out in CSS and `viewModes.tsx` belongs to another ticket, so | |
| their reserve is here, keyed on the class the grid box wears only while the bar is up. */ | |
| .cg-grid-box.has-summary > .cg-listview, | |
| .cg-grid-box.has-summary > .cg-mode-scroll { | |
| padding-bottom: var(--cg-sum-h); | |
| } | |
| .cg-sum-bar { | |
| position: absolute; | |
| left: 0; | |
| right: 0; | |
| bottom: 0; | |
| height: var(--cg-sum-h); | |
| display: flex; | |
| align-items: stretch; | |
| overflow: hidden; | |
| border-top: 1px solid var(--lp-line); | |
| background: var(--cg-panel); | |
| font-size: var(--lp-fs-2xs); | |
| color: var(--cg-muted); | |
| } | |
| /* The row-marker gutter. Nothing is summarised there, and the width is glide's own. */ | |
| .cg-sum-gutter { | |
| flex: 0 0 auto; | |
| } | |
| /* β TWO TRACKS, BECAUSE GLIDE PINS THE LEADING COLUMNS. The pinned group never moves; the | |
| scrolling group is clipped and translated by glide's own `tx`. One track for both would slide | |
| the frozen cells out from under their frozen headers on the first horizontal scroll. */ | |
| .cg-sum-pinned { | |
| flex: 0 0 auto; | |
| display: flex; | |
| } | |
| .cg-sum-scroll { | |
| flex: 1 1 auto; | |
| min-width: 0; | |
| overflow: hidden; | |
| } | |
| .cg-sum-track { | |
| display: flex; | |
| height: 100%; | |
| will-change: transform; | |
| } | |
| /* DESIGN.md Β§4 β a quiet button with native chrome reset. One control shape for the whole rail: | |
| every cell is the same button whether or not it currently shows a value, because a cell that | |
| only becomes clickable once it has a number is a menu nobody can find. */ | |
| .cg-sum-cell { | |
| border: 0; | |
| background: transparent; | |
| font: inherit; | |
| color: inherit; | |
| flex: 0 0 auto; | |
| display: flex; | |
| align-items: center; | |
| gap: 6px; | |
| padding: 0 8px; | |
| border-right: 1px solid var(--lp-line); | |
| cursor: pointer; | |
| overflow: hidden; | |
| white-space: nowrap; | |
| } | |
| .cg-sum-cell.is-numeric { | |
| justify-content: flex-end; | |
| font-variant-numeric: tabular-nums; | |
| } | |
| .cg-sum-cell:hover:not(:disabled) { | |
| background: var(--cg-soft); | |
| color: var(--cg-text); | |
| } | |
| .cg-sum-cell:disabled { | |
| cursor: default; | |
| } | |
| .cg-sum-cell:focus-visible { | |
| outline: 2px solid var(--cg-navy); | |
| outline-offset: -2px; | |
| } | |
| /* The operation's word, quieter than its value: the number is the content, the word is its | |
| unit. Both are in the strip's own register, neither is bold. */ | |
| .cg-sum-agg { | |
| flex: 0 0 auto; | |
| opacity: 0.75; | |
| } | |
| .cg-sum-value { | |
| flex: 0 1 auto; | |
| overflow: hidden; | |
| text-overflow: ellipsis; | |
| color: var(--cg-text); | |
| } | |
| /* ββ the picker βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ */ | |
| .cg-sum-menu { | |
| display: flex; | |
| flex-direction: column; | |
| max-height: min(60vh, 420px); | |
| } | |
| .cg-sum-opt { | |
| border: 0; | |
| background: transparent; | |
| font: inherit; | |
| color: inherit; | |
| text-align: left; | |
| padding: 5px 8px; | |
| border-radius: var(--lp-r-sm); | |
| cursor: pointer; | |
| } | |
| .cg-sum-opt:hover { | |
| background: var(--cg-soft); | |
| } | |
| .cg-sum-opt.is-on { | |
| color: var(--cg-navy); | |
| font-weight: 600; | |
| } | |
| /* The percentile points, indented under their own heading rather than flattened into the list: | |
| nine top-level rows plus six points reads as fifteen unrelated choices. */ | |
| .cg-sum-pgroup { | |
| display: flex; | |
| flex-direction: column; | |
| margin-top: 4px; | |
| padding-top: 4px; | |
| border-top: 1px solid var(--lp-line); | |
| } | |
| .cg-sum-phead { | |
| padding: 2px 8px; | |
| font-size: var(--lp-fs-3xs); | |
| color: var(--cg-muted); | |
| } | |
| .cg-sum-custom { | |
| display: flex; | |
| align-items: center; | |
| gap: 6px; | |
| padding: 4px 8px; | |
| } | |
| .cg-sum-clabel { | |
| flex: 0 0 auto; | |
| color: var(--cg-muted); | |
| } | |
| .cg-sum-cinput { | |
| flex: 1 1 auto; | |
| min-width: 0; | |
| } | |
| .cg-sum-capply { | |
| flex: 0 0 auto; | |
| } | |
| /* βββ W50-T06 (owner instruction 5, ruling R5) β THE FORMULA EDITOR βββββββββββββββββββββββββ | |
| * | |
| * Owner, verbatim: *"Formula field editor is wider when configuring (it expands) and taller by | |
| * default; it behaves like Excel."* The TALLER half is the component's business (`editorRows` | |
| * drives the `rows` attribute, so the box grows with the content); everything here is the WIDER | |
| * half plus the two surfaces that guidance needs. | |
| * | |
| * β NO `height` ON `.cg-formula-editor`, AND THAT IS THE ONE RULE THIS BLOCK MUST NOT GAIN. A | |
| * height here would win over the `rows` attribute, so the box would open at whatever this file | |
| * said and never grow again β while `editorRows` still returned the right number, every source | |
| * scan stayed green and `tsc` had nothing to say. `max-height` is safe because it caps growth | |
| * rather than replacing it, and the pane it lives in has to stay shorter than the screen. | |
| * | |
| * β NO LITERAL `font-size` ANYWHERE BELOW: `verify_ui.py` scans every stylesheet under | |
| * `web/src` whole-tree and reds on one (DESIGN.md Β§5). Tokens only, and no new token either β | |
| * `index.css` is not this ticket's file. | |
| */ | |
| /* β THE 560px IS DELIVERED BY `:has()`, NOT BY A MODIFIER CLASS, and the reason is arithmetic: | |
| `cg-column-menu` is set by SIX separate `AnchoredOverlay` call sites in `ColumnMenu.tsx` and | |
| the formula pane can appear under four of them (create, insert, change-type swap, edit). A | |
| class would have to be computed and threaded through all six, and the fifth one somebody | |
| forgets is a pane that silently stays narrow. `:has()` asks the only question that matters β | |
| is a formula being written in here β and it cannot be forgotten by a call site. | |
| β `:has()` is already in this app's supported set (`index.css` uses it for the agent panel and | |
| the nav badge). Specificity is 0,2,0 against index.css's 0,1,0, so this wins outright and the | |
| result does not depend on which sheet the bundler emits first. */ | |
| .cg-column-menu:has(.cg-formula-editor) { | |
| width: min(560px, calc(100vw - 16px)); | |
| } | |
| .cg-formula-wrap { | |
| position: relative; | |
| display: block; | |
| } | |
| .cg-formula-editor { | |
| max-height: 44vh; | |
| overflow-y: auto; | |
| } | |
| /* ββ the signature, which is "copy how Excel documents it" ββββββββββββββββββββββββββββββββββ | |
| * | |
| * β IT FLOATS, IT DOES NOT REFLOW. The caret crosses a bracket on nearly every keystroke, so a | |
| * hint in normal flow would push the field inserter and the Create button up and down while | |
| * somebody types. Absolute inside `.cg-formula-wrap`, immediately under the box. | |
| * | |
| * β `pointer-events: none` IS LOAD-BEARING, not tidiness: it covers the "Insert a field | |
| * reference" control, and a hint that swallows the click on the control beneath it is a defect | |
| * that looks like the button being broken. Nothing here is interactive. */ | |
| .cg-formula-sig { | |
| position: absolute; | |
| left: 0; | |
| right: 0; | |
| top: 100%; | |
| z-index: 1; | |
| display: flex; | |
| flex-direction: column; | |
| gap: 2px; | |
| margin-top: 2px; | |
| padding: 5px 8px; | |
| border: 1px solid var(--lp-line); | |
| border-radius: var(--lp-r-sm); | |
| background: var(--cg-white); | |
| box-shadow: 0 8px 22px rgba(20, 24, 40, 0.16); | |
| pointer-events: none; | |
| } | |
| .cg-formula-sig-form { | |
| font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; | |
| font-size: var(--lp-fs-2xs); | |
| color: var(--cg-ink); | |
| } | |
| .cg-formula-sig-desc { | |
| font-size: var(--lp-fs-3xs); | |
| color: var(--cg-muted); | |
| } | |
| /* ββ the caret-anchored listbox βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| * | |
| * β `AnchoredOverlay` already gives this node `cg-overlay` (body-level z-index) and a fixed | |
| * position measured against the CARET rect, so nothing here positions anything. */ | |
| .cg-formula-ac { | |
| width: min(360px, calc(100vw - 16px)); | |
| max-height: min(46vh, 300px); | |
| overflow-y: auto; | |
| padding: 3px; | |
| border: 1px solid var(--lp-line); | |
| border-radius: var(--lp-r-lg); | |
| background: var(--cg-white); | |
| color: var(--cg-ink); | |
| box-shadow: 0 12px 34px rgba(20, 24, 40, 0.17); | |
| } | |
| /* One option is a row, not a button: focus never leaves the textarea (that is what keeps the | |
| caret where the typist put it), so these are pointed at with the mouse and driven with the | |
| arrow keys, and `is-active` is the only selection state there is. */ | |
| .cg-formula-ac-opt { | |
| display: flex; | |
| align-items: baseline; | |
| gap: 6px; | |
| padding: 4px 6px; | |
| border-radius: var(--lp-r-sm); | |
| cursor: pointer; | |
| overflow: hidden; | |
| white-space: nowrap; | |
| } | |
| .cg-formula-ac-opt.is-active { | |
| background: var(--cg-soft); | |
| } | |
| .cg-formula-ac-name { | |
| flex: 0 0 auto; | |
| font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; | |
| font-size: var(--lp-fs-2xs); | |
| font-weight: 600; | |
| color: var(--cg-navy); | |
| } | |
| .cg-formula-ac-sig { | |
| flex: 1 1 auto; | |
| min-width: 0; | |
| overflow: hidden; | |
| text-overflow: ellipsis; | |
| font-size: var(--lp-fs-3xs); | |
| color: var(--cg-muted); | |
| } | |
| /* β The alias line is why CONCAT finds CONCATENATE: the catalogue carries the synonyms, so the | |
| list can say which spelling the typist used without a second name in the offer. */ | |
| .cg-formula-ac-alias { | |
| flex: 0 0 auto; | |
| font-size: var(--lp-fs-3xs); | |
| color: var(--cg-muted); | |
| opacity: 0.8; | |
| } | |