Skip to content

Instantly share code, notes, and snippets.

@GunGunGun
Forked from aaronice/smart-dark-mode.css
Created March 18, 2023 16:40
Show Gist options
  • Save GunGunGun/2c2282b3ab982b3946c3f54da8715bfd to your computer and use it in GitHub Desktop.
Save GunGunGun/2c2282b3ab982b3946c3f54da8715bfd to your computer and use it in GitHub Desktop.
CSS for Custom Smart Dark Mode
/*
Parts of this code is inspired from the following:
[1] https://userstyles.org/styles/105000/smart-dark
*/
html {
background-color: #222 !important;
}
body {
filter: contrast(90%) invert(90%) hue-rotate(180deg) !important;
-ms-filter: invert(100%);
-webkit-filter: contrast(90%) invert(90%) hue-rotate(180deg) !important;
text-rendering: optimizeSpeed;
image-rendering: optimizeSpeed;
-webkit-font-smoothing: antialiased;
-webkit-image-rendering: optimizeSpeed;
}
input, textarea, select {
color: purple;
}
img, video, iframe, canvas, svg, embed[type='application/x-shockwave-flash'], object[type='application/x-shockwave-flash'], *[style*='url('] {
filter: invert(100%) hue-rotate(-180deg) !important;
-ms-filter: invert(100%) !important;
-webkit-filter: invert(100%) hue-rotate(-180deg) !important;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment