mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 21:23:45 +01:00
* Fix dark-mode white flash when navigating between dashboard and library * Use userSettings object in layout-base.pug * Move initial theme styles in a new file * Sanitize data-initial-theme with a generic getInitialTheme helper * Add getInitialTheme stub GitOrigin-RevId: 80812093bbf75dc2a6f6f24710324a31a1930265
14 lines
498 B
SCSS
14 lines
498 B
SCSS
// Match body's background so the first paint isn't white in dark mode.
|
|
// Background only: color-scheme is set per container (e.g. .project-ds-nav-page)
|
|
[data-initial-theme='dark'] {
|
|
background-color: var(--bg-dark-primary);
|
|
}
|
|
|
|
[data-initial-theme='system'] {
|
|
// The 'system' theme is resolved client-side (useThemedPage), which also
|
|
// removes this attribute; until then, follow the OS preference.
|
|
@media (prefers-color-scheme: dark) {
|
|
background-color: var(--bg-dark-primary);
|
|
}
|
|
}
|