Closed 0xleizhang closed 1 year ago
:root {
--bg-color: white;
--text-color: black;
}
@media (prefers-color-scheme: light) {
:root {
--bg-color: white;
--text-color: black;
}
}
@media (prefers-color-scheme: dark) {
:root {
--bg-color: black;
--text-color: white;
}
a {
color: yellow;
}
}
// bg color is also needed in html in order to
// block body's background propagation
// see: https://stackoverflow.com/a/61265706
html,
body {
background: var(--bg-color);
}
body {
color: var(--text-color);
font-family: monospace;
font-size: 16px;
line-height: 1.4;
margin: 0;
min-height: 100%;
overflow-wrap: break-word;
}
......
here is my new version without invert
It can also solve the problem of YouTube videos being invented
Sorry for the late response. Got inspired by your version and pushed a new commit to solve this issue. Thanks!
Without using JS, CSS can be solved perfectly?
If anyone else encounters similar problems, welcome to discuss together