Please, don't use CSS !important on background or text
-
I like using custom CSS stylesheets (via Stylus Add-on) to enforce dark theme across the world wide web.
html, #newtab-window {background: #020202 !important}
* {color: #ddd !important; background-color: transparent !important;}
img {opacity: .7 !important; transition: opacity .2s}
img:hover, a:hover img {opacity: 1 !important; background-color: #bbb !important}Surprisingly 90% of internet works quite well with this. But there are the occasional websites that force white background via !important. Example is What is difference of using string as hardcoded value vs string constant[^] with this style entry:
.container-entry {background-color: #fff !important;}
Please reserve !important only for your developers or end-users, but never in production. PS: Your the first website I decided to actually tell of such usage. Also I think dedicated "dark modes" is generally a waste. As those are still something you must explicitly look for and enable. Whereas end-user CSS customizations apply implicitly and globally.
-
I like using custom CSS stylesheets (via Stylus Add-on) to enforce dark theme across the world wide web.
html, #newtab-window {background: #020202 !important}
* {color: #ddd !important; background-color: transparent !important;}
img {opacity: .7 !important; transition: opacity .2s}
img:hover, a:hover img {opacity: 1 !important; background-color: #bbb !important}Surprisingly 90% of internet works quite well with this. But there are the occasional websites that force white background via !important. Example is What is difference of using string as hardcoded value vs string constant[^] with this style entry:
.container-entry {background-color: #fff !important;}
Please reserve !important only for your developers or end-users, but never in production. PS: Your the first website I decided to actually tell of such usage. Also I think dedicated "dark modes" is generally a waste. As those are still something you must explicitly look for and enable. Whereas end-user CSS customizations apply implicitly and globally.
I'm flattered we're the first! We're currently redoing our CSS from the ground up so things like this will be corrected. We may also add a Dark mode (to be decided). For me it's not a waste if there are specific colours we wish to use in a dark mode to ensure branding and display look good. It also saves people having to worry about their own custom styles. Plus, it's a CSS thing now (sorta).
cheers Chris Maunder