Bento, the office suite that fits in a file
TypeScript mit-licenseofficeoffice-365office-suiteoffice-toolsoffice365open-sourcepowerpointself-hostedsingle-page-appslidesslideshareslideshowslideshow-galleryslideshow-makerslideshows
/* SPDX-License-Identifier: MIT
Copyright (c) 2026 The Bento authors
The two dialogs — About this workbook, and Settings — which are one visual
surface with two contents (dialog.ts builds the chrome, and says why the
eight-section original had to become two). Separate from styles.css because
it is a whole surface nothing else shares — but the same tokens, so it
inherits a theme change.
Vite concatenates every imported stylesheet into ONE <style> in head, which
is what postbuild-compress deflates (it takes the first <style> in head and
would leave a second one as plaintext). So this file must be IMPORTED, never
linked, and nothing here may depend on landing after styles.css in the
cascade — order follows the module graph, not intent.
Which is exactly why the shared radii/shadows/type sizes are CUSTOM
PROPERTIES and not a base rule some file overrides: a var() resolves where
it is used, so --radius-xl means the same thing here whether this file lands
before or after the one that declares it. */
.dx-about-back {
position: fixed;
inset: 0;
z-index: 10000; /* above .dx-pop (9999): a popover left open must not sit on top */
background: var(--scrim);
display: flex;
align-items: flex-start;
justify-content: center;
/* 4vh, not 5: the dialogs are sized to fit a laptop screen WITHOUT scrolling
(scripts/test-dash-surfaces.ts measures it), and 10vh of backdrop was the
largest single thing standing between the taller of them and that. */
padding: 4vh 16px;
overflow: auto;
overscroll-behavior: contain;
}
.dx-about {
background: var(--surface);
color: var(--ink);
border-radius: var(--radius-xl);
box-shadow: var(--shadow-dialog);
padding: 18px 20px 16px;
width: min(560px, 100%);
/* the notch, same rule as the top bar: the app pads its own chrome */
margin-bottom: max(12px, env(safe-area-inset-bottom));
}
.dx-about h2 {
font-size: var(--fs-micro);
font-weight: 650;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--muted);
/* 16/6, not 20/8. Eight sections in one dialog made these margins 200px of
the 1361px it measured; two dialogs of four sections each can afford to
breathe less between them and still fit a laptop screen without scrolling,
which is the whole point of the split. */
margin: 14px 0 6px;
}
.dx-about h2:first-child { margin-top: 0; }
.dx-about-lede { margin: 0 0 8px; }
.dx-about-lede b { font-weight: 650; }
.dx-about-note {
color: var(--muted);
font-size: var(--fs-small);
line-height: 1.5;
margin: 5px 0 0;
}
.dx-about-row {
display: flex;
align-items: center;
gap: 10px;
padding: 2px 0;
font-size: var(--fs-ui);
}
.dx-about-row > span:first-child {
flex: 0 0 8.5rem;
color: var(--muted);
}
.dx-about-row > :last-child { flex: 1 1 auto; min-width: 0; }
.dx-about-val {
font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
overflow-wrap: anywhere;
}
/* The look is THE FIELD (styles.css); a context rule only sizes. */
.dx-about-in,
.dx-about select { width: 100%; }
.dx-about-in[disabled] { color: var(--muted); }
.dx-about-actions {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-top: 6px;
}
/* The look is THE FIELD (styles.css); this sizes it and sets the monospace
face, because it holds JSON. */
.dx-about-paste {
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
width: 100%;
min-height: 9rem;
margin-top: 8px;
}
.dx-about-vers {
display: flex;
flex-direction: column;
gap: 2px;
/* 5.5rem ≈ three entries, and it SCROLLS inside its own box. 30vh let a long
timeline push the surface past one screen on its own — a list is the one
thing that can be given a window instead of the page. */
max-height: 5.5rem;
overflow: auto;
border: 1px solid var(--line);
border-radius: var(--radius);
padding: 4px;
}
.dx-about-ver {
font: inherit;
font-size: var(--fs-ui);
display: flex;
gap: 10px;
align-items: baseline;
text-align: left;
border: 0;
background: transparent;
color: inherit;
border-radius: var(--radius);
padding: 5px 8px;
cursor: pointer;
}
.dx-about-ver:hover { background: var(--hover); }
.dx-about-ver span:first-child { flex: 1 1 auto; font-variant-numeric: tabular-nums; }
.dx-about-ver span:last-child { color: var(--accent); }
/* The footer: the way ACROSS (About ⇄ Settings) beside the way out. A rule
above it, because it is the only part of either dialog that is not about the
section it follows. */
.dx-about-foot {
margin-top: 14px;
padding-top: 10px;
border-top: 1px solid var(--line);
}
/* The two viewer switches (launch check, Offline mode). A label wrapping its
own box, so the text is part of the hit target. */
.dx-about-check {
display: flex;
align-items: center;
gap: 8px;
margin: 8px 0 0;
cursor: pointer;
user-select: none;
}
.dx-about-check input { accent-color: var(--accent); margin: 0; flex: 0 0 auto; }
/* An update was found at launch. The badge sits on the ways INTO About — the
ⓘ button and the version chip — because an update is never urgent enough to
interrupt: the file works forever exactly as it is. The button carries the
dot as well as the chip, since styles.css hides the chip under 1040px. */
.dx-update-badge { position: relative; color: var(--accent); }
.dx-update-badge::after {
content: '';
position: absolute;
top: 2px;
inset-inline-end: 2px;
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--accent);
}
/* The wordmark and the version chip are the way in — say so on hover, since
neither looks like a control. */
.dx-mark[data-about], .dx-ver[data-about] { cursor: pointer; }
.dx-mark[data-about]:hover, .dx-ver[data-about]:hover { color: var(--accent); }
/* --accent-ink, like every other focus ring in the app (slides' ring). Not the
bright --accent: that amber is 2.02:1 on white and misses SC 1.4.11's 3:1;
the dark amber passes. See .dx-btn:focus-visible in styles.css. */
.dx-mark[data-about]:focus-visible, .dx-ver[data-about]:focus-visible {
outline: 2px solid var(--accent-ink);
outline-offset: 2px;
border-radius: 4px;
}