| index d16395d..2af42f8 100644 |
| --- a/chrome/chrome.css |
| +++ b/chrome/chrome.css |
| @@ -299,3 +299,357 @@ |
| :where([estilo-signin]) a { color: var(--rst-accent); text-underline-offset: 0.15em; } |
| [estilo-signin-foot] a { color: inherit; } |
| [estilo-signin-foot] a:hover, [estilo-signin-foot] a:focus-visible { color: var(--rst-text); } |
| + |
| +/* ── Bar stack (Docs' I2 editor header, spec 2026-11-11) ──────────────── |
| + Everything below is opt-in. Each rule is keyed on a hook only a bar |
| + with a slot, a WideOnly action or the Appearance form renders, so a bar |
| + with neither Menubar nor Lead looks exactly as it did |
| + (TestEverythingAfterTheMarkerIsOptIn holds this, and that main's rules |
| + above are unchanged). |
| + |
| + The hooks: [estilo-bar~="stacked"] (Bar.Menubar), [estilo-bar-stack] |
| + and [estilo-bar-menubar] inside it, [estilo-bar-lead] (Bar.Lead), |
| + [estilo-bar-control] (each action in a bar with a slot), |
| + [estilo-bar-wide] (Action.WideOnly) and [estilo-appearance]. |
| + |
| + Breakpoints: 800px is rastrillo's shell breakpoint, the rule above |
| + this section and every app's, so it stays in px: restated in rem it |
| + would move apart from them whenever the reader's default font size is |
| + not 16px. 64rem is where a WideOnly action appears, the same 64rem |
| + Docs' inspector uses. */ |
| + |
| +/* A WideOnly action exists only from 64rem (Docs' Format: the inspector |
| + it toggles exists only there). It is also left out of the Menu sheet |
| + (the template). (0,2,0), so it outweighs a POST action's display: |
| + contents form. */ |
| +@media (max-width: 63.99rem) { |
| + [estilo-bar-actions] [estilo-bar-wide], |
| + [estilo-bar-actions] [estilo-bar-control~="wide"] { display: none; } |
| +} |
| + |
| +/* Each action in a bar with a slot sits in its own wrapper, which lays |
| + out as its control. */ |
| +[estilo-bar-control] { display: contents; } |
| +[estilo-bar-lead] { display: flex; align-items: center; gap: var(--rst-sp-2); } |
| + |
| +/* The stacked bar's title is as wide as its title, never the bar's |
| + room: its size attribute is the first paint's guess, chrome.js |
| + measures the field and corrects it, and it is capped at the space it |
| + has, where a longer title scrolls inside the field as it always has. */ |
| +[estilo-bar~="stacked"] [estilo-bar-title] { flex: none; max-inline-size: 100%; } |
| +[estilo-bar~="stacked"] [estilo-bar-title-input] { flex: 0 1 auto; inline-size: auto; min-inline-size: 0; max-inline-size: 100%; } |
| +[estilo-bar~="stacked"] [estilo-bar-context] { max-inline-size: 100%; } |
| +[estilo-bar~="stacked"] [estilo-menubar-title] { cursor: pointer; } |
| + |
| +/* Below 800px the stacked header does not fit a phone (spec C6: File to |
| + Help needs 261px, and at 320px the title fell to "U…"). So the bar |
| + stays today's one row, and the app's menus are a full-width second |
| + row under it: the stack dissolves and the same markup lays out on a |
| + grid. The header grows by that row, and the published block size |
| + with it; a menubar that wraps (a long locale at 320px) grows it |
| + further, beyond what is published. */ |
| +@media (max-width: 799.98px) { |
| + :root:has([estilo-bar~="stacked"]) { --estilo-bar-block-size: calc(3.25rem + 2rem); } /* 84px: the bar's row and one menubar row. PUBLIC */ |
| + [estilo-bar~="stacked"] { |
| + display: grid; |
| + grid-template-columns: auto minmax(0, 1fr) auto; |
| + grid-template-rows: 3.25rem auto; |
| + grid-template-areas: "brand title end" "menus menus menus"; |
| + column-gap: var(--rst-sp-3); |
| + row-gap: 0; |
| + align-items: center; |
| + block-size: auto; |
| + } |
| + [estilo-bar~="stacked"] > [estilo-bar-brand] { grid-area: brand; } |
| + [estilo-bar~="stacked"] > [estilo-bar-end] { grid-area: end; } |
| + [estilo-bar~="stacked"] [estilo-bar-stack] { display: contents; } |
| + [estilo-bar~="stacked"] [estilo-bar-title], |
| + [estilo-bar~="stacked"] [estilo-bar-context] { grid-area: title; justify-self: start; } |
| + [estilo-bar~="stacked"] [estilo-bar-menubar] { |
| + grid-area: menus; |
| + align-self: stretch; |
| + min-inline-size: 0; |
| + margin-inline: calc(var(--rst-sp-3) - var(--rst-sp-4)); /* the menus' edge 12px in, as Docs' own row had it */ |
| + } |
| +} |
| + |
| +/* From 800px, the 56px stacked header: a 32px icon 12px in, and beside |
| + it a 44px stack, the 24px title row (16px, 600) over the 20px menu row |
| + (13px, muted), both starting at 56px (12 + 32 + 12). The app's name |
| + goes: the icon is the brand. Optical balance, measured at 2x in WebKit |
| + on the mock-up: the title's capitals start at the icon's top, so its |
| + row sits 2.5px low; the menu row sits 1px low, its 24px highlight |
| + stops 3px above the header's bottom edge, and an open panel hangs from |
| + 1px above that edge. */ |
| +@media (min-width: 800px) { |
| + :root:has([estilo-bar~="stacked"]) { --estilo-bar-block-size: 56px; } /* PUBLIC */ |
| + [estilo-bar~="stacked"] { gap: 12px; padding-inline: 12px; } |
| + [estilo-bar~="stacked"] [estilo-bar-brand] img { inline-size: 32px; block-size: 32px; } |
| + [estilo-bar~="stacked"] [estilo-bar-name] { display: none; } |
| + [estilo-bar-stack] { |
| + display: flex; |
| + flex-direction: column; |
| + justify-content: center; |
| + align-items: flex-start; |
| + flex: 1 1 auto; |
| + min-inline-size: 0; |
| + block-size: 44px; |
| + } |
| + [estilo-bar~="stacked"] [estilo-bar-title] { |
| + position: relative; |
| + inset-block-start: 2.5px; |
| + block-size: 24px; |
| + margin: 0; |
| + padding: 0; |
| + border: 0; |
| + } |
| + [estilo-bar~="stacked"] [estilo-bar-title-input] { |
| + block-size: 24px; |
| + padding-block: 0; |
| + margin-inline-start: calc(-0.4rem - 1px); /* the field's padding and border pulled back: the text sits on the edge */ |
| + font-size: 16px; |
| + line-height: 24px; |
| + font-weight: 600; |
| + letter-spacing: -0.01em; |
| + } |
| + [estilo-bar~="stacked"] [estilo-bar-context] { |
| + position: relative; |
| + inset-block-start: 2.5px; |
| + padding: 0; |
| + border: 0; |
| + font-size: 16px; |
| + line-height: 24px; |
| + font-weight: 600; |
| + letter-spacing: -0.01em; |
| + } |
| + /* Rename, while the title is being edited: a 22px pill in the |
| + accent's tint inside the 24px title row, not the 2rem button. The |
| + box is the row's 24px, the 24px target floor (AGENTS.md); a |
| + transparent 1px border with the fill clipped inside it paints the |
| + 22px pill. */ |
| + [estilo-bar~="stacked"] [estilo-bar-title]:focus-within [estilo-bar-title-submit] { |
| + align-self: center; |
| + box-sizing: border-box; |
| + block-size: 24px; |
| + min-block-size: 0; |
| + min-inline-size: 0; |
| + margin: 0; |
| + padding: 0 10px; |
| + border: 1px solid transparent; |
| + border-radius: 999px; |
| + background-color: var(--rst-accent-soft); |
| + background-image: none; |
| + background-clip: padding-box; |
| + box-shadow: none; |
| + color: var(--rst-accent); |
| + font: 600 12px/22px var(--rst-font); |
| + } |
| + [estilo-bar~="stacked"] [estilo-bar-title]:focus-within [estilo-bar-title-submit]:hover { |
| + border-color: transparent; |
| + background-color: var(--rst-accent); |
| + color: var(--rst-on-accent); |
| + } |
| + |
| + /* The menu row. estilo's 32px menubar floor goes here, and only here: |
| + the row is 20px, and each title's highlight is a 24px pill with a 6px |
| + radius, 2px over each edge by negative margins, so it takes no room. */ |
| + [estilo-bar-menubar] { |
| + position: relative; |
| + inset-block-start: 1px; |
| + block-size: 20px; |
| + max-inline-size: calc(100% + 7px); |
| + margin-inline-start: -7px; /* the titles' padding pulled back: the first title's text sits on the edge */ |
| + } |
| + [estilo-bar~="stacked"] [estilo-menubar] { block-size: 20px; min-block-size: 0; align-items: center; flex-wrap: nowrap; } |
| + [estilo-bar~="stacked"] [estilo-menubar-menu] { block-size: 20px; } |
| + [estilo-bar~="stacked"] [estilo-menubar-title] { |
| + block-size: 24px; |
| + min-block-size: 0; |
| + margin-block: -2px; |
| + padding-inline: 7px; |
| + border-radius: 6px; |
| + color: var(--rst-text-muted); |
| + font-size: 13px; |
| + line-height: 24px; |
| + } |
| + [estilo-bar~="stacked"] [estilo-menubar-title]:hover, |
| + [estilo-bar~="stacked"] [open] > [estilo-menubar-title] { color: var(--rst-text); } |
| + [estilo-bar~="stacked"] [estilo-menubar-menu] > [estilo-menu] { inset-block-start: calc(100% + 4px); } /* 51 + 4: 1px above the 56px edge */ |
| + |
| + /* Every panel in the stacked header matches it: 28px rows, 13px type, |
| + shortcuts muted, 4px padding and a 10px radius. */ |
| + [estilo-bar~="stacked"] [estilo-menu] { |
| + --estilo-float-padding: 4px; |
| + --estilo-item-padding-block: 4px; |
| + --estilo-item-padding-inline: 10px; |
| + border-radius: 10px; |
| + font-size: 13px; |
| + } |
| + [estilo-bar~="stacked"] [estilo-menu-item] { min-block-size: 28px; border-radius: 6px; } |
| + [estilo-bar~="stacked"] [estilo-menu] hr { margin-block: 4px; } |
| + [estilo-bar~="stacked"] [estilo-menu-key] { color: var(--rst-text-muted); font-size: 12px; } |
| + |
| + /* The controls set, in a bar with a slot: every action a 28px pill, |
| + 13px semibold, 8px apart; the primary the one filled pill; the |
| + account its circle; and a divider between the page's controls and |
| + the person's. Lit from above as the index's New document is, and far |
| + fainter in dark. */ |
| + :is([estilo-bar~="stacked"], [estilo-bar]:has([estilo-bar-lead])) [estilo-bar-end], |
| + :is([estilo-bar~="stacked"], [estilo-bar]:has([estilo-bar-lead])) [estilo-bar-actions] { gap: 8px; } |
| + :is([estilo-bar-control] > a, [estilo-bar-control] > button, [estilo-bar-control] > form > button) { |
| + display: inline-flex; |
| + align-items: center; |
| + gap: 6px; |
| + box-sizing: border-box; |
| + block-size: 28px; |
| + min-block-size: 28px; |
| + min-inline-size: 28px; |
| + padding: 0 12px; |
| + border: 0; |
| + border-radius: 999px; |
| + background-color: transparent; |
| + box-shadow: inset 0 1px 0 light-dark(rgb(255 255 255 / 0.7), rgb(255 255 255 / 0.06)); |
| + color: var(--rst-text-muted); |
| + font: 600 13px/1 var(--rst-font); |
| + text-decoration: none; |
| + white-space: nowrap; |
| + } |
| + :is([estilo-bar-control] > a, [estilo-bar-control] > button, [estilo-bar-control] > form > button) svg { flex: none; inline-size: 15px; block-size: 15px; } |
| + :is([estilo-bar-control] > a, [estilo-bar-control] > button, [estilo-bar-control] > form > button):hover:not(:disabled) { |
| + background-color: var(--rst-surface-2); |
| + color: var(--rst-text); |
| + box-shadow: inset 0 1px 0 light-dark(rgb(255 255 255 / 0.8), rgb(255 255 255 / 0.08)), 0 1px 2px rgb(23 32 60 / 0.08); |
| + } |
| + /* A toggle whose region is shown takes the accent's tint. */ |
| + :is([estilo-bar-control] > a, [estilo-bar-control] > button, [estilo-bar-control] > form > button)[aria-expanded="true"] { |
| + background-color: var(--rst-accent-soft); |
| + color: var(--rst-accent); |
| + box-shadow: inset 0 1px 0 light-dark(rgb(255 255 255 / 0.8), rgb(255 255 255 / 0.08)), 0 1px 2px rgb(23 32 60 / 0.08); |
| + } |
| + /* The primary: the one filled pill, a fine highlight on its top edge |
| + and a shadow tinted with its own accent, 0 5px 12px -5px. */ |
| + :is([estilo-bar-control~="primary"] > a, [estilo-bar-control~="primary"] > button, [estilo-bar-control~="primary"] > form > button), |
| + :is([estilo-bar-control~="primary"] > a, [estilo-bar-control~="primary"] > button, [estilo-bar-control~="primary"] > form > button):hover:not(:disabled) { |
| + padding-inline: 14px; |
| + background-color: var(--rst-accent); |
| + color: var(--rst-on-accent); |
| + box-shadow: |
| + inset 0 1px 0 rgb(255 255 255 / 0.22), |
| + 0 1px 1px rgb(23 32 60 / 0.10), |
| + 0 5px 12px -5px light-dark(color-mix(in srgb, var(--rst-accent) 75%, transparent), color-mix(in srgb, var(--rst-accent) 25%, transparent)); |
| + } |
| + :is([estilo-bar-control~="primary"] > a, [estilo-bar-control~="primary"] > button, [estilo-bar-control~="primary"] > form > button):hover:not(:disabled) { |
| + background-color: var(--rst-accent-strong); |
| + } |
| + |
| + /* The account is its circle: no square box behind it on hover or |
| + open. The avatar darkens on hover and takes a 2px ring while its menu |
| + is open; with no initials the glyph's own circle does the same. */ |
| + :is([estilo-bar~="stacked"], [estilo-bar]:has([estilo-bar-lead])) [estilo-account] > [estilo-bar-trigger] { |
| + inline-size: 28px; |
| + min-inline-size: 0; |
| + block-size: 28px; |
| + padding: 0; |
| + border-radius: 50%; |
| + background: none; |
| + } |
| + :is([estilo-bar~="stacked"], [estilo-bar]:has([estilo-bar-lead])) [estilo-account] > [estilo-bar-trigger]:focus-visible { outline-offset: 2px; } |
| + :is([estilo-bar~="stacked"], [estilo-bar]:has([estilo-bar-lead])) [estilo-account] [estilo-avatar] { |
| + inline-size: 28px; |
| + block-size: 28px; |
| + font-size: 12px; |
| + box-shadow: inset 0 1px 0 light-dark(rgb(255 255 255 / 0.8), rgb(255 255 255 / 0.06)), 0 1px 2px rgb(23 32 60 / 0.08); |
| + transition: background-color 120ms ease, box-shadow 120ms ease; |
| + } |
| + :is([estilo-bar~="stacked"], [estilo-bar]:has([estilo-bar-lead])) [estilo-account] > [estilo-bar-trigger]:hover [estilo-avatar] { |
| + background: color-mix(in srgb, var(--rst-accent) 18%, var(--rst-surface)); |
| + } |
| + :is([estilo-bar~="stacked"], [estilo-bar]:has([estilo-bar-lead])) [estilo-account][open] [estilo-avatar], |
| + :is([estilo-bar~="stacked"], [estilo-bar]:has([estilo-bar-lead])) [estilo-account][open] > [estilo-bar-trigger]:not(:has([estilo-avatar])) { |
| + box-shadow: 0 0 0 2px var(--rst-surface), 0 0 0 4px color-mix(in srgb, var(--rst-accent) 45%, transparent); |
| + } |
| + :is([estilo-bar~="stacked"], [estilo-bar]:has([estilo-bar-lead])) [estilo-account] > [estilo-bar-trigger]:not(:has([estilo-avatar])):hover { |
| + background: var(--rst-surface-2); |
| + } |
| + |
| + /* The divider: a 20px hairline before the account, 12px either side |
| + (the set's 8px gap and 4px more, then 12px of padding), drawn as the |
| + account's own background so it takes no element. Only when something |
| + of the page's precedes it: never on a bar with no actions and no |
| + lead. Below 64rem a WideOnly action is hidden, so it does not count |
| + there. */ |
| + :is([estilo-bar~="stacked"], [estilo-bar]:has([estilo-bar-lead])) [estilo-bar-end]:has(> [estilo-bar-lead], > [estilo-bar-actions] > :not([estilo-bar-control~="wide"])) > [estilo-account] { |
| + margin-inline-start: 4px; |
| + padding-inline-start: 12px; |
| + background: linear-gradient(var(--rst-line), var(--rst-line)) left center / 1px 20px no-repeat; |
| + } |
| + :is([estilo-bar~="stacked"], [estilo-bar]:has([estilo-bar-lead])) [estilo-bar-end]:has(> [estilo-bar-lead], > [estilo-bar-actions] > :not([estilo-bar-control~="wide"])) > [estilo-account]:dir(rtl) { |
| + background-position: right center; |
| + } |
| + |
| + /* Coarse pointers: the header's controls rise to 32px. */ |
| + @media (pointer: coarse) { |
| + :is([estilo-bar-control] > a, [estilo-bar-control] > button, [estilo-bar-control] > form > button) { block-size: 32px; min-block-size: 32px; } |
| + :is([estilo-bar~="stacked"], [estilo-bar]:has([estilo-bar-lead])) [estilo-account] > [estilo-bar-trigger], |
| + :is([estilo-bar~="stacked"], [estilo-bar]:has([estilo-bar-lead])) [estilo-account] [estilo-avatar] { inline-size: 32px; block-size: 32px; } |
| + } |
| +} |
| +@media (min-width: 64rem) { |
| + :is([estilo-bar~="stacked"], [estilo-bar]:has([estilo-bar-lead])) [estilo-bar-end]:has(> [estilo-bar-actions]) > [estilo-account] { |
| + margin-inline-start: 4px; |
| + padding-inline-start: 12px; |
| + background: linear-gradient(var(--rst-line), var(--rst-line)) left center / 1px 20px no-repeat; |
| + } |
| + :is([estilo-bar~="stacked"], [estilo-bar]:has([estilo-bar-lead])) [estilo-bar-end]:has(> [estilo-bar-actions]) > [estilo-account]:dir(rtl) { |
| + background-position: right center; |
| + } |
| +} |
| +@media (prefers-reduced-motion: reduce) { |
| + :is([estilo-bar~="stacked"], [estilo-bar]:has([estilo-bar-lead])) [estilo-account] [estilo-avatar] { transition: none; } |
| +} |
| + |
| +/* Appearance, in every app's account menu: Light, Dark and System as |
| + three equal segments in one well, an icon over each word. The one in |
| + force is raised (the surface, a step lighter in dark, where the |
| + surface is barely off the well), bold, with its icon in the accent: |
| + raised and bold, so more than colour says which. aria-pressed is the |
| + state. chrome.js switches it in place. */ |
| +[estilo-appearance] { |
| + display: grid; |
| + grid-template-columns: repeat(3, minmax(0, 1fr)); |
| + gap: 2px; |
| + margin: 2px 6px 6px; |
| + padding: 3px; |
| + border-radius: 10px; |
| + background: var(--rst-surface-2); |
| + box-shadow: inset 0 1px 2px light-dark(rgb(23 32 60 / 0.06), rgb(0 0 0 / 0.25)); |
| +} |
| +[estilo-appearance] [estilo-menu-item] { |
| + flex-direction: column; |
| + justify-content: center; |
| + gap: 4px; |
| + min-block-size: 46px; |
| + padding: 6px 4px; |
| + border-radius: 8px; |
| + background: none; |
| + color: var(--rst-text-muted); |
| + font-size: 12px; |
| + text-align: center; |
| +} |
| +[estilo-appearance] [estilo-menu-label] { flex: none; max-inline-size: 100%; overflow-wrap: anywhere; } |
| +[estilo-appearance-icon] { display: inline-flex; flex: none; inline-size: 16px; block-size: 16px; } |
| +[estilo-appearance-icon] svg { inline-size: 100%; block-size: 100%; } |
| +[estilo-appearance] [estilo-menu-item]:hover:not([aria-pressed="true"]) { |
| + background: light-dark(rgb(255 255 255 / 0.5), rgb(255 255 255 / 0.04)); |
| + color: var(--rst-text); |
| +} |
| +[estilo-appearance] [estilo-menu-item][aria-pressed="true"] { |
| + background: light-dark(var(--rst-surface), #2f333d); |
| + color: var(--rst-text); |
| + font-weight: 600; |
| + box-shadow: |
| + inset 0 1px 0 light-dark(rgb(255 255 255 / 0.9), rgb(255 255 255 / 0.06)), |
| + 0 1px 2px rgb(23 32 60 / 0.12), |
| + 0 0 0 1px light-dark(rgb(23 32 60 / 0.06), rgb(255 255 255 / 0.06)); |
| +} |
| +[estilo-appearance] [estilo-menu-item][aria-pressed="true"] [estilo-appearance-icon] { color: var(--rst-accent); } |