[qb-domain$="xkcd.com"] {
  body {
    background: #161616 !important;
    color: #fafafa !important;
  }

  img,
  div[class="self"] {
    filter: hue-rotate(180deg) invert(100%) !important;
    -webkit-filter: hue-rotate(180deg) invert(100%) !important;
  }

  /*Exceptions*/
  img[alt="Stargazing"],
  img[alt="Flashlights"],
  img[alt="Google Maps"],
  img[alt="Alternative Energy Revolution"],
  img[alt="Man Page"] {
    filter: invert(0%) !important;
    -webkit-filter: invert(0%) !important;
  }

  .box {
    background: #000 !important;
  }

  #topLeft a {
    color: #cccccc !important;
  }

  ul.comicNav li a {
    background: transparent linear-gradient(#3c3c3c, #2e2e2e) repeat scroll 0% 0% !important;
  }
}

[qb-domain="imgs.xkcd.com"] {
  img {
    filter: hue-rotate(180deg) invert(100%) !important;
    -webkit-filter: hue-rotate(180deg) invert(100%) !important;
  }

  /*Exceptions*/
  img[alt="https://imgs.xkcd.com/comics/stargazing.png"],
  img[alt="https://imgs.xkcd.com/comics/flashlights.png"],
  img[alt="https://imgs.xkcd.com/comics/google_maps.png"],
  img[alt="https://imgs.xkcd.com/comics/alternative_energy_revolution.jpg"],
  img[alt="https://imgs.xkcd.com/comics/man_page.png"] {
    filter: invert(0%) !important;
    -webkit-filter: invert(0%) !important;
  }
}

[qb-domain="m-xkcd.com"] {
  body {
    background: #161616 !important;
  }

  #title {
    color: #fafafa !important;
  }

  #altTextLink {
    color: #cccccc !important;
  }

  #news {
    color: #fafafa !important;
  }

  ul#footerLinks li a {
    background: transparent linear-gradient(#3c3c3c, #2e2e2e) repeat scroll 0% 0% !important;
  }

  #altText {
    background: #131313 !important;
    color: #fafafa !important;
  }

  img {
    filter: hue-rotate(180deg) invert(100%) !important;
    -webkit-filter: hue-rotate(180deg) invert(100%) !important;
  }

  /*Exceptions*/
  img[alt="Stargazing"],
  img[alt="Flashlights"],
  img[alt="Google Maps"],
  img[alt="Alternative Energy Revolution"],
  img[alt="Man Page"] {
    filter: invert(0%) !important;
    -webkit-filter: invert(0%) !important;
  }
}
