diff --git a/style.css b/style.css index 9f2fc46..9755374 100644 --- a/style.css +++ b/style.css @@ -69,12 +69,14 @@ --err: 209, 41, 41; --focus: 255, 174, 12; --mono: "Iosevka", ui-monospace, monospace; + background: rgb(var(--bg)); + color: rgb(var(--fg)); } -body.regex { +:root:has(> body.regex) { --bg: 224, 242, 240; --checked: 12, 147, 129; } -body.rhyme { +:root:has(> body.rhyme) { --bg: 236, 230, 245; --checked: 113, 44, 232; } @@ -83,8 +85,6 @@ body { margin: 0 auto; max-width: 600px; padding: 8px; - background: rgb(var(--bg)); - color: rgb(var(--fg)); line-height: 1.4; word-break: break-word; } @@ -341,10 +341,10 @@ h2 { --link: 153, 204, 255; --err: 255, 153, 153; } -:root.dark body.regex { +:root.dark:has(> body.regex) { --bg: 3, 23, 20; } -:root.dark body.rhyme { +:root.dark:has(> body.rhyme) { --bg: 22, 10, 36; --checked: 143, 72, 224; }