Skip to content

Instantly share code, notes, and snippets.

@theoparis
Last active April 20, 2021 20:28
Show Gist options
  • Save theoparis/2ccaa07516f1d462c58b7c0d48535c18 to your computer and use it in GitHub Desktop.
Save theoparis/2ccaa07516f1d462c58b7c0d48535c18 to your computer and use it in GitHub Desktop.
Dark mode for stylus
/* ==UserStyle==
@name Global Dark Mode
@namespace github.com/suterma/globaldarkmode
@homepageURL https://github.com/suterma/globaldarkmode
@version 1.0.7
@updateURL https://github.com/suterma/globaldarkmode/raw/master/global-dark-mode.chrome.user.css
@description A global dark mode, with a soft touch, to be easy on the eyes. (Uses specific structure for Google Chrome)
@author [email protected]
@license GNU-V3.0
==/UserStyle== */
/* Style in the mozilla format, usable with e.g. the stylus browser extension*/
/*//TODO experimental*/
/* Hint: This specific style is crafted for Google Chrome, as it handles some
things different than other browsers */
/*--------------------------------------------------------------------------
* A global black background to replace the typical white canvas of webpages.
* Chrome: Use the difference mode right here, to avoid using it on the body
*--------------------------------------------------------------------------*/
html {
background: black;
mix-blend-mode: difference;
}
/*--------------------------------------------------------------------------
* Defines the whithe body to render the difference onto.
* Can not hold the mix-blend-mode property together with the background color.
*--------------------------------------------------------------------------*/
body {
background: black;
color: white;
}
select {
background: gray;
color: white;
}
#enabled {
background: gray;
color: white;
}
input {
background: gray;
color: white;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment