From 95f71115d40d51584c48d9127027793b070fa58b Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Sun, 20 Aug 2023 12:17:11 +0800 Subject: [PATCH] First attempt of CSS nesting This'll be "un-nested" by PostCSS anyway --- src/cloak-mode.css | 59 ++++++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 28 deletions(-) diff --git a/src/cloak-mode.css b/src/cloak-mode.css index ee68dd1f..d703b7a9 100644 --- a/src/cloak-mode.css +++ b/src/cloak-mode.css @@ -1,33 +1,36 @@ -body.cloak a { - text-decoration-color: var(--link-color); -} +body.cloak, +.cloak { + a { + text-decoration-color: var(--link-color); + } -body.cloak .name-text, -body.cloak .name-text *, -body.cloak .status .content-container, -body.cloak .status .content-container *, -body.cloak .status .content-compact, -body.cloak .account-container :is(header, main > *:not(.actions)), -body.cloak .account-container :is(header, main > *:not(.actions)) *, -body.cloak .header-account, -body.cloak .account-block { - text-decoration-thickness: 1.1em; - text-decoration-line: line-through; - text-rendering: optimizeSpeed; - filter: opacity(0.5); -} -body.cloak .name-text *, -body.cloak .status .content-container *, -body.cloak .account-container :is(header, main > *:not(.actions)) * { - filter: none; -} + .name-text, + .name-text *, + .status .content-container, + .status .content-container *, + .status .content-compact, + .account-container :is(header, main > *:not(.actions)), + .account-container :is(header, main > *:not(.actions)) *, + .header-account, + .account-block { + text-decoration-thickness: 1.1em; + text-decoration-line: line-through; + text-rendering: optimizeSpeed; + filter: opacity(0.5); + } + .name-text *, + .status .content-container *, + .account-container :is(header, main > *:not(.actions)) * { + filter: none; + } -body.cloak .status :is(img, video, audio), -body.cloak .avatar, -body.cloak .emoji, -body.cloak .header-banner { - filter: contrast(0) !important; - background-color: #000 !important; + .status :is(img, video, audio), + .avatar, + .emoji, + .header-banner { + filter: contrast(0) !important; + background-color: #000 !important; + } } /* SPECIAL CASES */