Added support for GitHub-style hash fragments for dark/light images (#3857)

* feat(images): github dark mode images

closes #3856

* refactor: conbine styles
This commit is contained in:
Michael Brewer
2022-04-29 10:05:19 -07:00
committed by GitHub
parent 60b8ab8703
commit d8d734d306
2 changed files with 6 additions and 3 deletions

View File

@@ -416,7 +416,8 @@ kbd {
} }
// Hide images for dark mode // Hide images for dark mode
img[src$="#only-dark"] { img[src$="#only-dark"],
img[src$="#gh-dark-mode-only"] {
display: none; display: none;
} }

View File

@@ -97,12 +97,14 @@
} }
// Hide images for light mode // Hide images for light mode
img[src$="#only-light"] { img[src$="#only-light"],
img[src$="#gh-light-mode-only"] {
display: none; display: none;
} }
// Show images for dark mode // Show images for dark mode
img[src$="#only-dark"] { img[src$="#only-dark"],
img[src$="#gh-dark-mode-only"] {
display: initial; display: initial;
} }
} }