Files
hyperframes/packages/studio/src/styles/studio.css
T
Mu-Tsun Tsai bb2e64ced1 fix(studio): pin user-agent color scheme to dark (#482)
The studio shell paints a #0a0a0a body but never declares `color-scheme`,
so browsers render native UA chrome (scrollbars, form controls, focus
rings) in the light palette and the mismatch is obvious — especially
scrollbars, which appear as light tracks sitting on top of a near-black
panel.

Studio doesn't expose a theme toggle; the UI is dark-only. Declaring
`color-scheme: dark` on `:root` lines up the browser-native surfaces
with the rest of the chrome.
2026-04-25 06:12:06 +02:00

52 lines
1.3 KiB
CSS

@tailwind base;
@tailwind components;
@tailwind utilities;
/*
* Studio is a dark-only UI — pin the user-agent color scheme to dark so that
* browser-native chrome (scrollbars, form controls, focus rings) picks the
* matching palette instead of defaulting to light against our #0a0a0a body.
*/
:root {
color-scheme: dark;
}
body {
margin: 0;
padding: 0;
background: #0a0a0a;
color: #e5e5e5;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
overflow: hidden;
}
#root {
width: 100vw;
/*
* 100vh on iOS Safari measures the LARGEST viewport (toolbars hidden) and
* stays fixed at that value, so when the toolbar is visible the bottom of
* the layout sits *under* it and anything at flex-end — the player
* controls row, notably — becomes untappable. `100dvh` follows the
* dynamic viewport, shrinking when the toolbar is shown so the bottom of
* #root lines up with the bottom of the visible area. Fallback to 100vh
* keeps older browsers (pre-Safari 15.4 / Firefox 101 / Chrome 108) on
* the existing behaviour.
*/
height: 100vh;
height: 100dvh;
}
/* CodeMirror overrides */
.cm-editor {
height: 100%;
font-size: 13px;
}
.cm-editor .cm-scroller {
font-family: "JetBrains Mono", "Fira Code", "SF Mono", monospace;
}
.cm-editor.cm-focused {
outline: none;
}