Skip to content

Instantly share code, notes, and snippets.

@aaronice
Created January 11, 2018 01:18
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save aaronice/5c083b9a8a3cbee29c7cd6bf3c708233 to your computer and use it in GitHub Desktop.
Save aaronice/5c083b9a8a3cbee29c7cd6bf3c708233 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