From 70b7f7bf2672718ac92568889973d617ed2850f7 Mon Sep 17 00:00:00 2001 From: HelloRusk Date: Fri, 21 Oct 2022 12:36:29 +0900 Subject: force darkmode system by setting parameter regardless of OS appearance system --- static/css/darkmode.css | 162 ++++++++++++++++++++++++------------------------ 1 file changed, 80 insertions(+), 82 deletions(-) diff --git a/static/css/darkmode.css b/static/css/darkmode.css index 6426704..30288a1 100644 --- a/static/css/darkmode.css +++ b/static/css/darkmode.css @@ -1,93 +1,91 @@ -@media (prefers-color-scheme: dark) { - html, body { - color: #dcdcdc; - background-color: #292929; - } +html, body { + color: #dcdcdc; + background-color: #292929; +} - html *:not(input) *:not(span) { - color: #dcdcdc !important; - } +html *:not(input) *:not(span) { + color: #dcdcdc !important; +} - a[ping]:link, - :link:not(cite) { - color: #8db2e5 !important; - } +a[ping]:link, +:link:not(cite) { + color: #8db2e5 !important; +} - html a:visited { - color: #d248ea !important; - } +html a:visited { + color: #d248ea !important; +} - html cite, - html cite a:link, - html cite a:visited { - color: #92de92 !important; - } +html cite, +html cite a:link, +html cite a:visited { + color: #92de92 !important; +} - /* inline styles */ - [style*='background: #'], [style*='background:#'], - [style*='background: rgb'], [style*='background:rgb'], - [style*='background: var('], [style*='background:var('], - [style*='background-color: #'], [style*='background-color:#'], - [style*='background-color: rgb'], [style*='background-color:rgb'], - [style*='background-color: var('], [style*='background-color:var('] { - background-color: #292929 !important; - } +/* inline styles */ +[style*='background: #'], [style*='background:#'], +[style*='background: rgb'], [style*='background:rgb'], +[style*='background: var('], [style*='background:var('], +[style*='background-color: #'], [style*='background-color:#'], +[style*='background-color: rgb'], [style*='background-color:rgb'], +[style*='background-color: var('], [style*='background-color:var('] { + background-color: #292929 !important; +} - pre { - margin: 0; - background: #414040 !important; - } - pre code { - font-size: 95%; - position: relative; - } +pre { + margin: 0; + background: #414040 !important; +} +pre code { + font-size: 95%; + position: relative; +} - /* Better tables */ - table { - border-collapse: collapse; - border-spacing: 0; - width: auto; - max-width: 100%; - border-top: 2.27px solid white; - border-bottom: 2.27px solid white; - /* display: block; */ - overflow-x: auto; /* does not work because element is not block */ - /* white-space: nowrap; */ - counter-increment: caption; - } - /* add bottom border on column table headings */ - table tr > th[scope='col'] { - border-bottom: 1.36px solid white; - } - /* add right border on row table headings */ - table tr > th[scope='row'] { - border-right: 1.36px solid white; - } - table > tbody > tr:first-child > td, - table > tbody > tr:first-child > th { - border-top: 1.36px solid white; - } - table > tbody > tr:last-child > td, - table > tbody > tr:last-child > th { - border-bottom: 1.36px solid white; - } +/* Better tables */ +table { + border-collapse: collapse; + border-spacing: 0; + width: auto; + max-width: 100%; + border-top: 2.27px solid white; + border-bottom: 2.27px solid white; + /* display: block; */ + overflow-x: auto; /* does not work because element is not block */ + /* white-space: nowrap; */ + counter-increment: caption; +} +/* add bottom border on column table headings */ +table tr > th[scope='col'] { + border-bottom: 1.36px solid white; +} +/* add right border on row table headings */ +table tr > th[scope='row'] { + border-right: 1.36px solid white; +} +table > tbody > tr:first-child > td, +table > tbody > tr:first-child > th { + border-top: 1.36px solid white; +} +table > tbody > tr:last-child > td, +table > tbody > tr:last-child > th { + border-bottom: 1.36px solid white; +} - /* frame of the code block */ - div.highlight { - border: 1px solid; - border-radius: 4px; - } +/* frame of the code block */ +div.highlight { + border: 1px solid; + border-radius: 4px; +} - /* Styles for inline code or code snippets */ - kbd { - background: #292929; - border: 1px solid hsl(210, 5%, 70%); - border-radius: 2px; - padding: 2px 4px; - font-size: 75%; - } +/* Styles for inline code or code snippets */ +kbd { + background: #292929; + border: 1px solid hsl(210, 5%, 70%); + border-radius: 2px; + padding: 2px 4px; + font-size: 75%; +} - mark { - background-color: rgb(97, 96, 96) !important; - } +mark { + background-color: rgb(97, 96, 96) !important; } -- cgit v1.2.3