mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
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:
parent
60b8ab8703
commit
d8d734d306
@ -416,7 +416,8 @@ kbd {
|
||||
}
|
||||
|
||||
// Hide images for dark mode
|
||||
img[src$="#only-dark"] {
|
||||
img[src$="#only-dark"],
|
||||
img[src$="#gh-dark-mode-only"] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
@ -97,12 +97,14 @@
|
||||
}
|
||||
|
||||
// Hide images for light mode
|
||||
img[src$="#only-light"] {
|
||||
img[src$="#only-light"],
|
||||
img[src$="#gh-light-mode-only"] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
// Show images for dark mode
|
||||
img[src$="#only-dark"] {
|
||||
img[src$="#only-dark"],
|
||||
img[src$="#gh-dark-mode-only"] {
|
||||
display: initial;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user