You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
themes: scope injected CSS under #aether-root (no global html/body leakage) #37
themes: scope injected CSS under #aether-root (no global html/body leakage)
Context
frontend/src/stores/theme.ts:19-28 injects one global <style id="aether-theme-overwrite"> via appendChild after base styles. frontend/src/style.css:1-20 tokens are global, but Sidebar.svelte:189-352, TitleBar.svelte:61-118, App.svelte:189-238 use scoped <style> (compiled to .sidebar.svelte-xxxxx). Plain global .sidebar {…} has lower specificity than scoped 0,2,0.
Problem
SanitizeCSS does no scoping — html {pointer-events:none} or * {position:fixed} hits the whole app.
Themes targeting .sidebar, .card, .btn-primary rely on grepping source; those classes are not a stable API (docs/STYLEGUIDE.md lists philosophy, not class inventory).
Fix
Wrap app chrome in <div id="aether-root" class="app-container"> (frontend/src/App.svelte:140).
In pkg/theme/protected.go:111sanitizeRules, rewrite each kept selector: split by , → prefix with #aether-root unless already scoped. Keep @media/@supports recursion.
Document: themes must target #aether-root / [data-aether]; bare html/body/#app becomes no-op (already blocked for pointer-events:none).
Activity