feat(css): add prefers-color-scheme

https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme
This commit is contained in:
curben 2019-09-06 07:20:55 +01:00
parent 9d72e9b0d8
commit 586adc63cd
No known key found for this signature in database
GPG Key ID: 5D9DB57A25D34EE3
1 changed files with 48 additions and 3 deletions

View File

@ -913,10 +913,8 @@ svg#link {
} }
.copy-button { .copy-button {
background: #333;
border: 1px solid #999; border: 1px solid #999;
border-radius: 5px; border-radius: 5px;
color: #d8d8d8;
cursor: pointer; cursor: pointer;
font-size: 0.8em; font-size: 0.8em;
line-height: 1em; line-height: 1em;
@ -925,5 +923,52 @@ svg#link {
} }
.copy-button:hover { .copy-button:hover {
background: #3f3f3f; background: #e6e6e6;
color: black;
}
@media (prefers-color-scheme: dark) {
body {
background: black;
color: #e6e6e6;
}
a:hover {
color: white;
}
code,
kbd,
pre,
samp {
background: #333;
}
.copy-button:hover {
background: #e6e6e6;
color: black;
}
}
@media (prefers-color-scheme: light) {
body {
background: #f1f1f1;
color: #333;
}
a:hover {
color: black;
}
code,
kbd,
pre,
samp {
background: #d8d8d8;
}
.copy-button:hover {
background: #333;
color: #f1f1f1;
}
} }