Advertisement
soldier9599

deluminate.css mod

May 17th, 2014
451
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 1.95 KB | None | 0 0
  1. /* This is a modified deluminate.css for the Chrome extension Deluminate
  2. 0.3.2_0. It has been optimized to work with a total screen inverter such as
  3. NegativeScreen to allow you to view websites properly. There are several
  4. options which allow you to customize which items on a page are inverted.
  5.  
  6. This must be used with my other modded file, popup.html, in order to function
  7. properly. */
  8.  
  9. /* Uninvert the luminance for uninvert everything mode. */
  10. html[hc^="normal"] {
  11.   -webkit-filter: invert() hue-rotate(180deg) brightness(100%) contrast(100%);
  12. }
  13.  
  14. /* Override the above with a low-contrast version if selected. */
  15. html[hc^="delumine"][hc*="low-contrast"] {
  16.   -webkit-filter: contrast(85%);
  17. }
  18.  
  19. /* Uninvert select items within the document.
  20.  * Note: Chrome clears -webkit-filter on all full-screen ancestor tags, killing
  21.  * the top-level delumination filter. This is usually desirable (e.g., for
  22.  * Youtube videos), so instead of fighting it, just avoid trying to "uninvert"
  23.  * images in this scenario.
  24.  */
  25.  
  26. /* For the -noimg variant, uninvert all images. */
  27. html[hc*="delumine-noimg"]:not(*:-webkit-full-screen-ancestor) :-webkit-any(
  28. img,
  29. /* Check for "url" in the style attribute, which is usually a fancy way to specify an image */
  30. [style*="url"],
  31. canvas,
  32. embed,
  33. object,
  34. video) {
  35.   -webkit-filter: contrast(95%) brightness(95%) hue-rotate(180deg) invert();
  36. }
  37.  
  38. /* The "smart" filter is more selective about what to uninvert. */
  39. html[hc*="delumine-smart"]:not(*:-webkit-full-screen-ancestor) :-webkit-any(
  40.     /* Leave PNG and GIF format images inverted, since they usually are
  41.      * identifiable even when inverted. */
  42.     img:not([src$=".png"]):not([src$=".gif"]):not([src$=".PNG"]):not([src$=".GIF"]),
  43.     [style*=".jpg"],
  44.     [style*=".JPG"],
  45.     [style*=".jpeg"],
  46.     [style*=".JPEG"],
  47.     /* It's usually not desireable to invert these tags. */
  48.     canvas,
  49.     embed,
  50.     object,
  51.     video) {
  52.   -webkit-filter: contrast(95%) brightness(95%) hue-rotate(180deg) invert();
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement