/* An image with a light and a dark version renders both, marked only-light
   and only-dark, and the one that does not match the page's theme is hidden.
   The rules hide and never show, so the image keeps whatever display its own
   styles give it. An image with one version carries neither class. */
@media not (prefers-color-scheme: dark) {
  :root:not([data-theme="dark"]) .only-dark { display: none !important; }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .only-light { display: none !important; }
}

:root[data-theme="light"] .only-dark { display: none !important; }
:root[data-theme="dark"] .only-light { display: none !important; }
