feat(web): add the calm redesign as a sidebar switch
The redesign proposed after the anti-slop audit (anti-slop/audit-001) is now an opt-in design layer. The "New design" switch at the bottom of the sidebar sets data-design="calm" on <html> and remembers it; theme-init.js applies the stored choice before the first paint. The classic look stays the default and is unchanged. styles/calm.css, scoped to that attribute, keeps the Hive DS colors and: bundles Hanken Grotesk and JetBrains Mono (@fontsource-variable, OFL-1.1); uses three radii (6 / 10 / 14 px); drops the honeycomb wallpaper, gradient fills, glass, glows and pulsing dots; keeps shadows only on menus and dialogs; shows labels as written instead of tracked capitals; and marks the active sidebar item with fill, a 1px line and weight instead of a stripe. Screen layouts are unchanged.
This commit is contained in:
141
apps/web/src/styles/calm.css
Normal file
141
apps/web/src/styles/calm.css
Normal file
@@ -0,0 +1,141 @@
|
||||
/*
|
||||
* Calm design — the redesign proposal from the anti-slop audit
|
||||
* (anti-slop/audit-001-2026-10-14.md). Opt-in through data-design="calm" on
|
||||
* <html>: the sidebar switch sets it (src/lib/design-mode.ts) and
|
||||
* public/theme-init.js applies it before the first paint. Every rule is scoped
|
||||
* to that attribute, so the classic look is untouched.
|
||||
*
|
||||
* Same Hive DS colors in both themes. What changes: bundled Hanken Grotesk and
|
||||
* JetBrains Mono, three radii (6 / 10 / 14 px), flat surfaces with 1px lines,
|
||||
* a shadow only on menus and dialogs, and no glass, glow, honeycomb texture,
|
||||
* pulsing dots or tracked capitals.
|
||||
*/
|
||||
|
||||
:root[data-design="calm"] {
|
||||
--sans: 'Hanken Grotesk Variable', 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
||||
--mono: 'JetBrains Mono Variable', 'JetBrains Mono', ui-monospace, monospace;
|
||||
--font-sans: var(--sans);
|
||||
--font-mono: var(--mono);
|
||||
--radius: 10px;
|
||||
--r-xl: 14px;
|
||||
--shadow-card: none;
|
||||
--shadow-elevated: none;
|
||||
--shadow-sm: none;
|
||||
--shadow-honey: none;
|
||||
--shadow-honey-bloom: none;
|
||||
--honey-glow: transparent;
|
||||
}
|
||||
|
||||
/* ── Type ─────────────────────────────────────────────────────────────── */
|
||||
|
||||
:root[data-design="calm"] :is(body, .font-sans, .font-display) {
|
||||
font-family: var(--sans);
|
||||
}
|
||||
|
||||
:root[data-design="calm"] :is(.font-mono, code, kbd, pre, samp) {
|
||||
font-family: var(--mono);
|
||||
}
|
||||
|
||||
/* Labels read as written instead of tracked capitals. */
|
||||
:root[data-design="calm"] .uppercase {
|
||||
text-transform: none;
|
||||
letter-spacing: normal;
|
||||
}
|
||||
|
||||
/* ── Radii: 6 for controls, 10 for cards, 14 for windows ──────────────── */
|
||||
|
||||
:root[data-design="calm"] :is(.rounded-sm, .rounded-md) {
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
:root[data-design="calm"] :is(.rounded-lg, .rounded-xl) {
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
:root[data-design="calm"] :is(.rounded-2xl, .rounded-3xl) {
|
||||
border-radius: 14px;
|
||||
}
|
||||
|
||||
/* ── Depth: flat surfaces; only menus and dialogs float ───────────────── */
|
||||
|
||||
:root[data-design="calm"] :is(.shadow-sm, .shadow, .shadow-md, .shadow-lg, .shadow-xl, .shadow-2xl):not(
|
||||
[role="dialog"], [role="alertdialog"], [role="menu"], [role="listbox"], [data-radix-popper-content-wrapper] *
|
||||
) {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
:root[data-design="calm"] :is(.glass, .glass-strong) {
|
||||
background: var(--surface);
|
||||
}
|
||||
|
||||
:root[data-design="calm"] :is(.glass, .glass-strong, [class*="backdrop-blur"]) {
|
||||
backdrop-filter: none;
|
||||
-webkit-backdrop-filter: none;
|
||||
}
|
||||
|
||||
/* ── No glow, texture or idle motion ──────────────────────────────────── */
|
||||
|
||||
:root[data-design="calm"] .glow-primary {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
:root[data-design="calm"] .text-glow {
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
:root[data-design="calm"] :is(.comb, .honeycomb-bg) {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
:root[data-design="calm"] [data-testid="ambient-hive-glow"] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* A status dot shows a state; it does not pulse. Loading skeletons keep
|
||||
animate-pulse, since they mark real loading. */
|
||||
:root[data-design="calm"] :is(.animate-ping, .honey-pulse, .glow-breathe, .hive-ambient-breath) {
|
||||
animation: none;
|
||||
}
|
||||
|
||||
/* ── Sidebar: active item by fill, 1px line and weight, no stripe ─────── */
|
||||
|
||||
:root[data-design="calm"] .waggle-sidebar .nav-active-stripe {
|
||||
display: none;
|
||||
}
|
||||
|
||||
:root[data-design="calm"] .waggle-sidebar [aria-current="page"] {
|
||||
background: var(--surface);
|
||||
box-shadow: inset 0 0 0 1px var(--line);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
:root[data-design="calm"] .waggle-sidebar [aria-current="page"] svg {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
/* ── Surfaces: a plain backdrop and flat cards ─────────────────────────── */
|
||||
|
||||
:root[data-design="calm"] body {
|
||||
background-color: var(--bg);
|
||||
}
|
||||
|
||||
:root[data-design="calm"] :is(.desktop-wallpaper, .desktop-overlay) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
:root[data-design="calm"] [class*="bg-[linear-gradient"]:not(.hex) {
|
||||
background: var(--surface);
|
||||
border-color: var(--line);
|
||||
}
|
||||
|
||||
/* Decorative glows sit behind content and never take pointer events. */
|
||||
:root[data-design="calm"] [class*="bg-[radial-gradient"].pointer-events-none {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* The hexagon stays as the workspace and agent mark, in a neutral fill. Agent
|
||||
colors arrive as inline styles, hence !important. */
|
||||
:root[data-design="calm"] .hex:is([class*="gradient"], [style*="gradient"]) {
|
||||
background: var(--surface-2) !important;
|
||||
color: var(--text) !important;
|
||||
}
|
||||
Reference in New Issue
Block a user