runloopable / web /src /styles /wave54 /ribbon-insert.css
fsanyoto's picture
Deploy AIOS web (React glide grid + FastAPI slice)
c1fc133 verified
Raw History Blame Contribute Delete
29.4 kB
/* wave 54 -- the INSERT TAB's own ribbon layout (base kit 2a, filled by W54-T10).
⭐ IMPORTED BY `sheet/ribbonInsert.tsx`, a component-owned side-effect import, for the reason
`wave52/ribbon.css`'s own header sets out: `index.css` is shared across every lane and a line
there is the trivial-but-collision-prone edit.
The shared vocabulary is not redeclared globally here. Insert-only size overrides below
match Home's large Paste role. `.sheet-ribbon-btn`, `.sheet-ribbon-icon`,
`.sheet-ribbon-caret`, `.sheet-ribbon-slot`, `.sheet-ribbon-group`, `.sheet-ribbon-group-name`,
`.sheet-ribbon-group-controls`, `.sheet-ribbon-scroll` and `.sheet-ribbon-item` are painted by
`styles/wave50/sheet.css` and `styles/wave51/sheet-engine.css` for EVERY tab, unscoped, so a
group in this tab inherits all of it by using the same `group(...)` and `control(...)` helpers
the shell hands every tab module.
Tokens only: var(--lp-*); no literal font-size, no hex, no text-transform: uppercase
(DESIGN.md section 2). */
/* ══════════════════════════════════════════════════════════════════════════════════════════════
β›”β›” THE THREE RESTATED RULES, AND THIS BLOCK IS THE WHOLE REASON THIS FILE HAD TO EXIST.
`styles/wave51/sheet-engine.css` scopes three ribbon-row rules to `.sheet-ribbon-home` and ONLY
to it. The toolbar row this tab paints carries `.sheet-ribbon-insert` instead (the shell writes
`activeTab.bodyClass` on it), so it inherits NONE of the three: the row would lose its stretch
and its padding, every icon-plus-word control would lose the gap between the two, and a long
caption would wrap mid word. All of it silently, with no build error and no gate going red,
which is exactly the class of defect that only shows up in a screenshot.
β›” RESTATED HERE RATHER THAN WIDENED THERE. Widening the selector in `sheet-engine.css` would
mean editing a file this lane does not own while three other lanes are live in the same tree,
and it would also make the Home row's layout depend on an edit made for the Insert row. Two
tabs, two declarations, each owned by the module that paints it.
══════════════════════════════════════════════════════════════════════════════════════════════ */
/* `.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-insert {
align-items: stretch;
gap: 0;
padding: 4px 8px;
}
/* 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-insert .sheet-ribbon-btn { gap: 4px; }
.sheet-ribbon-insert .sheet-ribbon-label { white-space: nowrap; }
/* R19: large and stack slots use the shared rules in wave52/ribbon.css.
Chart split buttons and the native disabled fence below remain Insert-specific. */
/* ── the disabled fence ───────────────────────────────────────────────────────────────────────
β›” A `<fieldset>` IS THE ONLY NATIVE WAY TO DISABLE A WHOLE GROUP OF CONTROLS AT ONCE, and the
Insert tab needs exactly that when the page has not wired its document doors (no fake
affordance). What it must NOT do is add a box: the element sits inside `.sheet-ribbon-scroll`
as its single flex child, so it takes over that child's job of being the row of groups.
⚠ `display: contents` would be the tidier answer and is deliberately NOT used: it has known
accessibility-tree gaps on form elements in shipping browsers, and a laid-out flex row with its
own chrome stripped is behaviour we can see rather than behaviour we hope for. */
.sheet-ribbon-insert-fence {
flex: 1 1 auto;
min-width: 0;
display: flex;
align-items: stretch;
margin: 0;
padding: 0;
border: 0;
}
/* ── the two small forms ──────────────────────────────────────────────────────────────────────
Both hang off their own trigger through `AnchoredOverlay`, so they are POPOVERS and never
modals (DESIGN.md 4). The surface, the edge and the shadow come from
`.sheet-ribbon-pop-portal` (`styles/wave53/ribbon-pop.css`); what is added here is only the
field stack inside it. */
.sheet-ribbon-insert-form {
min-width: 236px;
}
.sheet-ribbon-insert-fields {
display: flex;
flex-direction: column;
gap: 5px;
}
.sheet-ribbon-insert-caption {
font-size: var(--lp-fs-3xs);
line-height: 1;
color: var(--lp-muted);
}
.sheet-ribbon-insert-input,
.sheet-ribbon-insert-area {
width: 100%;
box-sizing: border-box;
padding: 5px 7px;
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);
transition: border-color 150ms ease-out;
}
.sheet-ribbon-insert-area {
resize: vertical;
min-height: 56px;
}
.sheet-ribbon-insert-input:focus-visible,
.sheet-ribbon-insert-area:focus-visible {
outline: none;
border-color: var(--lp-blue-deep);
}
/* ── the sparkline authoring form (W54-T13) ───────────────────────────────────────────────────
⚠ NONE OF THIS REACHES THE SPARKLINE ITSELF. The mark is drawn on the grid's CANVAS by
`sheet/sparkline.ts`, so no selector can touch it and its colours are `--lp-*` tokens resolved
in code through `cellBorders.ts::tokenColour`. What is styled here is only the small form that
asks for the two ranges. */
/* The kind the form is about, said once at the top: the three triggers are three buttons and the
popover has to name which one opened it. Sentence case, never uppercase (DESIGN.md 2). */
.sheet-ribbon-insert-title {
margin: 0 0 1px;
font-size: var(--lp-fs-xs);
line-height: 1.2;
color: var(--lp-ink);
}
/* The mapping rule, stated on screen because it is the one thing a person cannot guess. Quiet,
and it wraps: it is a sentence rather than a label. */
.sheet-ribbon-insert-hint {
margin: 1px 0 0;
max-width: 30ch;
font-size: var(--lp-fs-3xs);
line-height: 1.35;
color: var(--lp-muted);
}
/* β›” A REFUSAL IS ONE SENTENCE AND IT NEVER MOVES THE FIELDS (DESIGN.md 5). It appears under the
hint, in the destructive ink on its own tint, and says what did not divide without explaining
the arithmetic. */
.sheet-ribbon-insert-refusal {
margin: 1px 0 0;
max-width: 30ch;
padding: 4px 6px;
font-size: var(--lp-fs-3xs);
line-height: 1.35;
color: var(--lp-red-deep);
background: var(--lp-red-tint);
border-radius: var(--lp-r-sm);
}
/* The submit button is a `.sheet-ribbon-item` row, which is already the popover's own control
shape; it only needs to stop stretching to the full width of a flex column and to read as the
affirmative rather than as one more menu row. */
.sheet-ribbon-insert-fields .sheet-ribbon-item {
align-self: flex-start;
padding-left: 10px;
padding-right: 10px;
color: var(--lp-blue-solid);
}
/* ⭐ Press feedback is subtle and must not change layout (DESIGN.md 4), and it answers on POINTER
rather than on release. `:active` is the pointer-down state the browser already gives us. */
.sheet-ribbon-insert-fields .sheet-ribbon-item:active {
transform: scale(0.97);
}
@media (prefers-reduced-motion: reduce) {
.sheet-ribbon-insert-input,
.sheet-ribbon-insert-area {
transition: none;
}
.sheet-ribbon-insert-fields .sheet-ribbon-item:active {
transform: none;
}
}
/* ══════════════════════════════════════════════════════════════════════════════════════════════
⭐ THE CHART DIALOG (W54-T11, ruling R5), painted by `sheet/ChartDialog.tsx`.
β›” EVERY SELECTOR BELOW IS TOP LEVEL, AND IT HAS TO BE. The dialog renders through `BodyPortal`,
so it has no ancestor inside `.sheet-ribbon-insert`; a descendant selector under the toolbar row
would match nothing at all, silently, exactly the way `styles/wave51/kit.css` explains for its
own rules.
β›” THE SURFACE IS NOT REDECLARED. `.lp-dialog-scrim` and `.lp-dialog` in `wave51/kit.css` are
already the centred, token-only, portal-safe modal, and the one geometry this ticket states is
the width, written inline beside the element that needs it. `.sheet-chart-dialog` carries no
rule on purpose: it is the name a gate or a screenshot points at.
Tokens only: var(--lp-*); no literal font-size, no hex, no uppercase (DESIGN.md sections 2, 3
and 5).
══════════════════════════════════════════════════════════════════════════════════════════════ */
/* ── the two source tabs ──────────────────────────────────────────────────────────────────────
A tab set that already exists in this app (`.conn-modal-tab` in `wave49/connectors.css`) rather
than a new control shape: quiet by default, the selected one inked and underlined. */
.sheet-chart-tabs {
display: flex;
gap: 2px;
border-bottom: 1px solid var(--lp-line);
}
.sheet-chart-tab {
appearance: none;
margin: 0 0 -1px 0;
padding: 6px 10px;
background: transparent;
border: 0;
border-bottom: 2px solid transparent;
border-radius: var(--lp-r-sm) var(--lp-r-sm) 0 0;
font: inherit;
font-size: var(--lp-fs-xs);
color: var(--lp-muted);
cursor: pointer;
transition: color 150ms ease-out, border-color 150ms ease-out;
}
.sheet-chart-tab:hover {
color: var(--lp-ink);
}
.sheet-chart-tab[aria-selected="true"] {
color: var(--lp-ink);
border-bottom-color: var(--lp-blue-solid);
}
.sheet-chart-tab:focus-visible {
outline: 2px solid var(--lp-blue-deep);
outline-offset: -2px;
}
/* Press feedback is subtle and must not change layout (DESIGN.md 4), and `:active` is the
pointer-down state the browser already gives us. */
.sheet-chart-tab:active {
transform: scale(0.97);
}
/* A FLOOR, NOT A HEIGHT, and it is measured rather than picked: 176px is the cell-range tab's own
content (its sentence plus two rows of the gallery), so that tab shows no void under its last
row while the panel still cannot collapse to nothing mid render. The database tab is taller and
simply grows past it. */
.sheet-chart-panel {
display: flex;
flex-direction: column;
gap: 10px;
min-height: 176px;
}
.sheet-chart-caption,
.sheet-chart-note {
margin: 0;
font-size: var(--lp-fs-2xs);
line-height: 1.4;
color: var(--lp-muted);
}
/* The ribbon's chart shortcuts reuse the former, unused dialog gallery vocabulary. */
.sheet-ribbon-insert .sheet-chart-gallery {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
grid-template-rows: repeat(2, minmax(0, 1fr));
height: var(--sheet-ribbon-band);
gap: 4px;
margin-left: 4px;
}
.sheet-ribbon-insert .sheet-chart-kind {
display: flex;
flex-direction: row;
align-items: center;
border-radius: var(--lp-r-sm);
}
.sheet-ribbon-insert .sheet-chart-kind .sheet-ribbon-btn {
height: 24px;
padding: 0 4px;
}
.sheet-ribbon-insert .sheet-chart-kind-caret {
display: flex;
border-left: 1px solid var(--lp-line);
}
.sheet-ribbon-insert .sheet-chart-kind-caret .sheet-ribbon-btn {
min-width: 16px;
width: 16px;
padding: 0;
}
.sheet-ribbon-insert .sheet-chart-kind-recommended .sheet-ribbon-btn {
width: 100%;
}
.sheet-ribbon-insert .sheet-chart-kind-icon {
width: 15px;
height: 15px;
fill: none;
stroke: currentColor;
stroke-width: 1.2;
stroke-linecap: round;
stroke-linejoin: round;
}
/* A zero-length segment with a round cap IS the dot; heavier stroke is what gives it a radius. */
.sheet-ribbon-insert .sheet-chart-kind-dots {
stroke-width: 2.2;
}
/* ── the database tab's fields ────────────────────────────────────────────────────────────────
Controls in a row share height and baseline (DESIGN.md 4), which is what the fixed 30px below
buys: the select, the text box and the number box are one rhythm rather than three. */
.sheet-chart-fields {
display: grid;
grid-template-columns: 116px minmax(0, 1fr);
gap: 8px 10px;
align-items: center;
}
.sheet-chart-label {
font-size: var(--lp-fs-2xs);
color: var(--lp-muted);
}
.sheet-chart-select,
.sheet-chart-text,
.sheet-chart-number {
width: 100%;
height: 30px;
box-sizing: border-box;
padding: 0 8px;
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);
transition: border-color 150ms ease-out;
}
.sheet-chart-select:focus-visible,
.sheet-chart-text:focus-visible,
.sheet-chart-number:focus-visible {
outline: none;
border-color: var(--lp-blue-deep);
}
.sheet-chart-kindblock {
display: flex;
flex-direction: column;
gap: 6px;
}
/* ── loading ──────────────────────────────────────────────────────────────────────────────────
A skeleton over a spinner (DESIGN.md 4): it is the shape of the control that is coming, in the
place it will appear, so nothing moves when the list lands. */
.sheet-chart-skeleton {
height: 30px;
border-radius: var(--lp-r-sm);
background: var(--lp-surface-2);
animation: sheet-chart-pulse 1200ms ease-out infinite;
}
@keyframes sheet-chart-pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.55; }
}
@media (prefers-reduced-motion: reduce) {
.sheet-chart-tab,
.sheet-chart-select,
.sheet-chart-text,
.sheet-chart-number {
transition: none;
}
.sheet-chart-tab:active {
transform: none;
}
/* The slide becomes a short opacity change rather than nothing at all, so the skeleton still
reads as pending. */
.sheet-chart-skeleton {
animation: none;
opacity: 0.7;
}
}
/* ══════════════════════════════════════════════════════════════════════════════════════════════
⭐ THE DRAWN CHART AND ITS TWO HANDLES (W54-T12, ruling R5), painted by `sheet/SheetChart.tsx`.
β›” THE PALETTE IS NOT REDECLARED. `pg-ser-0..3`, `pg-ax`, `pg-ax-lab`, `pg-bar`, `pg-legend*`
and `pg-chart-svg` are declared unscoped in `index.css` for `viz/SeriesChart`, and the own-drawn
kinds wear the same classes so the four series colours have exactly one home. What IS added
here is the STROKE half of that palette: `.pg-ser-N` sets a `fill`, and DESIGN.md section 3 puts
lines, dots and text on the DEEP companion rather than on the pastel, so a line mark cannot
simply borrow a fill class.
β›” ANCHORED, THEREFORE POINTER-TRANSPARENT. `.sheet-chart-anchor` in `styles/wave49/sheet.css`
carries `pointer-events: none` so a chart never eats a click meant for a cell underneath it.
The two handles are the only parts that take a pointer, and they say so one by one.
Tokens only: var(--lp-*); no literal font-size outside the scale, no hex, no uppercase, no
literal z-index (DESIGN.md sections 2, 3 and 5). `--lp-fs-5xs` is the documented FLOOR and is
used here for chart axis furniture only.
══════════════════════════════════════════════════════════════════════════════════════════════ */
/* ⚠ ONE PROPERTY RESTATED, NOT A SECOND DECLARATION OF THE SURFACE. The chart's border, radius,
background and shadow stay in `wave49/sheet.css`; the handles are absolutely placed against
this box, so it has to be a positioning parent and it was not one before this ticket. */
.sheet-chart {
position: relative;
}
/* The own-drawn kinds stack legend, plot and footer, and the PLOT is what absorbs the leftover
height. Without this the shared `.sheet-chart svg { height: 100% }` rule would give the svg the
whole box and push the footer out of a container that clips. */
.sheet-chart-plot {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
padding: 4px 6px;
box-sizing: border-box;
}
.sheet-chart-plot .pg-chart-svg {
flex: 1 1 auto;
min-height: 0;
height: auto;
}
.sheet-chart-foot {
margin: 2px 0 0;
font-size: var(--lp-fs-3xs);
line-height: 1.3;
color: var(--lp-muted);
}
/* ── the marks the shared palette has no class for ────────────────────────────────────────── */
.sheet-chart-line {
fill: none;
stroke-width: 1.8;
stroke-linecap: round;
stroke-linejoin: round;
}
/* β›” THE STROKE HALF OF THE SERIES CYCLE, IN THE SAME ORDER AS `pg-ser-0..3` AND ON THE DEEP
COMPANIONS. DESIGN.md 3: "Pastels are fills and tints. Text, strokes, chart lines, icons ride
the deep companion" - a pastel line on white is not a light aesthetic, it is an unreadable one.
Four and no more, exactly as `viz`'s own fill cycle ends on red: past four series a chart is
read by small multiples rather than by a fifth hue. */
.sheet-chart-ink-0 { stroke: var(--lp-blue-deep); }
.sheet-chart-ink-1 { stroke: var(--lp-green-deep); }
.sheet-chart-ink-2 { stroke: var(--lp-yellow-deep); }
.sheet-chart-ink-3 { stroke: var(--lp-red-deep); }
/* An area is the region UNDER its own line, so it takes the pastel fill from the shared
`pg-ser-N` class and only needs to stop being opaque: two overlapping areas both have to stay
readable, or the lower series is simply erased and the chart shows fewer series than it says. */
.sheet-chart-area {
stroke: none;
fill-opacity: 0.42;
}
/* A dot takes its fill from the shared `pg-ser-N` class and only needs its edge quietened, so a
cluster of overlapping points still reads as separate points. */
.sheet-chart-dot {
stroke: var(--lp-surface);
stroke-width: 1;
}
/* A slice is separated by the surface itself rather than by a line colour: a pie with hairlines
between its wedges reads as a diagram, and this is a picture of a whole. */
.sheet-chart-slice {
stroke: var(--lp-surface);
stroke-width: 1.5;
}
.sheet-chart-ring {
fill: none;
stroke: var(--lp-line);
stroke-width: 1;
}
/* Axis furniture only, and this is the documented FLOOR: a category label on a horizontal bar
chart sits inside a 52px inset and has to fit there. */
.sheet-chart-cat {
font-size: var(--lp-fs-5xs);
}
/* ── the move affordance and the resize handle ────────────────────────────────────────────── */
.sheet-chart-tool {
position: absolute;
display: flex;
align-items: center;
justify-content: center;
width: 20px;
height: 20px;
padding: 0;
margin: 0;
border: 0;
background: var(--lp-surface);
border-radius: var(--lp-r-sm);
font: inherit;
color: var(--lp-muted);
opacity: 0.5;
pointer-events: auto;
transition: opacity 150ms ease-out, color 150ms ease-out;
}
/* β›”β›” QUIET, NOT HIDDEN, AND THE REASON IS A MEASURED ONE. `.sheet-chart-anchor` carries
`pointer-events: none`, so the chart itself is never the hit target and a `:hover` reveal would
have needed the reader to find an INVISIBLE 20px square before it appeared. Driven in a browser:
the handle answers a pointer at opacity 0 exactly as it does at 1, which is the shape of a
control that works in a test and cannot be found by a person. So it sits at half strength and
comes up to full when it is actually addressed. */
.sheet-chart:hover .sheet-chart-tool,
.sheet-chart-tool:hover,
.sheet-chart-tool:focus-visible {
opacity: 1;
}
.sheet-chart-tool:hover {
color: var(--lp-ink);
background: var(--lp-surface-2);
}
.sheet-chart-tool:focus-visible {
outline: 2px solid var(--lp-blue-deep);
outline-offset: 1px;
}
/* Press feedback answers on pointer down and must not change layout (DESIGN.md 4). */
.sheet-chart-tool:active {
transform: scale(0.97);
}
.sheet-chart-grip {
top: 3px;
right: 3px;
cursor: grab;
}
.sheet-chart-grip:active {
cursor: grabbing;
}
.sheet-chart-corner {
right: 1px;
bottom: 1px;
cursor: nwse-resize;
}
/* W60-T19 (R12): Eight plain square handles appear on the selected chart. */
.sheet-chart-handle {
width: 10px;
height: 10px;
border: 1px solid var(--lp-blue-deep);
border-radius: 2px;
background: var(--lp-surface);
opacity: 0;
}
.sheet-chart.is-selected .sheet-chart-handle,
.sheet-chart-handle:hover,
.sheet-chart-handle:focus-visible { opacity: 1; }
/* β›”β›” INSIDE THE BOX, NOT ON ITS EDGE, AND THE REASON IS MEASURED. `.sheet-chart` carries
`overflow: hidden` in a stylesheet this lane may not edit, so a handle hung at -5px is clipped:
it still has a layout box, so a measurement finds it, but it paints nothing and answers no
pointer. Driven in the browser: with the handles at -5px an east or west drag moved the chart by
exactly zero, while the bottom-right one, which has always sat at right:1 bottom:1, worked. All
eight now sit where that one does. */
.sheet-chart-handle[data-handle="nw"] { top: 1px; left: 1px; cursor: nwse-resize; }
.sheet-chart-handle[data-handle="n"] { top: 1px; left: calc(50% - 5px); cursor: ns-resize; }
.sheet-chart-handle[data-handle="ne"] { top: 1px; right: 1px; cursor: nesw-resize; }
.sheet-chart-handle[data-handle="w"] { top: calc(50% - 5px); left: 1px; cursor: ew-resize; }
.sheet-chart-handle[data-handle="e"] { top: calc(50% - 5px); right: 1px; cursor: ew-resize; }
.sheet-chart-handle[data-handle="sw"] { bottom: 1px; left: 1px; cursor: nesw-resize; }
.sheet-chart-handle[data-handle="s"] { bottom: 1px; left: calc(50% - 5px); cursor: ns-resize; }
/* β›” BEATS `.sheet-chart svg { width: 100%; height: 100% }`, WHICH IS WHY IT IS WRITTEN WITH TWO
CLASSES. That rule exists to scale the PLOT to its cell rectangle; an icon inside a handle is
not the plot, and without this it is stretched to the size of the whole chart. */
.sheet-chart .sheet-chart-tool-icon {
width: 12px;
height: 12px;
fill: none;
stroke: currentColor;
stroke-width: 1.3;
stroke-linecap: round;
stroke-linejoin: round;
}
@media (prefers-reduced-motion: reduce) {
.sheet-chart-tool {
transition: opacity 100ms ease-out;
}
.sheet-chart-tool:active {
transform: none;
}
}
/* ══════════════════════════════════════════════════════════════════════════════════════════════
⭐ THE LINK FORM AND THE NOTE BUBBLE (W54-T14), painted by `sheet/LinkDialog.tsx`.
β›”β›” NOTHING HERE REACHES THE TWO CELL MARKS, AND NOTHING CAN. A link's underline and a note's
corner indicator are drawn on the grid's CANVAS by `LinkDialog.tsx::paintCellMarks`, so no
selector in this file or any other can touch them; their colours are `--lp-*` tokens resolved
in code through `cellBorders.ts::tokenColour`, which is the one resolver this folder has. What
is styled below is only the two surfaces made of DOM: the authoring popover and the bubble.
β›” BOTH ARE PORTALLED, so every selector is TOP LEVEL. A descendant selector under
`.sheet-ribbon-insert` would match nothing at all, silently, exactly as the chart dialog's own
block above explains.
Tokens only: var(--lp-*); no literal font-size outside the scale, no hex, no uppercase, no
literal z-index (DESIGN.md sections 2, 3 and 5).
══════════════════════════════════════════════════════════════════════════════════════════════ */
/* The form is a little wider than the sparkline one: three kind buttons sit in a row and a sheet
name is longer than an address. */
.sheet-link-form {
min-width: 252px;
}
/* ── the three kinds ──────────────────────────────────────────────────────────────────────────
A row of small buttons rather than a select: the choice is closed and worth seeing at a glance.
β›” ONE HEIGHT AND ONE BASELINE ACROSS THE ROW (DESIGN.md 4), which is what `1fr` columns plus a
shared padding buy; three buttons of three different widths would read as three control
shapes. */
.sheet-link-kinds {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 4px;
}
.sheet-link-kind {
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
padding: 6px 4px;
background: var(--lp-surface);
border: 1px solid var(--lp-line);
border-radius: var(--lp-r-md);
font: inherit;
font-size: var(--lp-fs-3xs);
line-height: 1.2;
color: var(--lp-ink);
cursor: pointer;
transition: border-color 150ms ease-out, background-color 150ms ease-out, color 150ms ease-out;
}
.sheet-link-kind:hover {
background: var(--lp-surface-2);
}
.sheet-link-kind[aria-pressed="true"] {
border-color: var(--lp-blue-solid);
color: var(--lp-blue-solid);
}
.sheet-link-kind:focus-visible {
outline: 2px solid var(--lp-blue-deep);
outline-offset: 1px;
}
/* Press feedback answers on pointer down and must not change layout (DESIGN.md 4). */
.sheet-link-kind:active {
transform: scale(0.97);
}
.sheet-link-kind-icon {
width: 16px;
height: 16px;
fill: none;
stroke: currentColor;
stroke-width: 1.2;
stroke-linecap: round;
stroke-linejoin: round;
}
/* The sheet picker joins the field rhythm the text inputs already set, rather than wearing the
browser's own control metrics. */
.sheet-link-select {
width: 100%;
box-sizing: border-box;
padding: 5px 7px;
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);
transition: border-color 150ms ease-out;
}
.sheet-link-select:focus-visible {
outline: none;
border-color: var(--lp-blue-deep);
}
/* ── the note bubble ──────────────────────────────────────────────────────────────────────────
β›”β›” POINTER TRANSPARENT, AND THAT IS BEHAVIOUR RATHER THAN POLISH. glide reports the hovered
cell off the canvas UNDER this box, so a bubble that took a pointer would hide the very cell it
is describing from the callback that opened it, and it would flicker as the pointer crossed its
own edge.
⭐ THE NOTE STRATUM'S OWN COLOURS. `index.css` declares `--lp-yellow-tint` as "the overlay/note
stratum's wash" and `--lp-yellow-deep` as "note + Pre-set tag text", which is exactly what a
cell note is; the corner indicator on the canvas is the same deep token, so the mark and the
bubble read as one thing. */
.sheet-note-bubble {
max-width: 280px;
padding: 7px 9px;
background: var(--lp-yellow-tint);
border: 1px solid var(--lp-yellow-deep);
border-radius: var(--lp-r-md);
box-shadow: var(--shell-shadow-overlay);
pointer-events: none;
z-index: var(--cg-z-menu);
animation: sheet-note-in 120ms ease-out;
}
.sheet-note-bubble-text {
margin: 0;
font-size: var(--lp-fs-2xs);
line-height: 1.4;
color: var(--lp-ink);
white-space: pre-wrap;
overflow-wrap: anywhere;
}
/* Opacity and transform only, 100 to 200ms, ease-out (DESIGN.md 4). */
@keyframes sheet-note-in {
from { opacity: 0; transform: translateY(-2px); }
to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
.sheet-link-kind,
.sheet-link-select {
transition: none;
}
.sheet-link-kind:active {
transform: none;
}
.sheet-note-bubble {
animation: none;
}
}