106 lines
1.6 KiB
SCSS
Raw Normal View History

2022-08-26 15:15:25 +08:00
// -------------- THEME SWITCHER -------------- //
@mixin dark-appearance {
filter: invert(1);
img {
filter: invert(1);
&.ioda { filter: invert(0); }
}
}
body[a="dark"] { @include dark-appearance; }
@media (prefers-color-scheme: dark) {
body[a="auto"] { @include dark-appearance; }
}
// -------------------------------------------- //
// bg color is also needed in html in order to
// block body's background propagation
// see: https://stackoverflow.com/a/61265706
html, body { background: white; }
html { height: 100%; }
body {
color: black;
font-family: monospace;
font-size: 16px;
line-height: 1.4;
margin: 0;
min-height: 100%;
overflow-wrap: break-word;
}
.post-meta { text-align: right; }
h2, h3, h4, h5, h6 { margin-top: 3rem; }
hr { margin: 2rem 0; }
p { margin: 1rem 0; }
li { margin: 0.4rem 0; }
*:target { background: yellow; }
.w {
max-width: 640px;
margin: 0 auto;
padding: 4rem 2rem;
}
hr {
text-align: center;
border: 0;
&:before { content: '/////' }
&:after { content: attr(data-content) '/////' }
}
pre {
padding: 1em;
}
table { width: 100%; }
table, th, td {
border: thin solid black;
border-collapse: collapse;
padding: 0.4rem;
}
code {
color: white;
background: black;
2023-01-01 17:03:31 +08:00
font-size: 80%;
padding: 0.1em 0.2em;
font-size: 90%;
2022-08-26 15:15:25 +08:00
}
2022-08-26 17:51:29 +08:00
code.has-jax {
-webkit-font-smoothing: antialiased;
background: inherit !important;
border: none !important;
font-size: 100%;
}
2022-08-26 15:15:25 +08:00
blockquote {
font-style: italic;
border: thin solid black;
padding: 1rem;
p { margin: 0; }
}
img {
max-width: 100%;
display: block;
margin: 0 auto;
2022-08-26 17:51:29 +08:00
}
2023-01-01 18:05:33 +08:00
figcaption {
text-align: center;
opacity: 0.5;
}