opencd/templates/demo.css
Colonel John Hannibal Smith fa427d4a9e
ba: production fixes — calc() wraps, side spine grid, disc-art tokens, back-tray overflow
(1) All <style> blocks already removed by Murdock — verified zero across all 3 templates.
(2) CSS reset already comprehensive (8 rules) — applied globally via opencd.css.
(3) Jewel-case width: wrapped 100%%-2rem in calc() for proper min() parsing in all browsers.
(4) Back-tray fix: spines no longer overlap — left spine grid-column:1, right spine grid-column:3 via :first-child/:last-child. demo-tray-container overflow-y:auto so scrollbar visible. 280x236 CD dims correct.
(5) Leaflet width: wrapped calc() same as jewel-case.
(6) .cd-spine--side: class now defined (inherits vertical-rl from .cd-spine). Back-tray grid explicitly positions side spines.
(7) Token consistency: disc-art section converted from raw var(--gray-*) to 7 new --cd-disc-surface-* tokens. Zero raw OpenProps remain outside :root definitions in opencd.css.
2026-05-26 00:47:48 +02:00

116 lines
No EOL
2.2 KiB
CSS

/* OpenCD — Demo page chrome (not framework component CSS)
Shared by jewel-case.html, back-tray.html, leaflet.html
All --cd-* tokens defined in opencd.css */
/* ── Shared demo layout ── */
body {
min-height: 100dvh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 2rem;
padding: 2rem;
background: oklch(92% .012 85);
font-family: var(--cd-font-label);
}
.demo-controls {
display: flex;
gap: 1rem;
align-items: center;
font-size: .875rem;
}
.demo-controls label {
display: flex;
align-items: center;
gap: .5rem;
cursor: pointer;
user-select: none;
}
.demo-controls input[type="checkbox"] {
accent-color: var(--cd-advisory-red);
}
.demo-controls select {
padding: .25rem .5rem;
border: 1px solid var(--cd-text-muted);
border-radius: var(--cd-jewel-radius);
font-family: inherit;
}
.demo-footnote {
font-size: .75rem;
color: var(--cd-text-muted);
text-align: center;
max-width: 480px;
line-height: 1.5;
}
/* ── Back-tray demo wrapper ── */
.demo-tray-container {
width: var(--cd-jewel-width);
max-height: var(--cd-tray-height);
border-radius: var(--cd-jewel-radius);
box-shadow: var(--cd-jewel-shadow);
overflow-y: auto;
}
/* ── Leaflet-specific demo overrides ── */
.demo-controls {
flex-wrap: wrap;
}
.demo-controls button {
padding: .5rem 1rem;
border: 1px solid var(--cd-text-muted);
border-radius: var(--cd-jewel-radius);
background: var(--cd-surface-0);
font-family: inherit;
cursor: pointer;
transition: background var(--cd-transition-duration);
}
.demo-controls button:hover {
background: var(--cd-grid-color);
}
.demo-controls button:disabled {
opacity: .4;
cursor: not-allowed;
}
.demo-controls .page-indicator {
font-family: var(--cd-font-mono);
font-size: .875rem;
color: var(--cd-text-muted);
min-width: 8ch;
text-align: center;
}
.leaflet-content--multi {
max-width: calc(var(--cd-leaflet-size) + var(--cd-space-inset) * 2);
}
.leaflet-pages {
display: flex;
gap: var(--cd-space-stack);
flex-direction: column;
position: relative;
}
.leaflet-pages .leaflet-page {
display: none;
}
.leaflet-pages .leaflet-page[data-leaflet-active="true"] {
display: flex;
}