/* wave 51 -- lane E (the Sheet engine: ribbon, cells, rules, shortcuts). Pre-created at the wave base with its @import in index.css so no lane edits index.css (a shared file is a merge collision). Tokens only: var(--lp-*), var(--cg-z-*); no literal font-size (verify_ui goes RED), no hex, no text-transform: uppercase (DESIGN.md section 2). */ /* == W51-T15 -- THE HOME RIBBON: a tab strip, a collapse chevron, and seven named groups. ===== This file EXTENDS the `.sheet-ribbon-*` vocabulary declared in `styles/wave50/sheet.css` rather than restating it: the button, the popover, the swatch, the separator and the step control all keep the rules they already have, and what is added here is the shell around them. A second vocabulary for the same row is how two surfaces of one species drift apart. The three shapes that carry the ticket: 1. `.sheet-ribbon-shell` is the FLEX CHILD of `.sheet-grid-wrap` now, so it is the thing that must declare `flex: 0 0 auto`. `.sheet-ribbon` carried that before, one level down; a shrinkable shell would let the grid squeeze it, and the opposite mistake is worse, because glide renders NO CANVAS AT ALL at a measured height of zero rather than a clipped one. 2. `.sheet-ribbon-scroll` takes the groups and may scroll sideways at a narrow window. `min-width: 0` is load bearing: a flex child will not scroll without it, it will push its parent wider instead. 3. `.sheet-ribbon-group--utility` holds Refresh, OUTSIDE that scroller, which is the whole of instruction 8: Refresh is on the same row as Bold, Italic and Underline, it is not on a white line of its own, and it does not walk off the right edge when the window narrows. */ .sheet-ribbon-shell { flex: 0 0 auto; display: flex; flex-direction: column; background: var(--lp-surface-2); } .sheet-grid-canvas { background: var(--lp-surface); } /* -- the tab strip, which is also the collapse chevron's home -------------------------------- */ .sheet-ribbon-tabs { background: var(--lp-surface-2); flex: 0 0 auto; display: flex; align-items: center; gap: 2px; padding: 0 8px; border-bottom: 1px solid var(--lp-line); } .sheet-ribbon-tablist { display: flex; align-items: center; gap: 2px; } /* DESIGN.md 4's button reset in full. Sentence case, no caps, no letterspacing (DESIGN.md 2). */ .sheet-ribbon-tab { appearance: none; border: 0; background: transparent; font: inherit; font-size: var(--lp-fs-xs); color: var(--lp-muted); padding: 6px 10px; border-bottom: 2px solid transparent; cursor: pointer; transition: color 150ms ease-out, border-color 150ms ease-out; } .sheet-ribbon-tab:hover:not(:disabled) { background: var(--lp-line); color: var(--lp-ink); } /* Blue is the active tab, because blue is selection (DESIGN.md 3). */ .sheet-ribbon-tab.is-on { background: var(--lp-blue-tint); color: var(--lp-ink); border-bottom-color: var(--lp-blue); } .sheet-ribbon-chevron { appearance: none; border: 0; background: transparent; font: inherit; color: var(--lp-muted); margin-left: auto; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: var(--lp-r-sm); cursor: pointer; transition: background-color 150ms ease-out, color 150ms ease-out; } .sheet-ribbon-chevron:hover:not(:disabled) { background: var(--lp-line); color: var(--lp-ink); } .sheet-ribbon-chevron.is-on { background: var(--lp-blue-tint); color: var(--lp-ink); } .sheet-ribbon-tab:disabled, .sheet-ribbon-chevron:disabled { opacity: 0.45; cursor: default; } /* -- the Home row --------------------------------------------------------------------------- */ /* `.sheet-ribbon` supplies the padding, the hairline and the surface; the row of GROUPS needs its controls and their captions stacked, so the cross-axis alignment is the one override. */ .sheet-ribbon-home { align-items: stretch; gap: 0; padding: 4px 8px; } .sheet-ribbon-scroll { flex: 1 1 auto; min-width: 0; display: flex; align-items: stretch; overflow-x: auto; overflow-y: hidden; } /* -- a group: its controls, then its name ---------------------------------------------------- */ .sheet-ribbon-group { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 2px; padding: 0 8px; border-right: 1px solid var(--lp-line); } .sheet-ribbon-group:last-child { border-right: 0; } .sheet-ribbon-group-controls { display: flex; align-items: center; gap: 1px; } /* R8 names the seven groups and the owner reads them by name, so each one says its name on the screen as well as to a screen reader. Sentence case, muted, a scale token, never a literal. */ .sheet-ribbon-group-name { font-size: var(--lp-fs-3xs); line-height: 1; color: var(--lp-muted); white-space: nowrap; } .sheet-ribbon-group--utility { margin-left: auto; border-right: 0; border-left: 1px solid var(--lp-line); } /* A control holding a word plus an icon needs the two to sit on one baseline; the button rule already centres them, so all this adds is room for the pair not to touch. */ .sheet-ribbon-home .sheet-ribbon-btn { gap: 4px; } .sheet-ribbon-home .sheet-ribbon-label { white-space: nowrap; } /* == W51-T16 -- THE ROW HEIGHT AND COLUMN WIDTH ASK. ========================================== ONE number, ONE label, TWO buttons. It is not a settings panel and it does not narrate itself (DESIGN.md 4: never over-explain), and it is a CHILD of `.sheet-grid-wrap` rather than a portal because portalling drops every descendant-scoped rule with no error at all. It rides `--cg-z-menu`, which is the layer every other anchored panel over this grid uses, so it stacks with them instead of inventing a number of its own (DESIGN.md 8). */ .sheet-ask { position: absolute; top: 96px; left: 50%; transform: translateX(-50%); z-index: var(--cg-z-menu); display: flex; flex-direction: column; gap: 8px; min-width: 240px; padding: 12px; background: var(--lp-surface); border: 1px solid var(--lp-line); border-radius: var(--lp-r-md); box-shadow: 0 8px 26px rgba(20, 24, 40, 0.14); } .sheet-ask-label { font-size: var(--lp-fs-2xs); color: var(--lp-muted); } /* The input's eight states are the house ones: it borrows the same border, radius and focus ring every other field in the app carries rather than declaring a ninth appearance. */ .sheet-ask-input { appearance: none; font: inherit; font-size: var(--lp-fs-xs); color: var(--lp-ink); background: var(--lp-surface); border: 1px solid var(--lp-line); border-radius: var(--lp-r-sm); padding: 6px 8px; width: 100%; } .sheet-ask-input:focus-visible { outline: 2px solid var(--lp-blue-deep); outline-offset: 1px; border-color: var(--lp-blue-deep); } .sheet-ask-actions { display: flex; justify-content: flex-end; gap: 8px; } /* DESIGN.md 4's button reset in full, so no UA chrome leaks through. */ .sheet-ask-btn { appearance: none; border: 1px solid var(--lp-line); background: transparent; font: inherit; font-size: var(--lp-fs-2xs); color: var(--lp-ink); border-radius: var(--lp-r-sm); padding: 6px 12px; cursor: pointer; transition: background-color 150ms ease-out, border-color 150ms ease-out; } .sheet-ask-btn:hover { background: var(--lp-surface-2); } /* `--lp-primary` is the primary CTA and nothing else is (DESIGN.md 3), and the label keeps the 600 weight the measured 7.71:1 pairing ships with. */ .sheet-ask-btn.is-primary { background: var(--lp-primary); border-color: var(--lp-primary); color: var(--lp-surface); font-weight: 600; } .sheet-ask-btn.is-primary:hover { background: var(--lp-primary-hover); border-color: var(--lp-primary-hover); } /* == W51-T17 -- THE SHORTCUTS PANEL AND THE FIND BOX (ruling R7, R14, contract C8). =========== Both surfaces are children of `.sheet-grid-wrap`, never portals: a portal drops every descendant-scoped rule it was styled by, silently, and neither of these belongs anywhere but over the grid it reads. `.sheet-grid-wrap` is already the positioning parent for `.sheet-ask` and the cell action bar, so they sit in the same coordinate space those do. ONLY NEW CLASSES LIVE HERE. This lane sheet is imported from `index.css`, which is EAGER, while `styles/wave50/sheet.css` is imported inside the Sheet's own lazily loaded chunk and therefore wins any rule the two both declare. Redeclaring a `.sheet-*` class from that sheet here would lose, with no error; adding new ones cannot. Tokens only: no hex, no literal font-size, no ALL CAPS chrome, motion 150 ms ease-out on opacity and transform. */ .sheet-shortcuts { position: absolute; top: 96px; right: 16px; bottom: 16px; width: 380px; max-width: calc(100% - 32px); z-index: var(--cg-z-menu); display: flex; flex-direction: column; background: var(--lp-surface); border: 1px solid var(--lp-line); border-radius: var(--lp-r-md); box-shadow: 0 8px 26px rgba(20, 24, 40, 0.14); animation: sheet-shortcuts-in 150ms ease-out; } @keyframes sheet-shortcuts-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } } .sheet-shortcuts-head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 12px 8px 16px; border-bottom: 1px solid var(--lp-line); } .sheet-shortcuts-title { margin: 0; font-size: var(--lp-fs-xs); font-weight: 600; color: var(--lp-ink); } .sheet-shortcuts-close { appearance: none; border: 0; background: transparent; font: inherit; color: var(--lp-muted); padding: 4px; border-radius: var(--lp-r-sm); cursor: pointer; display: inline-flex; transition: background 150ms ease-out, color 150ms ease-out; } .sheet-shortcuts-close:hover { background: var(--lp-surface-2); color: var(--lp-ink); } .sheet-shortcuts-close:focus-visible { outline: 2px solid var(--lp-blue-deep); outline-offset: 1px; } .sheet-shortcuts-icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; } .sheet-shortcuts-list { flex: 1 1 auto; min-height: 0; overflow: auto; margin: 0; padding: 8px 0; list-style: none; } .sheet-shortcuts-row { display: grid; grid-template-columns: 132px 1fr; gap: 4px 12px; padding: 6px 16px; align-items: baseline; } .sheet-shortcuts-row + .sheet-shortcuts-row { border-top: 1px solid var(--lp-line); } .sheet-shortcuts-keys { font-family: inherit; font-size: var(--lp-fs-2xs); color: var(--lp-ink); background: var(--lp-surface-2); border: 1px solid var(--lp-line); border-radius: var(--lp-r-sm); padding: 2px 6px; justify-self: start; white-space: nowrap; } .sheet-shortcuts-action { font-size: var(--lp-fs-2xs); color: var(--lp-ink); } .sheet-shortcuts-when { grid-column: 2; font-size: var(--lp-fs-2xs); color: var(--lp-muted); } .sheet-shortcuts-foot { flex: 0 0 auto; margin: 0; padding: 8px 16px 12px; border-top: 1px solid var(--lp-line); font-size: var(--lp-fs-2xs); color: var(--lp-muted); } /* -- Ctrl+F's box. One row, at the top right of the grid, out of the way of the cells. -------- */ /* ⭐⭐ W54-T07 -- ANCHORED TO THE BOTTOM, AND THE REASON IS THAT NO TOP OFFSET CAN BE RIGHT. This read `top: 96px`, measured once against a ribbon that has since changed height twice. The ribbon shell measures 108px today and the formula bar ends at 135px, both relative to `.sheet-grid-wrap`, so the box was painting straight over the group captions and the formula input; widening it for W54-T07's Replace row made that obvious rather than causing it. ⛔ AND A BIGGER NUMBER WOULD NOT FIX IT EITHER: the ribbon COLLAPSES (the chevron), so its height is two different values and any single top offset is wrong in one of them. Anchoring to the BOTTOM of the grid is collapse proof and needs no measurement, clearing the sheet tab bar rather than the chrome above. Firefox puts its find bar here for the same reason. ⚠ `flex-wrap` and the width cap are the Replace row's half: with a second input and two more buttons the row wants about 890px against the 570px it used to, which would otherwise run off the left edge of a narrow sheet. */ .sheet-find { position: absolute; bottom: 56px; right: 16px; max-width: calc(100% - 32px); z-index: var(--cg-z-menu); display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; padding: 8px 12px; background: var(--lp-surface); border: 1px solid var(--lp-line); border-radius: var(--lp-r-md); box-shadow: 0 6px 18px rgba(20, 24, 40, 0.14); animation: sheet-shortcuts-in 150ms ease-out; } .sheet-find-label { font-size: var(--lp-fs-2xs); color: var(--lp-muted); } .sheet-find-input { appearance: none; font: inherit; width: 200px; padding: 4px 8px; font-size: var(--lp-fs-2xs); color: var(--lp-ink); background: var(--lp-surface); border: 1px solid var(--lp-line); border-radius: var(--lp-r-sm); } .sheet-find-input:focus-visible { outline: 2px solid var(--lp-blue-deep); outline-offset: 1px; border-color: var(--lp-blue-deep); } .sheet-find-btn { appearance: none; font: inherit; padding: 4px 10px; font-size: var(--lp-fs-2xs); color: var(--lp-ink); background: var(--lp-surface); border: 1px solid var(--lp-line); border-radius: var(--lp-r-sm); cursor: pointer; transition: background 150ms ease-out; } .sheet-find-btn:hover { background: var(--lp-surface-2); } .sheet-find-btn:focus-visible { outline: 2px solid var(--lp-blue-deep); outline-offset: 1px; } /* == W51-T18 -- CONDITIONAL FORMATTING AND THE VALIDATION DROPDOWN ============================ THREE SURFACES, AND EACH ONE STATES WHERE IT LIVES. 1. `.sheet-rules-*` and `.sheet-validation-*` are the BODIES of contract C8's dialog, which renders through `BodyPortal` as a direct child of . Every class here is therefore TOP LEVEL: a descendant-scoped rule (`.sheet-body .sheet-rules`) would be dead the moment the portal moved the node, with no error of any kind. 2. `.sheet-dropdown-*` extends `.cg-pop`, which `index.css` declares unscoped, exactly as the grid's own right-click menu does. The overlay carries its own surface class because a portalled panel that does not is transparent over the canvas (the v59 scar). 3. The kit's dialog panel is min(420px, 100vw - 32px) and this file does NOT widen it. A rules row is therefore a stacked CARD rather than a wide row, which is the same anatomy the field rail uses for a stacked editor. Tokens only: no hex, no literal font-size, no ALL CAPS chrome, motion 150 ms ease-out on opacity and transform (DESIGN.md sections 2, 3, 4 and 5). */ .sheet-rules { display: flex; flex-direction: column; gap: 10px; } .sheet-rules-note, .sheet-rules-empty { margin: 0; font-size: var(--lp-fs-2xs); color: var(--lp-muted); } /* S67-T12: Excel's Rules Manager is a LIST, so the rules dialog takes the wider panel. Scoped by :has() rather than by a class this file adds to the kit's markup (precedent wave59/templates.css). */ .lp-dialog:has(.sheet-rules) { width: min(720px, calc(100vw - 32px)); } /* One containment layer: the list is a hairline table, and a row is a line in it, not a card. */ .sheet-rules-table { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--lp-line); border-radius: var(--lp-r-md); background: var(--lp-surface); } /* The head and every row share ONE column template, so Rule, Format and Applies to align. */ .sheet-rules-head { display: grid; grid-template-columns: 24px minmax(0, 1fr) 104px 128px 76px; gap: 8px; padding: 6px 8px; border-bottom: 1px solid var(--lp-line); font-size: var(--lp-fs-3xs); color: var(--lp-muted); } .sheet-rules-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; max-height: 52vh; overflow-y: auto; } /* S67-T12: a rule is ONE summary row; its editor opens under it (`.is-open`). The class name is the W51-T18 one on purpose, and verify_api pins that it is declared. */ .sheet-rules-card { display: flex; flex-direction: column; border-bottom: 1px solid var(--lp-line); background: var(--lp-surface); } .sheet-rules-card:last-child { border-bottom: 0; } .sheet-rules-line { display: grid; grid-template-columns: 24px minmax(0, 1fr) 76px; gap: 8px; align-items: center; padding: 2px 8px; transition: background-color 150ms ease-out; } .sheet-rules-card:hover > .sheet-rules-line { background: var(--lp-surface-2); } .sheet-rules-card.is-open > .sheet-rules-line { background: var(--lp-blue-tint); } .sheet-rules-pick { appearance: none; border: 0; background: transparent; font: inherit; color: inherit; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) 104px 128px; gap: 8px; align-items: center; min-width: 0; padding: 5px 0; text-align: left; border-radius: var(--lp-r-sm); } .sheet-rules-pick:focus-visible { outline: 2px solid var(--lp-blue); outline-offset: 1px; } .sheet-rules-summary, .sheet-rules-where { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--lp-fs-2xs); color: var(--lp-ink); } .sheet-rules-where { color: var(--lp-muted); font-variant-numeric: tabular-nums; } /* The Format column: the rule's own paint on sample text. A rule colour is DATA (any #rrggbb or a palette token) and rides the inline style; the frame around it is tokens. */ .sheet-rules-preview { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; width: 96px; height: 20px; border: 1px solid var(--lp-line); border-radius: var(--lp-r-sm); background: var(--lp-surface); color: var(--lp-ink); font-size: var(--lp-fs-3xs); } .sheet-rules-preview.is-bold { font-weight: 600; } .sheet-rules-preview.is-none { color: var(--lp-muted); } .sheet-rules-preview.is-bar { justify-content: flex-start; padding: 3px; } .sheet-rules-preview-bar { width: 60%; height: 100%; border-radius: var(--lp-r-sm); } /* A refusal Save raised for THIS rule, on its own row (deep red on white, DESIGN.md section 3). */ .sheet-rules-card.is-flagged .sheet-rules-order { color: var(--lp-red-deep); } .sheet-rules-flag { margin: 0; padding: 0 8px 6px 40px; font-size: var(--lp-fs-3xs); color: var(--lp-red-deep); } .sheet-rules-editor { display: flex; flex-direction: column; gap: 8px; padding: 8px 8px 10px 40px; border-top: 1px solid var(--lp-line); animation: sheet-rules-open 150ms ease-out; } .sheet-rules-editor > .sheet-rules-row { flex-wrap: wrap; } @keyframes sheet-rules-open { from { opacity: 0; transform: translateY(-2px); } to { opacity: 1; transform: none; } } @media (prefers-reduced-motion: reduce) { .sheet-rules-editor { animation: none; } } .sheet-rules-row { display: flex; align-items: flex-end; gap: 8px; } .sheet-rules-order { flex: 0 0 auto; min-width: 18px; font-size: var(--lp-fs-2xs); color: var(--lp-muted); font-variant-numeric: tabular-nums; } .sheet-rules-field { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; } /* Sentence case micro-label: no caps, and therefore no letterspacing (DESIGN.md section 2). */ .sheet-rules-label { font-size: var(--lp-fs-3xs); color: var(--lp-muted); letter-spacing: normal; } .sheet-rules-input, .sheet-rules-select { width: 100%; box-sizing: border-box; appearance: none; font: inherit; font-size: var(--lp-fs-2xs); color: var(--lp-ink); background: var(--lp-surface); border: 1px solid var(--lp-line); border-radius: var(--lp-r-sm); padding: 5px 7px; transition: border-color 150ms ease-out; } /* S66-T12: a select sizes to its LONGEST option rather than to a share of the row, so "Highlight cells" and "Is not empty" are never clipped. */ .sheet-rules-field.is-select { flex: 0 0 auto; } .sheet-rules-field.is-select > .sheet-rules-select { width: auto; min-width: 9em; } .sheet-rules-input:focus-visible, .sheet-rules-select:focus-visible { outline: 2px solid var(--lp-blue); outline-offset: 1px; border-color: var(--lp-blue); } .sheet-rules-moves { flex: 0 0 auto; display: flex; align-items: center; gap: 2px; } /* DESIGN.md section 4 button reset in full, so no UA chrome leaks into the card. */ .sheet-rules-move, .sheet-rules-remove, .sheet-rules-add, .sheet-rules-bold, .sheet-rules-swatch { appearance: none; border: 0; background: transparent; font: inherit; color: inherit; cursor: pointer; } .sheet-rules-move, .sheet-rules-remove { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: var(--lp-r-sm); color: var(--lp-muted); transition: background-color 150ms ease-out, color 150ms ease-out; } .sheet-rules-move:hover:not(:disabled), .sheet-rules-remove:hover { background: var(--lp-surface-2); color: var(--lp-ink); } .sheet-rules-move:disabled { opacity: 0.4; cursor: default; } .sheet-rules-move:focus-visible, .sheet-rules-remove:focus-visible, .sheet-rules-add:focus-visible, .sheet-rules-bold:focus-visible, .sheet-rules-swatch:focus-visible { outline: 2px solid var(--lp-blue); outline-offset: 1px; } /* ONE chevron shape, rotated, so the pair cannot drift apart. */ .sheet-rules-move.is-down .sheet-rules-icon { transform: rotate(180deg); } .sheet-rules-icon { width: 14px; height: 14px; } .sheet-rules-paint { flex-wrap: wrap; align-items: center; gap: 6px; } .sheet-rules-swatches { display: inline-flex; align-items: center; gap: 3px; } /* ⚠ `var(--lp-line)`, not a `--lp-line-strong`: no such token is declared in index.css and `verify_icons::ghost_tokens` counts one. W51-T16 fixed exactly this in this file already. */ .sheet-rules-swatch { width: 18px; height: 18px; border-radius: var(--lp-r-sm); border: 1px solid var(--lp-line); transition: transform 150ms ease-out; } .sheet-rules-swatch.is-ink { background: var(--lp-surface); font-size: var(--lp-fs-3xs); font-weight: 600; line-height: 1; } .sheet-rules-swatch.is-on { outline: 2px solid var(--lp-blue); outline-offset: 1px; } .sheet-rules-bold { width: 22px; height: 22px; border-radius: var(--lp-r-sm); border: 1px solid var(--lp-line); font-weight: 600; color: var(--lp-muted); } .sheet-rules-bold.is-on { background: var(--lp-surface-2); color: var(--lp-ink); border-color: var(--lp-blue); } .sheet-rules-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; } .sheet-rules-add { font-size: var(--lp-fs-2xs); color: var(--lp-blue-deep); padding: 4px 6px; border-radius: var(--lp-r-sm); transition: background-color 150ms ease-out; } .sheet-rules-add:hover { background: var(--lp-surface-2); } .sheet-rules-count { font-size: var(--lp-fs-3xs); color: var(--lp-muted); font-variant-numeric: tabular-nums; } /* A refusal is a sentence, and it rides the deep red so it is readable on white (DESIGN.md section 3: pastels are fills, text rides the deep companion). */ .sheet-rules-refusal, .sheet-validation-refusal { margin: 0; font-size: var(--lp-fs-2xs); color: var(--lp-red-deep); } /* -- the validation list editor -------------------------------------------------------------- */ .sheet-validation { display: flex; flex-direction: column; gap: 8px; } .sheet-validation-label { font-size: var(--lp-fs-2xs); color: var(--lp-muted); } .sheet-validation-box { width: 100%; box-sizing: border-box; resize: vertical; font: inherit; font-size: var(--lp-fs-2xs); color: var(--lp-ink); background: var(--lp-surface); border: 1px solid var(--lp-line); border-radius: var(--lp-r-sm); padding: 7px 8px; transition: border-color 150ms ease-out; } .sheet-validation-box:focus-visible { outline: 2px solid var(--lp-blue); outline-offset: 1px; border-color: var(--lp-blue); } .sheet-validation-count { margin: 0; font-size: var(--lp-fs-3xs); color: var(--lp-muted); font-variant-numeric: tabular-nums; } /* -- the dropdown cell editor ---------------------------------------------------------------- */ .sheet-dropdown { display: flex; flex-direction: column; min-width: 190px; max-width: 300px; padding: 6px; gap: 4px; animation: sheet-dropdown-in 150ms ease-out; } @keyframes sheet-dropdown-in { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: translateY(0); } } .sheet-dropdown-search { width: 100%; box-sizing: border-box; font: inherit; font-size: var(--lp-fs-2xs); color: var(--lp-ink); background: var(--lp-surface); border: 1px solid var(--lp-line); border-radius: var(--lp-r-sm); padding: 5px 7px; } .sheet-dropdown-search:focus-visible { outline: 2px solid var(--lp-blue); outline-offset: 1px; border-color: var(--lp-blue); } .sheet-dropdown-list { display: flex; flex-direction: column; max-height: 220px; overflow-y: auto; } .sheet-dropdown-row, .sheet-dropdown-clear { appearance: none; border: 0; background: transparent; font: inherit; font-size: var(--lp-fs-2xs); color: var(--lp-ink); text-align: left; padding: 5px 7px; border-radius: var(--lp-r-sm); cursor: pointer; transition: background-color 150ms ease-out; } .sheet-dropdown-row:hover, .sheet-dropdown-clear:hover { background: var(--lp-surface-2); } .sheet-dropdown-row:focus-visible, .sheet-dropdown-clear:focus-visible { outline: 2px solid var(--lp-blue); outline-offset: -1px; } .sheet-dropdown-row[aria-selected="true"] { background: var(--lp-blue-tint); } .sheet-dropdown-clear { border-top: 1px solid var(--lp-line); border-radius: 0; color: var(--lp-muted); } .sheet-dropdown-none { margin: 0; padding: 6px 7px; font-size: var(--lp-fs-2xs); color: var(--lp-muted); } /* == W51-T34 / R17 -- THE FROZEN ROW BAND: a second grid, above the first. ==================== glide-data-grid 6.0.3 has no leading-row freeze (freezeTrailingRows pins rows at the BOTTOM), so the frozen rows are drawn by a second DataEditor mounted above the body and scrolled with it. Three rules hold that box together, and each of them is load bearing: 1. THE SELECTOR IS DESCENDANT ON PURPOSE. wave49/sheet.css declares `.sheet-grid-canvas > * { flex: 1 1 auto; min-height: 0; }`, which would let the band grow into the body's space. That rule and a bare `.sheet-frozen-rows` have the same specificity, and wave49/sheet.css is imported inside the Sheet's own lazily loaded chunk while this file is imported from index.css, so the lazy one wins a tie. Naming the parent takes the band out of the tie rather than relying on load order ([[a-lazy-chunk-stylesheet-beats-an-eager-one]]). 2. `flex: 0 0 auto` WITH AN INLINE HEIGHT. The height is the band's rows plus its one header row and is computed in the component, because it moves with the row height dialog. 3. `min-height: 0` ON THE CHILD, so glide's wrapper takes its height as a flex item rather than resolving 100% against a parent that has none. At a measured height of zero glide renders NO CANVAS AT ALL rather than a clipped one, which is W50-T19's whole lesson. */ .sheet-grid-canvas > .sheet-frozen-rows { flex: 0 0 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; /* The seam between the frozen rows and the body reads as one line, not as two grids. The token is `--lp-line`: `--lp-line-strong` is a GHOST that index.css never declared, and W51-T18's own leg reds this stylesheet for naming it. */ border-bottom: 1px solid var(--lp-line); } .sheet-frozen-rows > * { flex: 1 1 auto; min-height: 0; } /* The panes panel asks two numbers and offers four acts, so its buttons wrap rather than squeezing; everything else is the row height ask's own appearance. */ .sheet-freeze-ask .sheet-ask-actions { flex-wrap: wrap; } /* ── S67-T15: the Borders gallery (Excel's menu, entry for entry) ───────────────────────────── Each row is an icon and a label; Line Color and Line Style carry a chevron to their flyout. Separators, the "Draw Borders" heading and the line samples are the only new shapes, and all of them are chrome, so every value here is a token. The swatch chips inside the Line Color flyout take the person's hex inline from the component (DESIGN.md 3: a border colour is data). */ .sheet-border-item { display: flex; align-items: center; gap: 8px; white-space: nowrap; } .sheet-border-item .sheet-border-icon { flex: 0 0 auto; color: var(--lp-ink); } .sheet-border-label { flex: 1 1 auto; } .sheet-border-more { display: inline-flex; margin-left: 12px; color: var(--lp-muted); } .sheet-border-sep { height: 1px; margin: 4px 2px; background: var(--lp-line); } .sheet-border-heading { padding: 4px 8px 2px; font-size: var(--lp-fs-2xs); font-weight: 600; color: var(--lp-muted); } /* The flyout is a DOM child of the gallery panel (see `ribbonHome.tsx::BorderFlyout`), lifted beside its item by an inline `position: fixed`; `z-index` keeps it above the rows it overlaps. */ .sheet-border-flyout { z-index: 1; min-width: 132px; } .sheet-ribbon-swatches.sheet-border-swatches { grid-template-columns: repeat(5, 1fr); } .sheet-border-swatches .sheet-ribbon-swatch.is-on { box-shadow: inset 0 0 0 2px var(--lp-primary); } .sheet-border-style { padding-top: 7px; padding-bottom: 7px; } .sheet-border-sample { width: 56px; height: 10px; color: var(--lp-ink); }