mirror of
https://github.com/hanzoai/site.git
synced 2026-11-20 21:21:13 +00:00
- @hanzo/appearance 0.2.14: bootScript({ base: { theme: 'system' } }) in <head> (byte-identical to
the script in live hanzo.ai's HTML) replays localStorage hanzo.appearance.painted before the first
paint, else follows prefers-color-scheme; it sets light/t_light or dark/t_dark, color-scheme and
data-scheme. components/Appearance.jsx calls useAppearance({ install: { theme: 'system' } }) once
at the root (Hanzo's README), so the person's saved choice (hanzo.appearance, kept in Hanzo IAM)
wins over the device, and "system" follows the device live. No visible switch: live shows none.
- <html> is served as live serves it, class="t_dark" (the hard-coded "light t_light" is gone); React
never writes the classes, so hydration and navigation keep them.
- @hanzo/design 0.5.39 tokens/colors.css imported; every dark value of ours is now a reference to
Hanzo's token (--ink: var(--foreground), --bg: var(--background), --card: var(--muted), ... ),
under Hanzo's own :not(.light) selector, in globals.css, system.css and the shared light-dark()
greys and scrims. No colour of ours in dark; light values unchanged.
- react/react-dom 19.1.1 -> 19.2.8: @hanzo/appearance's peer range (>=19.2.8); Next 15.5.4 accepts it.
- docs/DARK-MODE.md rewritten for the package: how it works, how to test like live, the token map,
how a page chat converts its pages (darkcheck.mjs / lightcheck.mjs).
Measured: saved dark on a light device -> dark, saved light on a dark device -> light (survives a
device flip), nothing saved -> follows the device and flips live; right class at first paint and
after hydration, 0 page errors. Bright mode 0 computed-colour diffs vs 3c802582 on / /pricing /chat
/enso /models /about at 1470 and 375. / /pricing /chat in both modes at 1470x801 and 375x812:
0 console errors, no sideways scroll. Build exits 0 (HZ_LIVE_OFFLINE=1: hanzo.ai is blocked here).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01P5YBdxPteCvBL7f74SauJt
41 lines
3.2 KiB
CSS
41 lines
3.2 KiB
CSS
/* KeynoteOpen (Cloud 1 chat): see KeynoteOpen.jsx */
|
|
.kno-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: var(--kn-g, 24px); }
|
|
.kno-grid > li { display: flex; }
|
|
.kno-card { position: relative; flex: 1; display: flex; flex-direction: column; text-align: left; gap: 0; padding: 0; border: 1px solid var(--hair); background: var(--x-raised); color: var(--ink); cursor: pointer; overflow: hidden; font: inherit; transition: border-color .15s var(--e-out), scale .15s var(--e-out); }
|
|
.kno-card:active { scale: .97; transition-duration: 90ms; }
|
|
.kno-card:focus-visible { outline: 2px solid var(--focus, var(--ink)); outline-offset: 3px; }
|
|
.kno-art { position: relative; aspect-ratio: 4 / 3; background: light-dark(#f5f5f5, var(--muted)); overflow: hidden; }
|
|
.kno-art > * { width: 100%; height: 100%; }
|
|
.kno-art > * { transition: transform .8s var(--ease); }
|
|
@media (hover: hover) {
|
|
.kno-card:hover { border-color: rgba(0, 0, 0, .3); }
|
|
.kno-card:hover .kno-art > * { transform: scale(1.03); }
|
|
}
|
|
.kno-txt { display: flex; flex-direction: column; gap: 10px; padding: 24px 24px 28px; }
|
|
.kno-t { font-size: 21px; }
|
|
.kno-sub { font-size: 16px; line-height: 1.5; color: var(--soft); }
|
|
.kno-k { margin-top: 4px; }
|
|
.kno-plus { position: absolute; right: 16px; bottom: 16px; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--x-on-ink); display: grid; place-items: center; transition: transform .3s var(--e-move); }
|
|
|
|
.kno-layer { position: fixed; inset: 0; z-index: 950; display: grid; place-items: center; padding: clamp(16px, 4vw, 56px); }
|
|
.kno-back { position: absolute; inset: 0; background: rgba(0, 0, 0, .3); }
|
|
.kno-full { position: relative; width: min(100%, 1080px); max-height: calc(100svh - 64px); overflow: auto; overscroll-behavior: contain; background: var(--x-raised); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); box-shadow: 0 24px 60px -16px rgba(0, 0, 0, .18); }
|
|
.kno-art.big { aspect-ratio: auto; min-height: 100%; }
|
|
.kno-full-b { display: flex; flex-direction: column; gap: 20px; padding: clamp(28px, 4vw, 56px); }
|
|
.kno-full-b .kn-headline { font-size: 32px; }
|
|
.kno-body { display: flex; flex-direction: column; gap: 14px; }
|
|
.kno-body p, .kno-body li { margin: 0; font-size: 16px; line-height: 1.6; color: var(--body); }
|
|
.kno-body ul { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; }
|
|
.kno-cta { align-self: flex-start; margin-top: 8px; }
|
|
.kno-x { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--x-raised); color: var(--ink); display: grid; place-items: center; cursor: pointer; z-index: 2; }
|
|
.kno-x:focus-visible { outline: 2px solid var(--focus, var(--ink)); outline-offset: 2px; }
|
|
.kno-x:active { transform: scale(.94); }
|
|
|
|
@media (max-width: 900px) {
|
|
.kno-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
|
|
.kno-layer { padding: 0; place-items: end stretch; }
|
|
.kno-full { width: 100%; max-height: 92svh; grid-template-columns: minmax(0, 1fr); border-bottom-left-radius: 0 !important; border-bottom-right-radius: 0 !important; }
|
|
.kno-art.big { aspect-ratio: 16 / 10; min-height: 0; }
|
|
.kno-sub, .kno-body p, .kno-body li { font-size: 16px; }
|
|
}
|