diff options
| author | Ahmed M Alaa <aa@4b.cx> | 2022-12-03 21:01:01 +0200 |
|---|---|---|
| committer | Ahmed M Alaa <aa@4b.cx> | 2022-12-03 21:01:01 +0200 |
| commit | 028f23e96dd4c6a86465cb616be84480ac3a7a1e (patch) | |
| tree | caffe481ff29aab5111e69b242cfc072a84912b6 /sass | |
init: just ported the theme
Diffstat (limited to 'sass')
| -rw-r--r-- | sass/style.scss | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/sass/style.scss b/sass/style.scss new file mode 100644 index 0000000..c1b9fc9 --- /dev/null +++ b/sass/style.scss @@ -0,0 +1,105 @@ +// -------------- THEME SWITCHER -------------- // +@mixin dark-appearance { + filter: invert(1); + img { + filter: invert(1); + + &.invertable { filter: invert(0); } + } +} + +body[theme="dark"] { @include dark-appearance; } + + +@media (prefers-color-scheme: dark) { + body[theme="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) '/////' } +} + +table { width: 100%; } + +table, th, td { + border: thin solid black; + border-collapse: collapse; + padding: 0.4rem; +} + +code { + color: white; + background: black; +} + +pre code { + display: block; + overflow-x: auto; + white-space: pre-wrap; + padding: 1rem; +} + +blockquote { + font-style: italic; + border: thin solid black; + padding: 1rem; + + p { margin: 0; } +} + +img { + max-width: 100%; + display: block; + margin: 0 auto; +} + +.footnote-definition { + padding: 0 1rem; + &:target { + background: yellow; + color: #212121; + } + p { + display: inline; + } +}
\ No newline at end of file |
