Add support for GitHub-styled color scheme dependent images (#617)

This commit is contained in:
Ryan Cao 2022-08-24 10:38:22 +08:00 committed by GitHub
parent 8a53fa0aab
commit 59bb132dd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -184,6 +184,14 @@
height: auto; height: auto;
} }
html:not(.dark-mode, .oled-mode) & img[src$='#gh-dark-mode-only'] {
display: none;
}
html:is(.dark-mode, .oled-mode) & img[src$='#gh-light-mode-only'] {
display: none;
}
pre { pre {
margin-top: 1rem; margin-top: 1rem;
padding: 14px; padding: 14px;