mirror of
https://github.com/standardebooks/web.git
synced 2025-07-15 10:56:46 -04:00
Add dark mode support for code snippets
Basically just darkening the background more.
This commit is contained in:
parent
879e8b9c49
commit
c4b278982c
1 changed files with 15 additions and 0 deletions
|
@ -1192,6 +1192,15 @@ code.css.full{
|
||||||
color: #fff !important; /* in case code highlighting fails */
|
color: #fff !important; /* in case code highlighting fails */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark){
|
||||||
|
figure code.html,
|
||||||
|
figure code.css,
|
||||||
|
code.html.full,
|
||||||
|
code.css.full{
|
||||||
|
background-color: var(--light-body-text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
code.full{
|
code.full{
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
color: #fff !important; /* in case code highlighting fails */
|
color: #fff !important; /* in case code highlighting fails */
|
||||||
|
@ -1232,6 +1241,12 @@ code.terminal{
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark){
|
||||||
|
code.terminal{
|
||||||
|
background-color: var(--light-body-text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
code.terminal::before{
|
code.terminal::before{
|
||||||
content: url('/images/terminal.svg');
|
content: url('/images/terminal.svg');
|
||||||
height: 1rem;
|
height: 1rem;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue