diff options
author | Runxi Yu <me@runxiyu.org> | 2024-12-11 02:11:24 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2024-12-11 02:11:24 +0800 |
commit | f2302ddbcc808545d4d09df34a5eead8c2d71a97 (patch) | |
tree | 1877325f8f2d3ff455879e36129ed9cba38625b5 /style.css | |
parent | Makefile: --preserve-tabs (diff) | |
download | e2-spec-f2302ddbcc808545d4d09df34a5eead8c2d71a97.tar.gz e2-spec-f2302ddbcc808545d4d09df34a5eead8c2d71a97.tar.zst e2-spec-f2302ddbcc808545d4d09df34a5eead8c2d71a97.zip |
Much smaller CSS
Diffstat (limited to 'style.css')
-rw-r--r-- | style.css | 296 |
1 files changed, 14 insertions, 282 deletions
@@ -2,9 +2,6 @@ * SPDX-License-Identifier: CC0-1.0 * Primarily written by Drew Devault * I asked him whether this could be PD as I want to keep this repo PD. Thanks! - * - * Pretty-printed with a simple C program, https://git.sr.ht/~runxiyu/cssindent. - * Not some in-browser JS bullshit on an external site. */ html { font-family: system-ui, sans-serif; @@ -19,28 +16,27 @@ html { background-color: var(--bg); } -code, pre { - font-family: "DejaVu Sans Mono", monospace; +@media(prefers-color-scheme:dark) { + html { + --bg: #1E1F21; + --fg: #EEEFF1; + --dim-text-color: #999; + --boxbg: #2E2F31; + --border: rgb(80, 80, 80); + --link-color: #5ca7ed; + --text-decoration-color: #474747; + } } -.literary { - font-family: "TeX Gyre Pagella", "Palatino", serif; -} -.poem { - max-width: 35rem; + +code, pre { + font-family: "DejaVu Sans Mono", monospace; } body { margin: 0 auto; padding: 1rem; -} - -body:not(.wider-body) { - max-width: 920px; -} - -body.wider-body { - max-width: 1150px; + max-width: 850px; } h1 { @@ -48,110 +44,6 @@ h1 { font-size: 1.5rem; } -h1 small { - display: block; - font-size: 1rem; -} - -.flexcols { - display: flex; - flex-direction: row; - gap: 5rem; - align-items: top; -} - -@media(max-width: 50rem) { - .flexcols { - flex-wrap: wrap; - gap: 3rem; - } -} - -.flexcols > .flexcol { - min-width: 18em; - width: 100%; - margin-left: auto; - margin-right: auto; -} - -.index { - max-width: 920px; -} - -.article-list .article { - margin-bottom: 1rem; -} - -.index .article-list .date { - display: block; - color: var(--dim-text-color); -} - -.index aside { -} - -.index aside img { - display: block; - margin: 0 auto 1rem; - border-radius: 5px; -} - -.index aside dt { - font-size: .9rem; -} - -.index aside dd { - margin-left: 0; -} - -.index aside dd:not(:last-child) { - margin-bottom: .5rem; -} - -.index aside ul { - margin-left: 0; - padding-left: 1.5rem; -} - -.index aside ul > li + li { - margin-top: .3rem; - margin-left: 0; -} - -@media(max-width: 50rem) { - .index aside .hide-when-narrow { - display: none; - } -} - -article { - margin: 0 auto; - max-width: 720px; - line-height: 1.3; -} - -article img, article video, article iframe { - display: block !important; - margin: 0 auto !important; - max-width: 90%; -} - -@media(max-width: 640px) { - article img, article video, article iframe { - max-width: calc(100% - 2rem); - } -} - -article sup { - line-height: 1; -} - -article .comment { - margin: 2rem auto 0; - max-width: 80%; - color: var(--dim-text-color); -} - a:link { text-decoration-color: var(--text-decoration-color); color: var(--link-color); @@ -161,166 +53,6 @@ a:visited { color: var(--link-color); } -.footnotes { - font-size: .85rem; -} - -footer { - margin-top: 2rem; - text-align: center; - font-size: .8rem; - color: var(--dim-text-color); -} - -.float-img { - float: right; - display: inline; - padding-left: 1rem; -} - -@media(max-width: 640px) { - .float-img { - display: block; - float: none; - padding-left: inherit; - } -} - -summary { - cursor: pointer; - background-color: var(--boxbg); - padding: .25rem 1rem; - margin: 0 -1rem; -} - -details[open] { - border-bottom: 1rem solid var(--boxbg); - margin: 0 -1rem 1rem; - padding: 0 1rem; -} - -.text-center { - text-align: center; -} - -blockquote { - background-color: var(--boxbg); - padding: 3px; - margin-left: 0; - margin-right: 0; -} - -blockquote ul { - margin-top: 0; - margin-bottom: 0; - margin-left: 0; -} - -blockquote blockquote { - margin-right: 0; - margin-left: 0; -} - -blockquote p:first-child { - margin-top: 0; -} - -blockquote p:last-child { - margin-bottom: 0; -} - -dl { - display: grid; - grid-template-columns: auto 1fr; - grid-gap: .2rem 1rem; -} - -dl dt { - font-weight: 700; - grid-column-start: 1; -} - -dl dd { - grid-column-start: 2; - margin: 0; -} - -.alert { - padding: .5rem; - border: 1px solid transparent; - margin-bottom: 1rem; -} - -.alert.alert-danger { - background: #f8d7da; - color: #721c24; - border-color: #f5c6cb; -} - -.alert.alert-info { - background: #d1ecf1; - color: #0c5460; - border-color: #bee5eb; -} - -table { - margin-top: .4em; - margin-bottom: .4em; - border-collapse: collapse; - border: 1px solid var(--border); - font-size: 90%; -} - -table.wide { - width: 100%; -} - -th[scope~=row] { - width: 6em; - text-align: right; -} - -th[scope~=col] { -} - -td { - border: 1px solid; - text-align: left; - height: 1.25rem; - border: 1px solid var(--border); - padding: 3px 5px; -} - -table.fat td { - padding: 6px 5px; -} - -td.th-like, th { - background-color: var(--boxbg) !important; - border: 1px solid var(--border); - font-weight: 700; - padding: 3px 5px; -} - -@media(prefers-color-scheme:dark) { - html { - --bg: #1E1F21; - --fg: #EEEFF1; - --dim-text-color: #999; - --boxbg: #2E2F31; - --border: rgb(80, 80, 80); - --link-color: #5ca7ed; - --text-decoration-color: #474747; - } -} - -.almost-transparent { - opacity: 10%; -} -.almost-transparent:hover { - opacity: 50%; -} - .title { text-align: center; font-size: 180%; |