mirror of
https://github.com/storytold/AniCraft.git
synced 2026-11-28 17:19:31 +01:00
80 lines
5.1 KiB
CSS
80 lines
5.1 KiB
CSS
/* AniCraft User Guide (ADR 0069). The editor's graphite palette when the system is dark, a
|
|
light reading page otherwise; Inter for prose and JetBrains Mono for keys, ids and code, as in
|
|
the app (docs/ui-guidelines.md), with the system's fonts when they aren't installed. */
|
|
:root {
|
|
--bg: #fbfbfc; --panel: #f1f1f4; --text: #1b1b1f; --muted: #55555e; --line: #d8d8de;
|
|
--accent: #2e66f0; --code-bg: #ececf1;
|
|
--prose: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
|
|
--mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
|
|
}
|
|
@media (prefers-color-scheme: dark) {
|
|
:root { --bg: #1b1b1f; --panel: #222227; --text: #eeeef0; --muted: #a8a8b2; --line: #34343c;
|
|
--accent: #6f97ff; --code-bg: #2a2a31; }
|
|
}
|
|
* { box-sizing: border-box; }
|
|
html { font-size: 16px; }
|
|
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--prose); line-height: 1.6; }
|
|
a { color: var(--accent); }
|
|
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
|
|
.skip { position: absolute; left: -999px; }
|
|
.skip:focus { left: 8px; top: 8px; background: var(--panel); padding: 4px 8px; }
|
|
header.top { padding: 10px 20px; border-bottom: 1px solid var(--line); background: var(--panel); font-weight: 600; }
|
|
header.top a { color: var(--text); text-decoration: none; }
|
|
header.top .version { color: var(--muted); font-family: var(--mono); font-weight: 400; font-size: 0.85rem; margin-left: 6px; }
|
|
.layout { display: flex; max-width: 1200px; margin: 0 auto; }
|
|
nav.toc { flex: 0 0 260px; padding: 16px 12px; border-right: 1px solid var(--line); font-size: 0.92rem; position: sticky; top: 0; align-self: flex-start; max-height: 100vh; overflow-y: auto; }
|
|
nav.toc ol { margin: 0; padding-left: 1.4em; }
|
|
nav.toc li { margin: 2px 0; }
|
|
nav.toc a { color: var(--text); text-decoration: none; }
|
|
nav.toc a:hover { text-decoration: underline; }
|
|
nav.toc a[aria-current="page"] { color: var(--accent); font-weight: 600; }
|
|
main { flex: 1; min-width: 0; padding: 8px 40px 40px; max-width: 860px; }
|
|
h1, h2, h3 { line-height: 1.25; }
|
|
h1 { font-size: 2rem; margin-top: 0.8em; }
|
|
h2 { font-size: 1.4rem; margin-top: 1.8em; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
|
|
h3 { font-size: 1.12rem; margin-top: 1.4em; }
|
|
code, kbd, pre { font-family: var(--mono); font-size: 0.88em; }
|
|
code { background: var(--code-bg); padding: 1px 5px; border-radius: 3px; }
|
|
pre { background: var(--code-bg); padding: 12px 14px; overflow-x: auto; border-radius: 4px; }
|
|
pre code { background: none; padding: 0; }
|
|
table { border-collapse: collapse; margin: 1em 0; display: block; overflow-x: auto; }
|
|
th, td { border: 1px solid var(--line); padding: 5px 9px; text-align: left; vertical-align: top; }
|
|
th { background: var(--panel); }
|
|
img { max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 4px; }
|
|
blockquote { margin: 1em 0; padding: 4px 16px; border-left: 3px solid var(--accent); background: var(--panel); }
|
|
nav.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 3em; padding-top: 12px; border-top: 1px solid var(--line); }
|
|
nav.pager a[rel="next"] { margin-left: auto; text-align: right; }
|
|
footer { text-align: center; color: var(--muted); font-size: 0.85rem; padding: 20px; border-top: 1px solid var(--line); }
|
|
/* Search (ADR 0096): the field in every page's header, the results on search.html. */
|
|
header.top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
|
|
form.search { margin-left: auto; display: flex; align-items: center; gap: 8px; font-weight: 400; }
|
|
form.search label { color: var(--muted); font-size: 0.9rem; }
|
|
form.search input { font: inherit; font-size: 0.95rem; width: 18rem; max-width: 60vw; padding: 4px 10px; color: var(--text);
|
|
background: var(--bg); border: 1px solid var(--line); border-radius: 4px; }
|
|
form.search input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
|
|
ol.results { list-style: none; padding: 0; margin: 1em 0; }
|
|
ol.results li { margin: 0 0 14px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); }
|
|
ol.results a { display: block; text-decoration: none; }
|
|
ol.results a:hover .hit-heading { text-decoration: underline; }
|
|
.hit-heading { font-weight: 600; font-size: 1.05rem; }
|
|
.hit-chapter { display: block; color: var(--muted); font-size: 0.85rem; }
|
|
.hit-snippet { margin: 4px 0 0; font-size: 0.92rem; }
|
|
mark { background: color-mix(in srgb, var(--accent) 28%, transparent); color: inherit; border-radius: 2px; padding: 0 1px; }
|
|
.hint { color: var(--muted); font-size: 0.88rem; }
|
|
kbd { border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 3px; padding: 0 4px; background: var(--panel); }
|
|
@media (forced-colors: active) {
|
|
mark { background: Highlight; color: HighlightText; }
|
|
}
|
|
@media (max-width: 800px) {
|
|
.layout { display: block; }
|
|
nav.toc { position: static; max-height: none; border-right: 0; border-bottom: 1px solid var(--line); }
|
|
main { padding: 8px 18px 30px; }
|
|
}
|
|
@media (forced-colors: active) {
|
|
nav.toc a[aria-current="page"] { text-decoration: underline; }
|
|
}
|
|
@media print {
|
|
nav.toc, nav.pager, header.top, .skip, form.search { display: none; }
|
|
main { max-width: none; }
|
|
}
|