On a phone, a pane's tab or the band above its title moved up or down at once (before the 380 ms hold) drags the pane's top edge with the finger: the pane grows or shrinks and the pane above takes the difference; a tab at the limit is pushed along (stack.ts resize, from the sizes the drag began with, so moving back gives back what was pushed). Never less than a tab, never past the page. Released barely taller than a tab, a pane folds (a 120 ms ease). Direction known after 8 px: up or down resizes (the handles of every pane but a page's first are touch-action: pan-x, so the browser never scrolls first), sideways is the browser's swipe. A hold still picks the pane up; a tap still selects it. Sizes by hand hold while the page keeps its panes and the pane looked at is shown open, across swipes; going to a folded pane there, a pane opening or closing there, or a double tap on a handle lays the page out automatically again. Only heights are set during a drag. Desktop panes unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014yB6q4BHMwptTX3YFtkRab
1110 lines
76 KiB
CSS
1110 lines
76 KiB
CSS
/*
|
||
* Typography and palette follow gwern.net (values read from its source): a serif body in
|
||
* grayscale, indented justified paragraphs, underlines only on things that respond, and
|
||
* visual differences only where there is a difference in meaning.
|
||
*/
|
||
:root {
|
||
--bg: #fff;
|
||
--fg: #000;
|
||
--soft: #333;
|
||
--dim: #666;
|
||
--faint: #888;
|
||
--rule: #bbb;
|
||
--hair: #e4e4e4;
|
||
--wash: #f5f5f5;
|
||
--sel: #e9e9e9;
|
||
--sel-strong: #d6d6d6;
|
||
--src: #f1efe6;
|
||
--attn: #8a5a00;
|
||
/* Links: the one colour on the page, kept to underlines and marks. */
|
||
--link: #3d6189;
|
||
/* Wikipedia's text sits on its own ground, so it is never mistaken for the reader's. */
|
||
--wiki-bg: #f2f5f8;
|
||
--wiki-rule: #c9d3dd;
|
||
--serif: "Source Serif 4 Variable", "Source Serif 4", "Apple Garamond", "Baskerville", "Libre Baskerville", "Times New Roman", serif;
|
||
--sans: "Source Sans 3 Variable", "Source Sans 3", "Lucida Sans Unicode", "Helvetica", sans-serif;
|
||
--mono: "IBM Plex Mono", "Liberation Mono", "Consolas", monospace;
|
||
--col: 700px;
|
||
--margin: 300px;
|
||
--gap: 44px;
|
||
/* Where what sits at the foot of the screen starts: above the status line, the home indicator (safe area) and an on-screen keyboard (--kb, App.tsx). All 1.75rem on a desktop. */
|
||
--foot-at: calc(1.75rem + env(safe-area-inset-bottom, 0px) + var(--kb, 0px));
|
||
color-scheme: light dark;
|
||
}
|
||
@media (prefers-color-scheme: dark) {
|
||
:root {
|
||
--bg: #161616;
|
||
--fg: #f1f1f1;
|
||
--soft: #dcdcdc;
|
||
--dim: #b4b4b4;
|
||
--faint: #999;
|
||
--rule: #6c6c6c;
|
||
--hair: #333;
|
||
--wash: #1d1d1d;
|
||
--sel: #2e2e2e;
|
||
--sel-strong: #444;
|
||
--src: #26241c;
|
||
--attn: #d9a441;
|
||
--link: #8fb1d8;
|
||
--wiki-bg: #182029;
|
||
--wiki-rule: #34414f;
|
||
}
|
||
}
|
||
|
||
* { box-sizing: border-box; }
|
||
html { font-size: 19px; }
|
||
body {
|
||
margin: 0;
|
||
background: var(--bg);
|
||
color: var(--fg);
|
||
font-family: var(--serif);
|
||
line-height: 1.55;
|
||
font-variant-numeric: oldstyle-nums;
|
||
-webkit-font-smoothing: antialiased;
|
||
text-rendering: optimizeLegibility;
|
||
}
|
||
::selection { background: var(--sel-strong); }
|
||
|
||
.app { min-height: 100vh; min-height: 100dvh; }
|
||
.loading, .fatal { max-width: 34em; margin: 20vh auto; padding: 0 20px; font-family: var(--sans); color: var(--dim); }
|
||
|
||
/* The page's widest: the column, its gap and the margin for notes (only the column where no margin fits). */
|
||
:root { --page-w: calc(var(--col) + var(--gap) + var(--margin) + 40px); }
|
||
.page { max-width: var(--page-w); margin: 0 auto; padding: 44px max(20px, env(safe-area-inset-right, 0px)) 30vh max(20px, env(safe-area-inset-left, 0px)); }
|
||
article { width: min(100%, var(--col)); }
|
||
|
||
/* ---- the top of the page ---- */
|
||
.crumbs { font-family: var(--sans); font-size: 0.72rem; color: var(--faint); margin-bottom: 0.5rem; }
|
||
.crumbs a { cursor: pointer; border-bottom: 1px dotted var(--faint); }
|
||
.top h1 {
|
||
margin: 0;
|
||
font-weight: 600;
|
||
font-size: 2rem;
|
||
line-height: 1;
|
||
font-variant-caps: small-caps;
|
||
letter-spacing: -0.02em;
|
||
text-align: right;
|
||
padding-bottom: 0.35rem;
|
||
border-bottom: 1px solid var(--faint);
|
||
}
|
||
.top.focused h1 { border-bottom-color: var(--fg); }
|
||
.byline { font-family: var(--sans); font-size: 0.68rem; color: var(--faint); text-align: right; margin-top: 0.3rem; letter-spacing: 0.02em; }
|
||
|
||
.abstract { margin: 1.4rem 0 1.6rem; }
|
||
.abstract.seed { border: 1px solid var(--rule); padding: 0.9rem 1.2rem; font-size: 0.86rem; line-height: 1.5; position: relative; }
|
||
.abstract.seed::before {
|
||
content: "the prompt, verbatim";
|
||
position: absolute; top: -0.62em; left: 0.9rem; padding: 0 0.4em;
|
||
background: var(--bg); font-family: var(--sans); font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint);
|
||
}
|
||
|
||
.abstract.seed.folded { cursor: pointer; border-bottom-style: dashed; margin-bottom: 0.3rem; }
|
||
.abstract.seed.folded .body { max-height: 6.1em; overflow: hidden; }
|
||
.abstract.seed.folded .body { -webkit-mask-image: linear-gradient(#000 35%, transparent 96%); mask-image: linear-gradient(#000 35%, transparent 96%); }
|
||
.unfold { font-family: var(--sans); font-size: 0.64rem; color: var(--faint); margin-bottom: 1.5rem; letter-spacing: 0.02em; }
|
||
|
||
/* ---- prose ---- */
|
||
.body { display: block; }
|
||
.para { display: block; margin: 0; text-align: justify; hyphens: auto; text-indent: 1.75em; }
|
||
.para.first { text-indent: 0; }
|
||
.para.empty { color: var(--faint); font-style: italic; text-align: left; }
|
||
.abstract.seed .para { text-indent: 0; margin-top: 0.6em; }
|
||
.abstract.seed .para.first { margin-top: 0; }
|
||
.em { font-style: italic; }
|
||
.code { font-family: var(--mono); font-size: 0.82em; background: var(--wash); padding: 0 0.2em; border-radius: 2px; font-style: normal; }
|
||
|
||
/* Text that already carries an expansion: a dotted underline, as on gwern's annotated links. */
|
||
.anchor {
|
||
cursor: pointer;
|
||
background-image: linear-gradient(to right, var(--dim) 50%, transparent 50%);
|
||
background-size: 3px 1px; background-repeat: repeat-x; background-position: 0 calc(100% - 0.08em);
|
||
}
|
||
.anchor:hover { background-image: linear-gradient(var(--fg), var(--fg)); background-size: 1px 1px; }
|
||
.anchor.on { background-image: linear-gradient(var(--faint), var(--faint)); background-size: 1px 1px; }
|
||
.anchor.writing { background-image: none; background-color: var(--sel); }
|
||
|
||
/* The keyboard selection. */
|
||
.sel { background: var(--sel); box-decoration-break: clone; -webkit-box-decoration-break: clone; }
|
||
.sel.word { background: var(--sel-strong); }
|
||
.src { background-color: var(--src); }
|
||
|
||
/* ---- expansions, in three sizes ---- */
|
||
|
||
/* 1. a gloss: a few words, inline, right after the term */
|
||
.gloss { color: var(--dim); font-size: 0.9em; text-indent: 0; }
|
||
.gloss::before { content: " ["; color: var(--faint); }
|
||
.gloss::after { content: "]"; color: var(--faint); }
|
||
.gloss .body, .gloss .para { display: inline; text-indent: 0; }
|
||
.gloss.focused { background: var(--sel); color: var(--fg); }
|
||
|
||
/* 2. a note: a sentence or three, in the margin beside its line */
|
||
.sidenote {
|
||
float: right; clear: right;
|
||
width: var(--margin); margin-right: calc(-1 * (var(--margin) + var(--gap))); margin-bottom: 0.9rem;
|
||
font-size: 0.8rem; line-height: 1.42; text-indent: 0; text-align: left; hyphens: manual;
|
||
color: var(--soft); padding: 0.3rem 0 0.35rem; border-top: 1px dotted var(--rule); border-bottom: 1px dotted var(--rule);
|
||
position: relative;
|
||
}
|
||
.sidenote .para, .inset .para, .popup .para { text-indent: 0; text-align: left; hyphens: manual; }
|
||
.sidenote .para + .para, .inset .para + .para, .popup .para + .para { margin-top: 0.5em; }
|
||
.sidenote.focused { border-top: 1px solid var(--fg); border-bottom: 1px solid var(--fg); color: var(--fg); }
|
||
.inset.focused { border-left-color: var(--fg); color: var(--fg); }
|
||
|
||
/* 3. a passage: paragraphs, set into the column under the text it expands */
|
||
.inset {
|
||
display: block; clear: both;
|
||
margin: 0.55rem 0 0.75rem 1.75em; padding: 0.45rem 0.9rem 0.5rem;
|
||
font-size: 0.88rem; line-height: 1.5; text-indent: 0;
|
||
border-left: 2px solid var(--rule); background: var(--wash); color: var(--soft);
|
||
}
|
||
.sidenote .inset, .inset .inset { margin-left: 0.4rem; font-size: 0.95em; }
|
||
.inset.orphan { border-left-style: dashed; }
|
||
.meta { display: block; font-family: var(--sans); font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); margin-bottom: 0.15rem; }
|
||
.stale > .meta, .orphan > .meta { color: var(--attn); }
|
||
|
||
/* Below the width where a margin fits, notes fall into the column. */
|
||
@media (max-width: 1139px) {
|
||
:root { --page-w: calc(var(--col) + 40px); }
|
||
.sidenote { float: none; display: block; width: auto; margin: 0.5rem 0 0.7rem 1.75em; padding: 0.4rem 0.8rem; border: 0; border-left: 2px dotted var(--rule); }
|
||
}
|
||
.with-panel .sidenote { float: none; display: block; width: auto; margin: 0.5rem 0 0.7rem 1.75em; padding: 0.4rem 0.8rem; border: 0; border-left: 2px dotted var(--rule); }
|
||
|
||
/* Text arriving. */
|
||
.caret { display: inline-block; width: 0.45em; height: 1em; vertical-align: -0.15em; background: var(--faint); animation: blink 1s steps(2) infinite; }
|
||
@keyframes blink { 50% { opacity: 0; } }
|
||
.pending { color: var(--dim); }
|
||
.pending-sections { margin: 0.4rem 0 0 1.35rem; color: var(--dim); }
|
||
.pending-section .title { font-weight: 600; margin-top: 0.4rem; }
|
||
|
||
/* ---- the outline ---- */
|
||
.outline { list-style: none; margin: 0; padding: 0; }
|
||
.content > .outline { margin-top: 0.55rem; }
|
||
.node { margin: 0; }
|
||
.row { display: flex; align-items: baseline; gap: 0.45em; cursor: pointer; padding: 0.08rem 0.3rem 0.08rem 0; margin-left: -0.3rem; padding-left: 0.3rem; border-radius: 2px; }
|
||
.row:hover .title { color: var(--dim); }
|
||
.mark { flex: none; width: 0.9em; font-family: var(--sans); font-size: 0.7em; color: var(--faint); text-align: center; position: relative; top: -0.1em; }
|
||
.title { flex: 0 1 auto; }
|
||
.untitled { color: var(--faint); }
|
||
/* Depth comes in a cycle of three, as gwern prescribes: bold, italic, small caps. */
|
||
.node.open > .row > .title { font-weight: 600; }
|
||
.node.open.d2 > .row > .title, .node.open.d5 > .row > .title { font-weight: 400; font-style: italic; }
|
||
.node.open.d3 > .row > .title, .node.open.d6 > .row > .title { font-weight: 500; font-variant-caps: small-caps; letter-spacing: 0.02em; }
|
||
.node.focused > .row { background: var(--sel); }
|
||
.node.focused > .row .mark { color: var(--fg); }
|
||
/* Flags give way (cut short) before a cramped row runs off a narrow screen. */
|
||
.flags { margin-left: auto; padding-left: 1em; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-family: var(--sans); font-size: 0.62rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }
|
||
.flags.attn { color: var(--attn); }
|
||
.byline .flags { margin-left: 0.8em; padding: 0; }
|
||
|
||
/* An open node's content hangs from a hairline, like gwern's collapse gutter. */
|
||
.content { margin: 0.15rem 0 0.7rem 0.42em; padding-left: 0.93em; border-left: 1px solid var(--hair); }
|
||
.node.focused > .content { border-left-color: var(--faint); }
|
||
article > .outline > .node { margin-top: 0.12rem; }
|
||
|
||
/* ---- editing ---- */
|
||
.editor, .title-editor {
|
||
font: inherit; color: inherit; background: var(--wash); border: 1px solid var(--rule); border-radius: 2px; outline: none; width: 100%;
|
||
}
|
||
.editor { display: block; padding: 0.4rem 0.6rem; resize: none; line-height: 1.5; font-size: 0.95em; text-indent: 0; }
|
||
.title-editor { padding: 0 0.3rem; flex: 1; }
|
||
.editor:focus, .title-editor:focus { border-color: var(--fg); }
|
||
|
||
/* ---- history view ---- */
|
||
.banner { font-family: var(--sans); font-size: 0.72rem; background: var(--fg); color: var(--bg); padding: 0.35rem 0.7rem; margin: -1rem 0 1.2rem; width: min(100%, var(--col)); }
|
||
article.preview { opacity: 0.92; }
|
||
|
||
.panel {
|
||
position: fixed; top: 0; right: 0; bottom: var(--foot-at); width: min(440px, 92vw); overflow-y: auto;
|
||
background: var(--bg); border-left: 3px double var(--rule); padding: 0 0.9rem 2rem; font-family: var(--sans); font-size: 0.74rem; line-height: 1.4; z-index: 5;
|
||
}
|
||
.panel-head { position: sticky; top: 0; background: var(--bg); padding: 0.7rem 0 0.45rem; display: flex; justify-content: space-between; align-items: baseline; gap: 1em; border-bottom: 1px solid var(--hair); font-weight: 600; z-index: 1; }
|
||
.panel-head .keys { font-weight: 400; font-size: 0.62rem; color: var(--faint); text-align: right; }
|
||
.panel h3 { margin: 0.9rem 0 0.25rem; font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
|
||
.verdict { margin-top: 0.6rem; padding: 0.4rem 0.6rem; background: var(--wash); border-left: 2px solid var(--fg); }
|
||
.item { padding: 0.28rem 0.45rem; border-radius: 2px; cursor: pointer; border-left: 2px solid transparent; }
|
||
.item.selected { background: var(--sel); border-left-color: var(--fg); }
|
||
.item.viewing { border-left-color: var(--attn); }
|
||
.item .line { display: flex; gap: 0.6em; align-items: baseline; }
|
||
.item .msg { flex: 1; }
|
||
.item .sub { color: var(--faint); font-size: 0.64rem; }
|
||
/* The links list (S): quiet toggles, then a row per link found or made. */
|
||
.lfilters { padding: 0.45rem 0 0.35rem; font-size: 0.66rem; color: var(--faint); border-bottom: 1px solid var(--hair); margin-bottom: 0.3rem; }
|
||
.lfilter { font: inherit; background: none; border: 0; padding: 0; cursor: pointer; color: var(--fg); }
|
||
.lfilter kbd { font-family: var(--mono); font-size: 0.58rem; color: var(--faint); margin-right: 0.15em; }
|
||
.lfilter .n { color: var(--dim); font-variant-numeric: tabular-nums; }
|
||
.lfilter.off { color: var(--faint); text-decoration: line-through; text-decoration-color: var(--rule); }
|
||
.lrow .lq { font-family: var(--serif); }
|
||
.lrow .lt { color: var(--dim); }
|
||
.lrow .lmark { font-size: 0.56rem; vertical-align: super; margin-left: 0.15em; color: var(--faint); }
|
||
.lrow.rejected .lq, .lrow.rejected .lt { color: var(--faint); }
|
||
.lrow .sub { overflow-wrap: anywhere; }
|
||
.lrow .lwhere { color: var(--dim); }
|
||
.lempty, .lmore { color: var(--faint); margin: 0.8rem 0.45rem; }
|
||
.hash { font-family: var(--mono); font-size: 0.62rem; color: var(--faint); flex: none; }
|
||
/* The top-level nodes a commit touched. */
|
||
.item .under { color: var(--dim); font-size: 0.62rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||
.chip { margin-left: auto; font-size: 0.58rem; letter-spacing: 0.06em; text-transform: uppercase; border: 1px solid var(--rule); padding: 0 0.35em; border-radius: 2px; color: var(--dim); }
|
||
.conflict.open .chip { color: var(--attn); border-color: var(--attn); }
|
||
.sides { margin-top: 0.4rem; display: grid; gap: 0.35rem; font-family: var(--serif); font-size: 0.74rem; line-height: 1.4; cursor: default; }
|
||
.side { display: block; border-left: 2px solid var(--hair); padding-left: 0.5rem; }
|
||
.side.strong { border-left-color: var(--fg); }
|
||
.side .name { display: block; font-family: var(--sans); font-size: 0.58rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
|
||
.why { font-style: italic; color: var(--dim); }
|
||
.actions { display: flex; gap: 0.4rem; }
|
||
button { font: inherit; font-family: var(--sans); font-size: 0.66rem; color: var(--fg); background: var(--bg); border: 1px solid var(--rule); border-radius: 2px; padding: 0.1rem 0.5rem; cursor: pointer; }
|
||
button:hover { border-color: var(--fg); }
|
||
|
||
/* ---- overlays ---- */
|
||
.overlay { position: fixed; inset: 0; background: color-mix(in srgb, var(--bg) 82%, transparent); display: flex; justify-content: center; align-items: flex-start; padding: 8vh 20px 4vh; z-index: 20; overflow-y: auto; }
|
||
.help, .jump { background: var(--bg); border: 3px double var(--rule); box-shadow: 1px 2px 8px 0 color-mix(in srgb, var(--fg) 14%, transparent); font-family: var(--sans); }
|
||
.help { max-width: 980px; padding: 1.1rem 1.5rem 1.4rem; font-size: 0.72rem; line-height: 1.35; }
|
||
.help h2 { margin: 0 0 0.3rem; font-family: var(--serif); font-variant-caps: small-caps; font-size: 1.3rem; font-weight: 600; }
|
||
.help .lede { margin: 0 0 0.9rem; max-width: 62em; color: var(--dim); font-family: var(--serif); font-size: 0.82rem; }
|
||
.help .cols { columns: 2 380px; column-gap: 2.2rem; }
|
||
.help section { break-inside: avoid; margin-bottom: 0.8rem; }
|
||
.help h3 { margin: 0 0 0.25rem; font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
|
||
.help dl { margin: 0; }
|
||
.help dl > div { display: grid; grid-template-columns: 9.6em 1fr; gap: 0.7em; padding: 0.1rem 0; }
|
||
.help dt { white-space: nowrap; }
|
||
.help dd { margin: 0; color: var(--soft); }
|
||
kbd, .help code { font-family: var(--mono); font-size: 0.86em; border: 1px solid var(--rule); border-bottom-width: 2px; border-radius: 3px; padding: 0 0.3em; margin-right: 0.25em; background: var(--wash); }
|
||
.help code { border: 0; padding: 0; background: none; }
|
||
|
||
.jump { width: min(560px, 100%); }
|
||
.jump input { width: 100%; font: inherit; font-size: 0.9rem; padding: 0.55rem 0.8rem; border: 0; border-bottom: 1px solid var(--hair); outline: none; background: transparent; color: var(--fg); }
|
||
.jump ul { list-style: none; margin: 0; padding: 0.25rem 0; }
|
||
.jump li { padding: 0.25rem 0.8rem; cursor: pointer; display: flex; gap: 0.8em; align-items: baseline; font-size: 0.8rem; }
|
||
.jump li.selected { background: var(--sel); }
|
||
.jump li .p { color: var(--faint); font-size: 0.66rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||
.jump li .p .in { font-weight: 600; color: var(--dim); }
|
||
.jump li.none { color: var(--faint); cursor: default; }
|
||
.jump-head { padding: 0.45rem 0.8rem 0; font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
|
||
|
||
.popup {
|
||
position: fixed; width: 440px; max-height: 320px; overflow: auto; z-index: 15;
|
||
background: var(--bg); border: 3px double var(--rule); box-shadow: 1px 2px 8px 0 color-mix(in srgb, var(--fg) 16%, transparent);
|
||
padding: 0.6rem 0.85rem 0.7rem; font-size: 0.82rem; line-height: 1.45; pointer-events: none; max-width: calc(100vw - 24px);
|
||
}
|
||
|
||
/* ---- the command bar and status line ---- */
|
||
.command { position: fixed; left: 0; right: 0; bottom: var(--foot-at); display: flex; align-items: baseline; gap: 0.7em; background: var(--bg); border-top: 1px solid var(--fg); padding: 0.4rem 0.9rem; font-family: var(--sans); font-size: 0.8rem; z-index: 12; }
|
||
.command .prompt { color: var(--faint); font-size: 0.7rem; white-space: nowrap; }
|
||
.command .prompt::after { content: " ›"; }
|
||
.command input { flex: 1; font: inherit; border: 0; outline: none; background: transparent; color: var(--fg); }
|
||
|
||
.status {
|
||
position: fixed; left: 0; right: 0; bottom: var(--kb, 0px); height: calc(1.75rem + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; gap: 0.9em;
|
||
background: var(--wash); border-top: 1px solid var(--hair); padding: 0 max(0.9rem, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(0.9rem, env(safe-area-inset-left, 0px)); font-family: var(--sans); font-size: 0.66rem; color: var(--dim); white-space: nowrap; z-index: 10;
|
||
}
|
||
.grain { font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bg); background: var(--fg); padding: 0 0.5em; border-radius: 2px; }
|
||
.grain.sentence, .grain.word { background: var(--dim); }
|
||
.grain.aux { background: var(--link); }
|
||
.path { color: var(--faint); overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; }
|
||
.message { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--fg); }
|
||
.right { display: flex; align-items: center; gap: 0.9em; color: var(--faint); }
|
||
.dot { width: 0.5em; height: 0.5em; border-radius: 50%; background: var(--faint); }
|
||
.dot.off { background: transparent; border: 1px solid var(--attn); }
|
||
.spin { width: 0.7em; height: 0.7em; border: 1.5px solid var(--faint); border-top-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; }
|
||
@keyframes spin { to { transform: rotate(360deg); } }
|
||
|
||
@media (max-width: 720px) {
|
||
html { font-size: 17px; }
|
||
.para { text-align: left; }
|
||
.status .path, .status .q { display: none; }
|
||
}
|
||
|
||
/* ---- the editor's research run, above the status line (AgentPanel in App.tsx) ---- */
|
||
.agent-panel {
|
||
position: fixed; left: 0; right: 0; bottom: var(--foot-at); max-height: 11rem; overflow: auto; z-index: 11;
|
||
background: var(--wash); border-top: 1px solid var(--hair); padding: 0.35rem 0.9rem 0.4rem;
|
||
font-family: var(--sans); font-size: 0.7rem; line-height: 1.5; color: var(--dim);
|
||
}
|
||
.agent-head { color: var(--faint); }
|
||
.agent-label { font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg); margin-right: 0.7em; }
|
||
.agent-steps { margin: 0.15rem 0 0; padding: 0; list-style: none; }
|
||
.agent-steps li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||
.agent-steps li::before { content: "· "; color: var(--faint); }
|
||
.agent-steps .agent-more { color: var(--faint); }
|
||
.agent-summary { color: var(--fg); margin-top: 0.2rem; }
|
||
.agent-sources a { color: var(--link); text-decoration: none; }
|
||
.agent-sources a:hover { text-decoration: underline; }
|
||
.agent-host { color: var(--faint); }
|
||
|
||
/* ---- usage in the status line (src/ui/Usage.tsx) ---- */
|
||
.usage { display: flex; align-items: center; gap: 0.9em; flex: none; white-space: nowrap; color: var(--faint); font-variant-numeric: tabular-nums; }
|
||
.usage > span { cursor: default; }
|
||
.usage-plan { color: var(--dim); }
|
||
.usage-plan.attn { color: var(--attn); font-weight: 600; }
|
||
@media (max-width: 899px) {
|
||
.usage-session { display: none; }
|
||
}
|
||
/* ---- end usage ---- */
|
||
|
||
/* ---- panes view (src/ui/Panes.tsx) ----
|
||
* The panes as columns, side by side, after notes.andymatuschak.org. Column i sticks i spines from
|
||
* the left edge (a pinned pane's column, a whole pane), so later columns slide over earlier ones
|
||
* and leave each a narrow spine that carries its title. A column holds every pane at its depth, top
|
||
* to bottom, sharing its height (Panes.tsx sets the heights); folded panes are one-line tabs. Each
|
||
* pane scrolls on its own; only the strip scrolls sideways. Every pane has the same hairline on its
|
||
* right and bottom, so neighbours share one line and the outer edges meet the bars above and below.
|
||
*/
|
||
:root {
|
||
--pane-text: 34rem;
|
||
--spine: 2.1rem;
|
||
--pane-pad: 1.8rem;
|
||
--pane: calc(var(--spine) + var(--pane-text) + var(--pane-pad));
|
||
--tab: 30px;
|
||
--shade: rgb(0 0 0 / 0.2);
|
||
--pane-rule: #d9d9d9;
|
||
/* The edges of the active pane and of a pane peeking out. */
|
||
--edge-strong: #6a6a6a;
|
||
--curve: rgb(0 0 0 / 0.17);
|
||
--curve-on: color-mix(in srgb, var(--link) 62%, transparent);
|
||
}
|
||
@media (prefers-color-scheme: dark) {
|
||
:root {
|
||
--shade: rgb(0 0 0 / 0.6);
|
||
--pane-rule: #3a3a3a;
|
||
--edge-strong: #a8a8a8;
|
||
--curve: rgb(255 255 255 / 0.16);
|
||
--curve-on: color-mix(in srgb, var(--link) 62%, transparent);
|
||
}
|
||
}
|
||
.view-panes .page {
|
||
position: fixed; top: 0; left: 0; right: 0; bottom: var(--foot-at);
|
||
max-width: none; margin: 0; padding: 0; display: flex; flex-direction: column;
|
||
}
|
||
.view-panes.with-panel .page { right: min(440px, 92vw); }
|
||
.view-panes .banner { flex: none; width: auto; margin: 0; }
|
||
.panes { flex: 1; min-height: 0; display: flex; position: relative; }
|
||
.strip {
|
||
flex: 1; min-width: 0; display: flex; overflow-x: auto; overflow-y: hidden;
|
||
overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--rule) transparent;
|
||
}
|
||
.col { position: sticky; flex: none; width: var(--pane); width: round(down, var(--pane), 1px); height: 100%; display: flex; flex-direction: column; background: var(--bg); }
|
||
.col.split { overflow-y: auto; scrollbar-width: none; }
|
||
.pane { position: relative; flex: none; width: 100%; height: 100%; overflow: hidden; color: var(--fg); background: var(--bg); border-right: 1px solid var(--pane-rule); border-bottom: 1px solid var(--pane-rule); }
|
||
.col.split > .pane { height: auto; flex: 1 1 0; min-height: 0; }
|
||
.strip[data-flush] .pane:last-child { border-bottom-color: transparent; }
|
||
.col[data-over] { box-shadow: -14px 0 20px -12px var(--shade); }
|
||
.col[data-over]::before { content: ""; position: absolute; z-index: 4; top: 0; bottom: 0; left: 0; width: 1px; background: var(--rule); }
|
||
.pane-scroll {
|
||
height: 100%; overflow-x: hidden; overflow-y: auto; padding: 1.9rem var(--pane-pad) 30vh var(--spine);
|
||
scrollbar-width: thin; scrollbar-color: var(--hair) transparent;
|
||
}
|
||
/* In a shared column a pane is only as tall as its text needs, so it scrolls no further than its end. */
|
||
.col.split .pane-scroll { padding-bottom: 1.4rem; }
|
||
|
||
/* The spine: a covered pane's title, set vertically in the left gutter. */
|
||
.spine { position: absolute; top: 0; bottom: 0; left: 0; width: var(--spine); z-index: 2; background: inherit; opacity: 0; pointer-events: none; cursor: pointer; transition: opacity 0.12s; }
|
||
.col[data-covered] .spine { opacity: 1; pointer-events: auto; }
|
||
.spine .pane-btn { position: absolute; top: 0.3rem; left: 50%; margin-left: -0.65rem; }
|
||
.spine-title {
|
||
display: block; max-height: 100%; padding: 1.95rem 0 1.2rem; writing-mode: vertical-rl; line-height: var(--spine);
|
||
font-family: var(--sans); font-size: 0.74rem; letter-spacing: 0.03em; color: var(--dim);
|
||
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
||
}
|
||
.spine:hover span { color: var(--fg); }
|
||
@media (prefers-reduced-motion: reduce) {
|
||
.spine { transition: none; }
|
||
}
|
||
|
||
/*
|
||
* Down a crowded column the panes stack as the columns do across the strip (stack.ts): each stuck
|
||
* a tab below the one before, a later one sliding up over an earlier along a hairline (a shadow
|
||
* there costs too much painting, with many panes) and, covered to its tab, its title on one line,
|
||
* as a covered column shows its spine.
|
||
*/
|
||
.col.crowded { overflow-y: auto; overscroll-behavior-y: contain; scrollbar-width: thin; scrollbar-color: var(--hair) transparent; }
|
||
.col.crowded > .pane { position: sticky; }
|
||
.col.crowded > .pane[data-over]::before { content: ""; position: absolute; z-index: 4; top: 0; left: 0; right: 0; height: 1px; background: var(--rule); }
|
||
.tabline {
|
||
position: absolute; z-index: 2; top: 0; left: 0; right: 0; height: var(--tab); display: flex; align-items: center; gap: 0.4em;
|
||
padding: 0 4.6rem 0 var(--spine); background: inherit; border-bottom: 1px solid var(--pane-rule); opacity: 0; pointer-events: none; cursor: pointer; transition: opacity 0.12s;
|
||
font-family: var(--sans); font-size: 0.74rem; letter-spacing: 0.02em; color: var(--dim); white-space: nowrap;
|
||
}
|
||
.tabline .tabtitle { overflow: hidden; text-overflow: ellipsis; }
|
||
.tabline:hover { color: var(--fg); }
|
||
.col.crowded > .pane[data-tab] > .tabline, .col.sized > .pane[data-tab] > .tabline { opacity: 1; pointer-events: auto; }
|
||
/* A pane scrolled past its own title shows its tab at its top as well, over its text (Panes.tsx watchHead). */
|
||
.pane[data-scrolled] > .tabline { opacity: 1; pointer-events: auto; }
|
||
/* Its title centred between the rule across the pane's top (heavy on the active pane) and its foot. */
|
||
.pane.active > .tabline { padding-top: 3px; }
|
||
.pane.on-branch:not(.active) > .tabline { padding-top: 1px; }
|
||
.pane[data-scrolled] > .pane-ctl { top: 2px; }
|
||
.pane[data-scrolled] > .grip { display: none; }
|
||
@media (prefers-reduced-motion: reduce) {
|
||
.tabline { transition: none; }
|
||
}
|
||
|
||
/* A pane or column covered down to its tab or spine has nothing else on show: it is not painted, until it peeks. */
|
||
.col[data-buried]:not([data-peek]) .pane-scroll, .col.crowded > .pane[data-buried]:not([data-peek]) > .pane-scroll { content-visibility: hidden; }
|
||
|
||
/* Peeking: a covered pane or column, the mouse resting on it, raised over its neighbours whole. */
|
||
.col[data-peek], .pane[data-peek] { z-index: 6; box-shadow: 0 3px 18px 0 var(--shade); outline: 1px solid var(--edge-strong); outline-offset: -1px; }
|
||
/* A pane peeking down its column is shown as tall as its text needs; the extra height takes no room, so nothing around it moves. */
|
||
.pane[data-peek-h] { height: var(--peek-h) !important; margin-bottom: calc(-1 * var(--peek-extra, 0px)); }
|
||
.col[data-peek] .spine, .col.crowded > .pane[data-peek] > .tabline { opacity: 0; pointer-events: none; }
|
||
/* The wheel over what peeks scrolls its text, not the column under it. */
|
||
.col[data-peek] .pane-scroll, .pane[data-peek] > .pane-scroll { overscroll-behavior: contain; }
|
||
|
||
/* Dragging a pane in its column: its grip, quiet until pointed at; the line where it will go. */
|
||
.grip { position: absolute; z-index: 3; top: 0; left: var(--spine); right: 4.6rem; height: 1.15rem; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
|
||
.grip::before { content: ""; position: absolute; left: 50%; top: 0.42rem; width: 1.1rem; margin-left: -0.55rem; height: 3px; border-top: 1px solid var(--faint); border-bottom: 1px solid var(--faint); opacity: 0; transition: opacity 0.12s; }
|
||
.col.split .grip:hover::before { opacity: 0.8; }
|
||
.col:not(.split) .grip, .col.crowded > .pane[data-tab] > .grip, .col.sized > .pane[data-tab] > .grip { display: none; }
|
||
.tabline { touch-action: none; }
|
||
.panes.dragging, .panes.dragging * { cursor: grabbing !important; user-select: none; }
|
||
.drop-line { position: absolute; z-index: 7; height: 2px; background: var(--link); pointer-events: none; }
|
||
|
||
/* A pane's pin and ×, top right, in the margin above its title: quiet until pointed at. A pinned pane's pin is filled. */
|
||
.pane-ctl { position: absolute; z-index: 3; top: 0.25rem; right: 0.3rem; display: flex; gap: 0.05rem; }
|
||
.col.crowded > .pane[data-tab] > .pane-ctl, .col.sized > .pane[data-tab] > .pane-ctl { top: 2px; }
|
||
.pane-btn { display: block; width: 1.3rem; height: 1.3rem; padding: 0.3rem; border-radius: 2px; cursor: pointer; color: var(--rule); }
|
||
.pane-btn svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
|
||
.pane:hover .pane-btn { color: var(--faint); }
|
||
.pane .pane-btn:hover { color: var(--fg); background: var(--sel); }
|
||
.pane-btn.pin.on { color: var(--fg); }
|
||
.pane-btn.pin.on svg { fill: currentColor; }
|
||
|
||
/*
|
||
* The active pane, where the keys act: a heavy rule across its top, as gwern sets a heading's;
|
||
* the other panes on the focused branch, a hairline in the text's colour. The status line's mode
|
||
* badge is set in the same ink.
|
||
*/
|
||
.pane::after { content: ""; position: absolute; z-index: 3; top: 0; left: 0; right: 0; height: 0; background: var(--fg); pointer-events: none; }
|
||
/* The active pane: the heavy rule across its top; its other three edges in the stronger ink are drawn with the curves (Panes.tsx), over the hairlines it shares with its neighbours, so a move from pane to pane repaints only those lines. */
|
||
.pane.active::after { height: 3px; }
|
||
.panes .curves path.frame.frame { stroke: var(--edge-strong); fill: none; stroke-dasharray: none; }
|
||
/* With the curves off, the pane draws them itself. */
|
||
.panes[data-curves="off"] .pane.active::after { bottom: 0; height: auto; background: none; border: 1px solid var(--edge-strong); border-top: 3px solid var(--fg); }
|
||
.pane.on-branch:not(.active)::after { height: 1px; background: var(--faint); }
|
||
|
||
/* The curves: from what each pane was opened from to its title, behind nothing but in the gaps between lines. */
|
||
/* A layer of its own, so that drawing a curve again does not paint the panes under it again. */
|
||
/* Over the panes and their edges, and over a pane peeking out (whose own place the curves leave clear, Panes.tsx curves); under the menus and the selection bar (a hole in them where it is). */
|
||
.curves { position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; z-index: 7; pointer-events: none; overflow: hidden; }
|
||
.curves path { fill: none; stroke: var(--curve); stroke-width: 1; }
|
||
.curves path.on { stroke: var(--curve-on); }
|
||
.curves path.lost { stroke-dasharray: 1 3; }
|
||
|
||
/*
|
||
* Branch colours (forks.ts): a fork's panes and curves share a colour, a plain trail keeps one, and
|
||
* the first trail has none. Seven hues at one OKLCH lightness and a low chroma, in an order that
|
||
* keeps neighbours apart for red-green and blue-yellow colour blindness too. The focused branch's at
|
||
* full strength, the others' fainter. Where it shows, by `/colors` (.panes[data-colors]): line, the
|
||
* curve and the rule under the pane's title (its tab's foot, a dash on its spine); top, a band
|
||
* across the pane's top; edge, a band down its left; off, nowhere. Never the pane's ground.
|
||
*/
|
||
:root {
|
||
--hue-0: oklch(60% 0.1 75);
|
||
--hue-1: oklch(60% 0.1 165);
|
||
--hue-2: oklch(60% 0.1 300);
|
||
--hue-3: oklch(60% 0.1 30);
|
||
--hue-4: oklch(60% 0.1 210);
|
||
--hue-5: oklch(60% 0.1 120);
|
||
--hue-6: oklch(60% 0.1 255);
|
||
/* The first trail's, near the text's ink. */
|
||
--hue-none: oklch(50% 0 0);
|
||
}
|
||
@media (prefers-color-scheme: dark) {
|
||
:root {
|
||
--hue-0: oklch(74% 0.085 75);
|
||
--hue-1: oklch(74% 0.085 165);
|
||
--hue-2: oklch(74% 0.085 300);
|
||
--hue-3: oklch(74% 0.085 30);
|
||
--hue-4: oklch(74% 0.085 210);
|
||
--hue-5: oklch(74% 0.085 120);
|
||
--hue-6: oklch(74% 0.085 255);
|
||
--hue-none: oklch(80% 0 0);
|
||
}
|
||
}
|
||
:where(.pane, .curves path, .trail-step, .map-row, .drag-ghost, .rail) { --hue: var(--hue-none); }
|
||
[data-hue="0"] { --hue: var(--hue-0); }
|
||
[data-hue="1"] { --hue: var(--hue-1); }
|
||
[data-hue="2"] { --hue: var(--hue-2); }
|
||
[data-hue="3"] { --hue: var(--hue-3); }
|
||
[data-hue="4"] { --hue: var(--hue-4); }
|
||
[data-hue="5"] { --hue: var(--hue-5); }
|
||
[data-hue="6"] { --hue: var(--hue-6); }
|
||
/* Fainter off the focused branch. Both are fixed per pane, so moving the branch changes no custom property (which every element in the pane would inherit). */
|
||
.pane, .curves path, .trail-step, .map-row, .rail { --hue-faint: color-mix(in oklab, var(--hue) 70%, transparent); }
|
||
.panes:not([data-colors="off"]) .curves path { stroke: var(--hue-faint); stroke-width: var(--hair, 1px); }
|
||
.panes:not([data-colors="off"]) .curves path.on { stroke: var(--hue); }
|
||
/*
|
||
* line: the curve runs on into the rule under the pane's title, or its tab's foot, and draws that
|
||
* rule itself (Panes.tsx curves; the pane's own is left out, data-ruled), so the two are one stroke.
|
||
* Where no curve lands (curves off, a covered source), the pane's own rule takes its colour.
|
||
*/
|
||
:where([data-colors="line"] .pane[data-hue]) > .pane-scroll > .pane-body > .pane-head,
|
||
:where([data-colors="line"] .pane[data-hue]) > .pane-scroll > .pane-body > .top h1,
|
||
:where([data-colors="line"] .pane[data-hue]) > .pane-scroll > .pane-body > .wiki:not(.embedded) > .wiki-head,
|
||
:where([data-colors="line"] .pane[data-hue]) > .tabline { border-bottom-color: var(--hue-faint); }
|
||
:where([data-colors="line"] .pane.on-branch[data-hue]) > .pane-scroll > .pane-body > .pane-head,
|
||
:where([data-colors="line"] .pane.on-branch[data-hue]) > .pane-scroll > .pane-body > .top h1,
|
||
:where([data-colors="line"] .pane.on-branch[data-hue]) > .pane-scroll > .pane-body > .wiki:not(.embedded) > .wiki-head,
|
||
:where([data-colors="line"] .pane.on-branch[data-hue]) > .tabline { border-bottom-color: var(--hue); }
|
||
.pane[data-ruled~="head"] > .pane-scroll > .pane-body > .pane-head,
|
||
.pane[data-ruled~="head"] > .pane-scroll > .pane-body > .top h1,
|
||
.pane[data-ruled~="head"] > .pane-scroll > .pane-body > .wiki:not(.embedded) > .wiki-head,
|
||
.pane[data-ruled~="tab"] > .tabline { border-bottom-color: transparent; }
|
||
/* Under a tab's foot drawn by a curve, the stacked pane's own top edge would double it. */
|
||
.col.crowded > .pane[data-ruled~="tab"] + .pane[data-over]::before { background: transparent; }
|
||
[data-colors="line"] .pane[data-hue] > .spine::before { content: ""; position: absolute; top: 1.72rem; left: 50%; width: 0.9rem; margin-left: -0.45rem; height: 1px; background: var(--hue-faint); }
|
||
[data-colors="line"] .pane.on-branch[data-hue] > .spine::before { background: var(--hue); }
|
||
.col.crowded > .pane[data-tab] > .spine::before { display: none; }
|
||
/* top: under the active pane's ink rule, above the focused branch's hairline */
|
||
[data-colors="top"] .pane[data-hue] { background-image: linear-gradient(var(--hue-faint), var(--hue-faint)); background-size: 100% 2px; background-repeat: no-repeat; }
|
||
[data-colors="top"] .pane.on-branch[data-hue] { background-image: linear-gradient(var(--hue), var(--hue)); }
|
||
[data-colors="top"] .pane[data-hue].on-branch:not(.active)::after { top: 2px; }
|
||
/* edge */
|
||
[data-colors="edge"] .pane[data-hue] { background-image: linear-gradient(var(--hue-faint), var(--hue-faint)); background-size: 2px 100%; background-position: 1px 0; background-repeat: no-repeat; }
|
||
[data-colors="edge"] .pane.on-branch[data-hue] { background-image: linear-gradient(var(--hue), var(--hue)); }
|
||
|
||
/* A pane's head: a section heading, smaller than the page title the first pane keeps. */
|
||
.pane-head { display: flex; align-items: baseline; gap: 0.6em; margin: 0 0 0.85rem; padding-bottom: 0.3rem; border-bottom: 1px solid var(--faint); cursor: pointer; }
|
||
.pane-head.focused { border-bottom-color: var(--fg); }
|
||
.pane-head h2 { margin: 0; font-size: 1.32rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
|
||
.pane-head .title-editor { font-size: 1.32rem; font-weight: 600; }
|
||
|
||
/* Its child sections, as outline rows. The one whose pane is open to the right is marked. */
|
||
.pane .rows { margin-top: 1.4rem; padding-top: 0.55rem; border-top: 1px solid var(--hair); }
|
||
.pane.root .rows { margin-top: 0; padding-top: 0; border-top: 0; }
|
||
.pane .rows > .node { margin-top: 0.12rem; }
|
||
.node.showing:not(.focused) > .row { background: var(--wash); }
|
||
.node.showing > .row .mark { color: var(--fg); }
|
||
.node.showing > .row::after { content: "→"; flex: none; margin-left: auto; padding-left: 0.8em; font-family: var(--sans); font-size: 0.72em; color: var(--dim); }
|
||
|
||
/* What each fork was opened from, in the pane it came from: the focused fork's row, words or link marked as before, the others lightly. */
|
||
.node.forked > .row::after, .wrow.forked > .row::after { content: "→"; flex: none; margin-left: auto; padding-left: 0.8em; font-family: var(--sans); font-size: 0.72em; color: var(--faint); }
|
||
.wrow.forked > .row:has(.wnum)::after { margin-left: 0.5em; }
|
||
.node.forked > .row .mark { color: var(--dim); }
|
||
:is(.lnk, .anchor, .wiki-text a).forked { background-color: color-mix(in srgb, var(--link) 12%, transparent); }
|
||
:is(.lnk, .anchor, .wiki-text a).forked.picked { background-color: color-mix(in srgb, var(--link) 30%, transparent); }
|
||
:is(.backlinks, .related-list) li.forked { box-shadow: inset 2px 0 0 var(--rule); }
|
||
:is(.backlinks, .related-list) li.forked.picked { box-shadow: inset 2px 0 0 var(--fg); }
|
||
/* An orphan: a pinned pane whose source has closed. */
|
||
.orphan-note { text-transform: none; letter-spacing: 0.02em; font-style: italic; }
|
||
|
||
/* The first pane keeps the page title, set from the left so it stays readable when the pane is partly covered. */
|
||
.pane.root .top h1, .pane.root .byline { text-align: left; }
|
||
|
||
/* A pane has no margin: notes are set into its column, as on a narrow screen. */
|
||
.pane .sidenote { float: none; display: block; width: auto; margin: 0.5rem 0 0.7rem 1.75em; padding: 0.4rem 0.8rem; border: 0; border-left: 2px dotted var(--rule); }
|
||
.pane .sidenote.focused { border-left: 2px solid var(--fg); }
|
||
/* ---- end panes view ---- */
|
||
|
||
/* ---- the top bar (src/ui/Menu.tsx) ----
|
||
* The bar sits in the page's top margin: the library's name, and whether the server has every
|
||
* edit yet; undo, redo and the menu on the right.
|
||
*/
|
||
.docbar { display: flex; align-items: baseline; gap: 0.9em; width: min(100%, var(--col)); margin: -30px 0 16px; min-width: 0; font-family: var(--sans); font-size: 0.66rem; color: var(--faint); letter-spacing: 0.02em; }
|
||
/* The library's name is the button that opens the libraries panel, with the menu's chevron (turned up while the panel is open). */
|
||
.docbar .lib-name { display: inline-flex; align-items: baseline; min-width: 0; max-width: 75%; white-space: nowrap; }
|
||
.lib-name .lib-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
|
||
.docbar .tool .chev.up { transform: rotate(180deg); }
|
||
.save-state { white-space: nowrap; }
|
||
.save-state.offline, .save-state.deleted { color: var(--attn); }
|
||
.view-panes .docbar { flex: none; width: auto; margin: 0; padding: 0.3rem 0.9rem 0.25rem; border-bottom: 1px solid var(--hair); }
|
||
/* ---- end top bar ---- */
|
||
|
||
/* ---- links (src/ui/Links.tsx) ----
|
||
* After gwern.net's typed links: the linked words keep the text's colour and get a thin solid
|
||
* underline; a small mark after them says where the link goes (W Wikipedia, § another note in this
|
||
* library, ↗ the web). A note keeps its dotted underline; a note that also links has both.
|
||
*/
|
||
.lnk { cursor: pointer; text-decoration: underline 1px solid var(--link); text-underline-offset: 0.18em; text-decoration-skip-ink: auto; }
|
||
.lnk:hover, .lnk.on { text-decoration-thickness: 2px; }
|
||
/* A link a curve leaves from: the curve draws its underline (Panes.tsx), so the two meet exactly. */
|
||
.lnk[data-curved], .wiki-text a[data-curved] { text-decoration-color: transparent; }
|
||
.lnk.on { background: var(--wash); }
|
||
.lmark {
|
||
display: inline-block; margin: 0 0.06em 0 0.08em; font-family: var(--serif); font-size: 0.6em; line-height: 1; font-weight: 600;
|
||
vertical-align: 0.55em; color: var(--link); cursor: pointer; user-select: none; -webkit-user-select: none; text-indent: 0; font-style: normal;
|
||
}
|
||
.lmark.l-wiki { font-family: var(--serif); letter-spacing: -0.04em; }
|
||
.lmark.l-node { font-weight: 400; font-size: 0.68em; vertical-align: 0.45em; }
|
||
.lmark.l-url { font-family: var(--sans); font-weight: 400; font-size: 0.66em; vertical-align: 0.5em; }
|
||
.lmark.broken { color: var(--attn); text-decoration: line-through; }
|
||
|
||
/* A target's card: in a popup, a column inset, a node's own target row. */
|
||
.lcard { font-family: var(--sans); font-size: 0.78rem; line-height: 1.45; color: var(--soft); text-align: left; text-indent: 0; }
|
||
.lcard .lhead { font-size: 0.62rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--faint); }
|
||
.lcard .lhead .lmark { vertical-align: 0.1em; font-size: 0.95em; margin: 0 0.15em 0 0; }
|
||
.lcard .ltitle { font-weight: 600; color: var(--fg); font-size: 0.92rem; margin-top: 0.05rem; }
|
||
.lcard .lsub { color: var(--dim); font-size: 0.72rem; }
|
||
.lcard .lsub.problem, .problem { color: var(--attn); }
|
||
.lcard .lbody { margin-top: 0.3rem; }
|
||
.popup .lcard + .lcard, .popup .body + .lcard { margin-top: 0.5rem; padding-top: 0.45rem; border-top: 1px solid var(--hair); }
|
||
.popup:has(.l-wiki) { background: var(--wiki-bg); border-color: var(--wiki-rule); }
|
||
.wattr { margin: 0.5rem 0 0; font-family: var(--sans); font-size: 0.6rem; line-height: 1.4; color: var(--faint); text-align: left; text-indent: 0; }
|
||
.wattr a { color: inherit; text-decoration: underline 1px dotted; text-underline-offset: 0.15em; }
|
||
.lpreview.l-wiki { background: var(--wiki-bg); border-left-color: var(--wiki-rule); }
|
||
.lpreview .lnext { margin: 0.35rem 0 0; }
|
||
.target-row { margin: 0.9rem 0 0.4rem; padding: 0.45rem 0.7rem; border-left: 2px solid var(--wiki-rule); cursor: pointer; }
|
||
.target-row.l-wiki { background: var(--wiki-bg); }
|
||
.target-row.focused { border-left-color: var(--fg); background: var(--sel); }
|
||
|
||
/* "Linked from" and "Mentioned in". */
|
||
:is(.backlinks, .related-list) { margin: 1.4rem 0 0.6rem; padding-top: 0.5rem; border-top: 1px solid var(--hair); font-family: var(--sans); font-size: 0.74rem; }
|
||
:is(.backlinks, .related-list) h3 { margin: 0 0 0.25rem; font-size: 0.6rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
|
||
:is(.backlinks, .related-list) ul { list-style: none; margin: 0; padding: 0; }
|
||
:is(.backlinks, .related-list) li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.6em; padding: 0.12rem 0.35rem; margin-left: -0.35rem; border-radius: 2px; cursor: pointer; }
|
||
:is(.backlinks, .related-list) li.focused { background: var(--sel); }
|
||
:is(.backlinks, .related-list) .bl-title { color: var(--fg); font-weight: 600; }
|
||
:is(.backlinks, .related-list) .bl-doc { color: var(--dim); }
|
||
:is(.backlinks, .related-list) .bl-quote { color: var(--faint); font-style: italic; flex-basis: 100%; }
|
||
|
||
/* The link picker: the jump box, grouped. */
|
||
.picker-head { padding: 0.5rem 0.8rem 0; font-size: 0.66rem; letter-spacing: 0.04em; color: var(--faint); }
|
||
.picker li.group { cursor: default; padding-top: 0.45rem; font-size: 0.58rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
|
||
.picker li .lmark { vertical-align: 0.15em; font-size: 0.85em; width: 0.9em; text-align: center; margin: 0; }
|
||
.picker li .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
|
||
|
||
/* ---- Wikipedia (src/ui/Wiki.tsx) ----
|
||
* Its own ground, its own face (the bundled sans), a W at its head, its licence at its foot.
|
||
*/
|
||
.wiki { font-family: var(--sans); color: var(--soft); }
|
||
.pane.wiki-pane { background: var(--wiki-bg); }
|
||
.wiki-pane .spine span { color: var(--dim); }
|
||
.wiki-pane .spine .wmark { font-weight: 600; }
|
||
.wiki-head { margin: 0 0 0.8rem; padding-bottom: 0.35rem; border-bottom: 1px solid var(--wiki-rule); cursor: pointer; }
|
||
.wiki-head.focused { border-bottom-color: var(--fg); }
|
||
.wiki-head.focused h2 { text-decoration: underline 1px solid var(--faint); text-underline-offset: 0.2em; }
|
||
.wiki-brand { font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); display: flex; align-items: center; gap: 0.4em; }
|
||
.wmark { font-family: var(--serif); font-weight: 600; font-size: 1.05em; letter-spacing: -0.04em; color: var(--link); text-transform: none; }
|
||
.wiki-brand .wmark { display: inline-block; border: 1px solid var(--wiki-rule); border-radius: 2px; padding: 0 0.22em; line-height: 1.25; background: var(--bg); }
|
||
.wiki-head h2 { margin: 0.15rem 0 0; font-family: var(--sans); font-size: 1.28rem; font-weight: 600; line-height: 1.2; color: var(--fg); letter-spacing: -0.005em; }
|
||
.wiki-head .wsub { font-weight: 400; color: var(--dim); }
|
||
.wiki-text { font-size: 0.82rem; line-height: 1.55; }
|
||
.wiki-text p { margin: 0 0 0.65em; }
|
||
.wiki-text ul, .wiki-text ol { margin: 0 0 0.65em; padding-left: 1.3em; }
|
||
.wiki-text dl dd { margin-left: 1.2em; }
|
||
.wiki-text a { color: inherit; text-decoration: underline 1px solid var(--link); text-underline-offset: 0.16em; }
|
||
.wiki-text a[target]::after { content: "↗"; font-size: 0.7em; vertical-align: 0.45em; color: var(--link); margin-left: 0.05em; }
|
||
.wiki-text a.wfocus { background: var(--sel-strong); outline: 1px solid var(--fg); outline-offset: 1px; }
|
||
.wiki-text table { border-collapse: collapse; font-size: 0.92em; margin: 0.4em 0 0.8em; }
|
||
.wiki-text th, .wiki-text td { border: 1px solid var(--wiki-rule); padding: 0.15em 0.4em; vertical-align: top; }
|
||
.wiki-text blockquote { margin: 0.4em 0 0.7em 1em; padding-left: 0.7em; border-left: 2px solid var(--wiki-rule); }
|
||
.wiki-text pre, .wiki-text code { font-family: var(--mono); font-size: 0.9em; }
|
||
.wiki-text math { font-size: 1.05em; }
|
||
/* Annotations in an article are the library's own notes: its dotted underline, its serif face, set off from Wikipedia's text. */
|
||
.wiki-text .gloss, .wiki-text .inset, .wdetached .inset { font-family: var(--serif); text-align: left; }
|
||
.wiki-text .gloss { color: var(--fg); font-size: 0.98em; }
|
||
.wiki-text .inset, .wdetached .inset { display: block; margin: 0.35rem 0 0.75rem 1.2em; padding: 0.35rem 0.75rem; font-size: 0.86rem; line-height: 1.45; background: var(--bg); color: var(--fg); border-left: 2px dotted var(--faint); }
|
||
.wiki-text .inset.focused, .wdetached .inset.focused { border-left: 2px solid var(--fg); }
|
||
.wiki-text .gloss.focused { background: var(--sel); }
|
||
.wdetached { margin: 0 0 0.6rem; }
|
||
.wdetached .inset { margin-left: 0; border-left: 2px dashed var(--attn); }
|
||
.wdetached .meta { color: var(--attn); text-transform: none; letter-spacing: 0.02em; font-size: 0.66rem; }
|
||
.wdetached .meta a { color: inherit; text-decoration: underline 1px dotted; text-underline-offset: 0.15em; }
|
||
.wiki-text .wmath.sel { outline: 1px solid var(--sel-strong); }
|
||
.wiki-desc { margin: -0.4rem 0 0.6rem; font-size: 0.74rem; color: var(--dim); font-style: italic; }
|
||
.wiki-summary { margin: 0 0 0.5rem; font-size: 0.82rem; line-height: 1.55; }
|
||
.wiki-more, .wiki-wait, .wiki-back { margin: 0.3rem 0; font-size: 0.66rem; color: var(--faint); letter-spacing: 0.02em; }
|
||
.wiki-problem { margin: 0.4rem 0; padding: 0.4rem 0.6rem; border-left: 2px solid var(--attn); background: var(--bg); font-size: 0.78rem; color: var(--soft); }
|
||
.wrows { list-style: none; margin: 0.9rem 0 0; padding: 0.5rem 0 0; border-top: 1px solid var(--wiki-rule); }
|
||
.wrows.nested { margin: 0.3rem 0 0; border-top: 0; padding-top: 0; }
|
||
.wrow .row { font-size: 0.86rem; }
|
||
.wrow.focused > .row { background: var(--sel); }
|
||
.wrow.focused > .row .mark { color: var(--fg); }
|
||
.wrow.open > .row > .title { font-weight: 600; }
|
||
.wrow.showing:not(.focused) > .row { background: color-mix(in srgb, var(--wiki-rule) 40%, transparent); }
|
||
.wrow.showing > .row::after { content: "→"; flex: none; margin-left: 0.5em; font-size: 0.72em; color: var(--dim); }
|
||
.wrow.showing > .row:not(:has(.wnum))::after { margin-left: auto; }
|
||
.wrow .wnum, .wrow .wdesc { margin-left: auto; padding-left: 1em; font-size: 0.66rem; color: var(--faint); white-space: nowrap; }
|
||
.wrow .wnum { font-variant-numeric: tabular-nums; }
|
||
.wiki .content { border-left-color: var(--wiki-rule); }
|
||
.senses h3 { margin: 0.8rem 0 0; font-size: 0.66rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
|
||
.senses .wrows { margin-top: 0.3rem; }
|
||
.wiki .backlinks { border-top-color: var(--wiki-rule); }
|
||
.wiki > .wattr { margin-top: 1.2rem; padding-top: 0.5rem; border-top: 1px solid var(--wiki-rule); }
|
||
|
||
/* An article under a node in its pane: clearly divided from the node's own text above it. */
|
||
.wiki.embedded { margin: 1.6rem calc(-1 * var(--pane-pad, 0px)) 0 0; padding: 0.9rem var(--pane-pad, 1rem) 0.8rem 1rem; background: var(--wiki-bg); border-top: 3px double var(--wiki-rule); }
|
||
.wiki.embedded:has(.wiki-head.focused) { box-shadow: inset 3px 0 0 var(--fg); }
|
||
.pane-from { margin: 0 0 0.25rem; font-family: var(--sans); font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
|
||
.pane.note-pane .pane-head h2 { font-style: italic; font-weight: 500; }
|
||
.top h1.note-title { font-style: italic; font-weight: 500; }
|
||
|
||
/* The column's article page. */
|
||
.wiki-page { background: var(--wiki-bg); padding: 1.2rem 1.4rem 1.4rem; border: 1px solid var(--wiki-rule); }
|
||
/* ---- end links and Wikipedia ---- */
|
||
|
||
/* Suggested links: a faint dashed underline, distinct from a link's solid one and a note's dotted one. */
|
||
.sugg { text-decoration: underline 1px dashed color-mix(in srgb, var(--link) 45%, transparent); text-underline-offset: 0.24em; text-decoration-skip-ink: auto; }
|
||
.sugg.sel { text-decoration-color: var(--link); }
|
||
.lpreview.suggestion { border-left-style: dashed; }
|
||
.lpreview.suggestion .why { display: block; margin-top: 0.3rem; }
|
||
.related-list { border-top-style: dashed; }
|
||
.status .job { color: var(--link); white-space: nowrap; }
|
||
/* The [[ completer under the body editor. */
|
||
.completer { position: relative; }
|
||
.completer ul { position: absolute; z-index: 20; left: 0; top: 0.2rem; min-width: 22rem; max-width: 36rem; margin: 0; padding: 0.25rem 0; list-style: none; background: var(--bg); border: 1px solid var(--hair); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12); font-family: var(--sans); font-size: 0.8rem; }
|
||
.completer li { display: flex; gap: 0.6em; align-items: baseline; padding: 0.2rem 0.6rem; }
|
||
.completer li.group { color: var(--faint); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; padding-top: 0.35rem; }
|
||
.completer li.selected { background: var(--sel); }
|
||
.completer .t { color: var(--fg); font-weight: 600; }
|
||
.completer .p { color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||
:is(.backlinks, .related-list) .bl-key { color: var(--link); font-family: var(--mono, monospace); font-size: 0.7rem; min-width: 0.8em; }
|
||
|
||
/* ---- the mouse and touch (src/ui/Mouse.tsx, actions.ts) ----
|
||
* Every function is reachable without the keys, and nothing shows until it is wanted: key hints
|
||
* are buttons, a click on a sentence brings a bar of words over it, a ⋯ (shown when its row, pane,
|
||
* page or note is pointed at or focused) and a right-click bring a menu. Each item names its key.
|
||
*/
|
||
|
||
/* Key hints: a key named in the status line or a panel's head is a button that does what the key does. */
|
||
.key {
|
||
font: inherit; color: inherit; background: none; border: 0; border-radius: 2px; padding: 0 0.15em; margin: 0 -0.15em;
|
||
cursor: pointer; white-space: nowrap;
|
||
}
|
||
.key kbd { font-size: 0.86em; padding: 0 0.25em; margin-right: 0.3em; border-bottom-width: 1px; color: var(--dim); }
|
||
.key:hover { background: var(--sel); border: 0; }
|
||
.key:hover .lbl { text-decoration: underline 1px dotted; text-underline-offset: 0.18em; }
|
||
.key:focus-visible { outline: 1px solid var(--fg); outline-offset: 1px; }
|
||
.hsep { color: var(--faint); }
|
||
.status .q .key kbd { margin-right: 0.2em; }
|
||
.panel-head .keys .key { font-size: inherit; }
|
||
.firstrun { color: var(--faint); font-style: italic; }
|
||
.firstrun .key { font-style: normal; }
|
||
|
||
/* The one menu: a small list of text, every item with its key. */
|
||
.menu {
|
||
position: fixed; z-index: 30; min-width: 15rem; max-width: 24rem; padding: 0.3rem 0;
|
||
background: var(--bg); border: 3px double var(--rule); box-shadow: 1px 2px 8px 0 color-mix(in srgb, var(--fg) 16%, transparent);
|
||
font-family: var(--sans); font-size: 0.74rem; line-height: 1.35; color: var(--fg); outline: none;
|
||
}
|
||
.menu .mh { padding: 0.35rem 0.85rem 0.15rem 1.1rem; font-size: 0.58rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||
.menu .mi {
|
||
position: relative; display: flex; align-items: baseline; gap: 1.2em; width: 100%; padding: 0.24rem 0.85rem 0.24rem 1.1rem; margin: 0;
|
||
font: inherit; color: inherit; text-align: left; background: none; border: 0; border-radius: 0; cursor: pointer;
|
||
}
|
||
.menu .mi:hover, .menu .mi:focus-visible { background: var(--sel); outline: none; }
|
||
.menu .mi[aria-disabled="true"] { color: var(--faint); cursor: default; background: none; }
|
||
.menu .mi .lbl { flex: none; }
|
||
.menu .mi .k { margin-left: auto; flex: none; font-family: var(--mono); font-size: 0.62rem; color: var(--faint); }
|
||
.menu .mi .sub { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.62rem; color: var(--faint); }
|
||
.menu .mi .chk { position: absolute; left: 0.3rem; color: var(--dim); }
|
||
.menu .sep { height: 0; border-top: 1px solid var(--hair); margin: 0.3rem 0; }
|
||
/* A row of choices in one item: move up, down, in, out; a setting's values. */
|
||
.menu .choices { display: flex; align-items: baseline; gap: 0.15rem; padding: 0.2rem 0.85rem 0.2rem 1.1rem; }
|
||
.menu .choices .lbl { color: var(--fg); margin-right: auto; padding-right: 0.8em; }
|
||
.menu .choices button { font: inherit; font-size: 0.68rem; border: 1px solid transparent; border-radius: 2px; background: none; padding: 0.05rem 0.4rem; color: var(--soft); }
|
||
.menu .choices button:hover, .menu .choices button:focus-visible { border-color: var(--rule); outline: none; }
|
||
.menu .choices button.on { border-color: var(--fg); color: var(--fg); }
|
||
.menu .choices button .k { font-family: var(--mono); font-size: 0.9em; color: var(--faint); margin-left: 0.25em; }
|
||
|
||
/* The selection bar: what can be asked about the words selected with the pointer, as words, over them. */
|
||
.selbar {
|
||
position: fixed; z-index: 16; display: flex; align-items: baseline; padding: 0.12rem 0.25rem;
|
||
background: var(--bg); border: 1px solid var(--rule); border-radius: 2px;
|
||
box-shadow: 1px 2px 8px 0 color-mix(in srgb, var(--fg) 14%, transparent);
|
||
font-family: var(--sans); font-size: 0.72rem; white-space: nowrap;
|
||
}
|
||
.selbar button {
|
||
font: inherit; color: var(--fg); background: none; border: 0; border-radius: 2px; padding: 0.12rem 0.42rem;
|
||
font-variant-caps: all-small-caps; letter-spacing: 0.05em; font-size: 0.82rem; line-height: 1.2;
|
||
}
|
||
.selbar button:hover { background: var(--sel); }
|
||
.selbar button .k { font-family: var(--mono); font-variant-caps: normal; font-size: 0.62rem; letter-spacing: 0; color: var(--faint); margin-left: 0.3em; }
|
||
.selbar .bar-sep { align-self: stretch; width: 0; border-left: 1px solid var(--hair); margin: 0.2rem 0.2rem; }
|
||
.selbar::after { /* a hairline tick pointing at the words */
|
||
content: ""; position: absolute; left: var(--tick, 50%); bottom: -5px; width: 8px; height: 8px; margin-left: -4px;
|
||
background: var(--bg); border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); transform: rotate(45deg);
|
||
}
|
||
.selbar.below::after { bottom: auto; top: -5px; transform: rotate(225deg); }
|
||
/* In the panes view the bar is set in its pane, so a pane or column over that pane covers it too. */
|
||
.pane > .selbar { position: absolute; z-index: 1; }
|
||
|
||
/* The ⋯ by a row, a pane's head, a page's head or a note: invisible until wanted, never moving the text. */
|
||
.more {
|
||
flex: none; font: inherit; font-family: var(--sans); font-size: 0.9em; line-height: 1; letter-spacing: 0.05em;
|
||
color: var(--faint); background: none; border: 0; border-radius: 2px; padding: 0.15em 0.4em; margin: 0 -0.2em 0 0.4em;
|
||
opacity: 0; cursor: pointer;
|
||
}
|
||
.row:hover > .more, .node.focused > .row > .more, .more[aria-expanded="true"], .more:focus-visible,
|
||
.top:hover .more, .top.focused .more,
|
||
:is(.sidenote, .inset):hover > .more, :is(.sidenote, .inset).focused > .more { opacity: 1; }
|
||
.more:hover, .more[aria-expanded="true"] { color: var(--fg); background: var(--sel); border: 0; }
|
||
.row > .title + .more { margin-left: auto; }
|
||
.row > .flags + .more { margin-left: 0.5em; }
|
||
/* After the arrow of a row whose pane is open. */
|
||
.node.showing > .row > .more, .node.forked > .row > .more { order: 1; margin-left: 0.4em; }
|
||
.flags[data-more] { cursor: pointer; }
|
||
.flags[data-more]:hover { text-decoration: underline 1px dotted; text-underline-offset: 0.2em; }
|
||
.byline .more { margin: 0 -0.4em 0 0.5em; font-size: 1.2em; }
|
||
:is(.sidenote, .inset) > .more { position: absolute; top: 0.15rem; right: 0.15rem; margin: 0; font-size: 0.82rem; }
|
||
.inset { position: relative; }
|
||
/* A pane's own ⋯ stands for its page's. */
|
||
.pane .top .more { display: none; }
|
||
.pane-btn.more { display: flex; align-items: center; justify-content: center; padding: 0; font-family: var(--sans); font-size: 0.8rem; line-height: 1; letter-spacing: 0.04em; }
|
||
.pane-btn.more[aria-expanded="true"] { color: var(--fg); background: var(--sel); }
|
||
|
||
/* The top bar stays at the top, in the column too: undo, redo when there is one, and the menu. */
|
||
.docbar {
|
||
position: sticky; top: 0; z-index: 4; margin: -44px 0 16px; padding: 14px 0 6px;
|
||
background: var(--bg); box-shadow: 0 0 0 100vmax var(--bg); clip-path: inset(0 -100vmax);
|
||
}
|
||
.view-panes .docbar { position: relative; box-shadow: none; clip-path: none; background: none; }
|
||
/* What the keys bring into view is not left under it. */
|
||
html { scroll-padding-top: 48px; }
|
||
.docbar .tools { margin-left: auto; display: flex; align-items: baseline; gap: 1.1em; }
|
||
.docbar .tool { font: inherit; color: var(--dim); background: none; border: 0; padding: 0; cursor: pointer; letter-spacing: 0.02em; }
|
||
.docbar .tool:hover, .docbar .tool[aria-expanded="true"] { color: var(--fg); text-decoration: underline 1px dotted; text-underline-offset: 0.2em; }
|
||
.docbar .tool .chev { display: inline-block; width: 0; height: 0; border: 0.38em solid transparent; border-top: 0.46em solid var(--faint); border-bottom: 0; margin-left: 0.3em; vertical-align: 0.1em; }
|
||
|
||
/* Touch: no hover, no right-click, no keys. The bar docks at the foot; a menu is a sheet. */
|
||
/* Over the words, the actions are simply in the bar's row. */
|
||
.selbar .bar-acts { display: contents; }
|
||
/*
|
||
* Docked at the foot (touch): one row, a finger high. The actions scroll sideways under a fade at
|
||
* whichever end has more beyond it; the ⋯ (the rest: Copy, select less or more, …) and the × that
|
||
* puts the bar away stay at the row's end.
|
||
*/
|
||
.selbar.docked {
|
||
left: 0; right: 0; bottom: var(--foot-at); top: auto !important; border-width: 1px 0 0; border-radius: 0; box-shadow: none;
|
||
padding: 0 env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px); background: var(--bg); flex-wrap: nowrap; align-items: stretch;
|
||
}
|
||
.selbar.docked::after, .selbar.docked .k, .selbar.docked .bar-sep { display: none; }
|
||
.selbar.docked .bar-acts { flex: 1; min-width: 0; display: flex; align-items: stretch; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding: 0 4px; }
|
||
.selbar.docked .bar-acts::-webkit-scrollbar { display: none; }
|
||
.selbar.docked .bar-acts[data-after] { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); }
|
||
.selbar.docked .bar-acts[data-before] { -webkit-mask-image: linear-gradient(to right, transparent, #000 36px); mask-image: linear-gradient(to right, transparent, #000 36px); }
|
||
.selbar.docked .bar-acts[data-before][data-after] { -webkit-mask-image: linear-gradient(to right, transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, transparent, #000 36px, #000 calc(100% - 36px), transparent); }
|
||
.selbar.docked button { flex: none; padding: 0 10px; font-size: 0.9rem; min-height: 44px; min-width: 44px; }
|
||
.selbar.docked :is(.bar-more, .bar-done) { width: 44px; padding: 0; border-left: 1px solid var(--hair); border-radius: 0; font-variant-caps: normal; letter-spacing: 0; }
|
||
.selbar.docked .bar-done { font-size: 1.15rem; color: var(--dim); }
|
||
.menu.sheet {
|
||
left: 0; right: 0; bottom: var(--foot-at); top: auto; max-width: none; max-height: 70vh; max-height: 70dvh; overflow-y: auto;
|
||
border-width: 3px 0 0; padding-bottom: 0.4rem; font-size: 0.86rem; box-shadow: 0 -2px 10px 0 color-mix(in srgb, var(--fg) 12%, transparent);
|
||
}
|
||
.menu.sheet .mi { padding: 0.62rem 1rem; }
|
||
.menu.sheet .choices { padding: 0.45rem 1rem; }
|
||
.menu.sheet .choices button { padding: 0.35rem 0.6rem; font-size: 0.8rem; min-height: 40px; min-width: 40px; }
|
||
@media (hover: none) {
|
||
.more { pointer-events: none; padding: 0.45em 0.6em; margin: -0.3em -0.4em -0.3em 0.3em; }
|
||
.node.focused > .row > .more, .top.focused .more, :is(.sidenote, .inset).focused > .more { opacity: 1; pointer-events: auto; }
|
||
.pane .pane-btn { color: var(--faint); }
|
||
.status .key { padding: 0.35rem 0.2em; }
|
||
.docbar .tool { padding: 0.4rem 0; }
|
||
}
|
||
/* A phone has no keys to teach in the status line: the bar and the menus say what there is. */
|
||
@media (hover: none) and (max-width: 720px) {
|
||
.status .message .hints { display: none; }
|
||
}
|
||
/* The way to every key is never hidden, however narrow the window. */
|
||
@media (max-width: 720px) {
|
||
.status .q { display: inline; }
|
||
}
|
||
/* ---- end mouse ---- */
|
||
|
||
/* ---- the libraries panel (src/ui/Menu.tsx) ----
|
||
* On the left, hanging from the top bar so the library's name that opens it stays put: one row per
|
||
* library (● the one open here), its size, and a ⋯. Beside it the page makes room: the column moves
|
||
* over (notes fold into it where the margin no longer fits), the panes narrow; on a phone it covers
|
||
* the page instead of squeezing the column.
|
||
*/
|
||
:root { --left-w: min(300px, 85vw); }
|
||
.panel.left { left: 0; right: auto; width: var(--left-w); border-left: 0; border-right: 3px double var(--rule); }
|
||
.lib-list { padding-top: 0.35rem; }
|
||
.lib-row .line { align-items: baseline; }
|
||
.lib-mark { flex: none; width: 1em; color: var(--dim); }
|
||
.lib-t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
|
||
.lib-row.current .lib-t { font-weight: 600; }
|
||
.lib-row .sub { padding-left: 1.6em; }
|
||
.lib-row .more { margin-left: auto; align-self: center; }
|
||
.lib-row:hover .more, .lib-row.selected .more { opacity: 1; }
|
||
.lib-row .lib-input { flex: 1; min-width: 0; font-size: inherit; }
|
||
.lib-confirm { margin: 0.35rem 0 0.15rem 1.6em; padding: 0.35rem 0.55rem 0.4rem; background: var(--wash); border-left: 2px solid var(--attn); cursor: default; }
|
||
.lib-confirm p { margin: 0 0 0.3rem; color: var(--soft); }
|
||
.lib-confirm code { font-family: var(--mono); font-size: 0.92em; }
|
||
.lib-note { margin-top: 0.6rem; padding: 0.4rem 0.6rem; background: var(--wash); border-left: 2px solid var(--rule); color: var(--soft); overflow-wrap: anywhere; }
|
||
.lib-add { margin: 0.55rem 0.45rem 0; color: var(--faint); }
|
||
@media (hover: none) {
|
||
.lib-row .more { opacity: 1; padding: 0.45em 0.6em; margin: -0.3em -0.4em -0.3em auto; }
|
||
}
|
||
@media (min-width: 721px) {
|
||
/* The column moves over just enough to clear the panel, its top bar left where it was. */
|
||
.with-left:not(.view-panes) .page { --shift: max(20px, calc(var(--left-w) + 28px - max(0px, (100vw - var(--page-w)) / 2))); padding-left: var(--shift); }
|
||
.with-left:not(.view-panes) .docbar { margin-left: calc(20px - var(--shift)); width: min(calc(100% + var(--shift) - 20px), var(--col)); }
|
||
.with-left.with-panel:not(.view-panes) article { max-width: calc(100vw - min(440px, 92vw) - var(--left-w) - 56px); }
|
||
/* The panes narrow beside it; the top bar runs on above both. */
|
||
.view-panes.with-left .page > :not(.docbar) { margin-left: var(--left-w); }
|
||
}
|
||
@media (min-width: 721px) and (max-width: 1739px) {
|
||
.with-left .sidenote { float: none; display: block; width: auto; margin: 0.5rem 0 0.7rem 1.75em; padding: 0.4rem 0.8rem; border: 0; border-left: 2px dotted var(--rule); }
|
||
}
|
||
@media (max-width: 720px) {
|
||
.panel.left { width: auto; right: 0; border-right: 0; }
|
||
}
|
||
/* ---- end libraries panel ---- */
|
||
|
||
/* ---- pages (src/ui/Pages.tsx, pages.ts) ----
|
||
* The panes on a phone (auto, narrower than 900 px): each column of the panes view is a page as
|
||
* wide as the screen, its panes stacked down it as on a wide screen, and the pages are swiped
|
||
* sideways, snapping one at a time. No curves (the panes are never side by side): what a pane was
|
||
* opened from takes its colour instead, the colour of the rule under its title, its tab and its
|
||
* step in the trail. Everything a finger presses is at least 40 px each way; nothing waits for a
|
||
* hover. The trail and the map's button sit at the foot, where a thumb reaches.
|
||
*/
|
||
.view-pages { --spine: 16px; --pane-pad: 16px; }
|
||
.view-pages .page { padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px); }
|
||
.panes[data-layout="pages"] { --tab: 44px; }
|
||
.panes[data-layout="pages"] .strip { scroll-snap-type: x mandatory; scrollbar-width: none; }
|
||
.panes[data-layout="pages"] .strip::-webkit-scrollbar { display: none; }
|
||
/* While the page glides the strip to a page (Panes.tsx glideTo) nothing snaps on the way; it lands on the page exactly. */
|
||
.panes[data-layout="pages"] .strip[data-gliding] { scroll-snap-type: none; }
|
||
.panes[data-layout="pages"] .col { position: relative; width: 100%; scroll-snap-align: start; scroll-snap-stop: always; }
|
||
.panes[data-layout="pages"] .pane { border-right: 0; }
|
||
/* Room above the title for the pane's buttons, a finger's size; on a tablet the text keeps its measure. */
|
||
.panes[data-layout="pages"] .pane-scroll { padding-top: 46px; }
|
||
.panes[data-layout="pages"] .col.split .pane-scroll { padding-bottom: 1.4rem; }
|
||
.panes[data-layout="pages"] .pane-body { max-width: var(--pane-text); margin: 0 auto; }
|
||
.panes[data-layout="pages"] .pane-ctl { top: 2px; right: 4px; gap: 0; }
|
||
.panes[data-layout="pages"] .pane-btn { width: 40px; height: 40px; padding: 12px; color: var(--faint); }
|
||
.panes[data-layout="pages"] .pane-btn.more { padding: 0; margin: 0; font-size: 1rem; opacity: 1; pointer-events: auto; }
|
||
/* The first pane never closes. */
|
||
.panes[data-layout="pages"] .pane.root > .pane-ctl > .close { display: none; }
|
||
.panes[data-layout="pages"] .pane-btn.pin.on { color: var(--fg); }
|
||
/*
|
||
* A pane in a page shared with others is moved up or down it by a press held on its tab or on the
|
||
* band above its title, left of its buttons (Panes.tsx): two faint lines mark that band. A swipe
|
||
* across either still turns the page; held, the pane lifts; dragged up or down at once, its top
|
||
* edge moves (below).
|
||
*/
|
||
.panes[data-layout="pages"] .grip { left: var(--spine); right: 132px; height: 44px; touch-action: pan-x pan-y; cursor: default; -webkit-touch-callout: none; }
|
||
.panes[data-layout="pages"] .grip::before { top: 20px; opacity: 0.6; }
|
||
.panes[data-layout="pages"] .tabline { padding: 0 128px 0 var(--spine); font-size: 0.8rem; touch-action: pan-x pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
|
||
/*
|
||
* Moved up or down at once, the handle of any pane but a page's first drags the pane's top edge
|
||
* (Panes.tsx): so the browser may only pan it sideways, a swipe that turns the page. A page too
|
||
* short for a tab for each of its panes (tight) is never sized so: its handles scroll it, as before.
|
||
* A page sized by hand lays its panes one under another, filling it, nothing stacked.
|
||
*/
|
||
.panes[data-layout="pages"] .col.split:not(.tight) > .pane:not(:first-child) > :is(.grip, .tabline) { touch-action: pan-x; }
|
||
.panes[data-layout="pages"] .col.sized { overflow-y: hidden; }
|
||
.panes.resizing, .panes.resizing * { user-select: none; -webkit-user-select: none; }
|
||
/* Lifted: the pane fades where it is; its tab rides just above the finger; a line shows where it will go. */
|
||
.pane[data-lifted] { opacity: 0.4; }
|
||
.drag-ghost {
|
||
position: absolute; z-index: 8; height: 44px; display: flex; align-items: center; gap: 0.4em; padding: 0 16px; pointer-events: none;
|
||
background: var(--bg); border-top: 1px solid var(--edge-strong); border-bottom: 2px solid var(--hue, var(--fg)); box-shadow: 0 6px 18px -4px var(--shade);
|
||
font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.02em; color: var(--fg); white-space: nowrap; overflow: hidden;
|
||
}
|
||
.drag-ghost .tabtitle { overflow: hidden; text-overflow: ellipsis; }
|
||
.panes[data-layout="pages"] .drop-line { z-index: 9; height: 3px; }
|
||
/* The heavy rule marks the active pane among others in its column; alone on its page it needs none. */
|
||
.panes[data-layout="pages"] .pane.active::after,
|
||
.panes[data-layout="pages"][data-curves="off"] .pane.active::after { bottom: auto; height: 3px; border: 0; background: var(--fg); }
|
||
.panes[data-layout="pages"] .col:not(.split) > .pane::after { height: 0; }
|
||
/* Rows a finger opens. (Links in running text are words, and stay as tall as the line.) */
|
||
.panes[data-layout="pages"] :is(.rows, .wrows) .row { min-height: 40px; align-items: center; }
|
||
.panes[data-layout="pages"] :is(.backlinks, .related-list) li { min-height: 40px; align-content: center; }
|
||
.panes[data-layout="pages"] .target-row { min-height: 40px; }
|
||
/* What a pane was opened from, in that pane's colour (Panes.tsx pageMarks): fainter for a pane off the focused branch. */
|
||
[data-src-hue] { --src-hue: var(--hue-none); }
|
||
[data-src-hue="0"] { --src-hue: var(--hue-0); }
|
||
[data-src-hue="1"] { --src-hue: var(--hue-1); }
|
||
[data-src-hue="2"] { --src-hue: var(--hue-2); }
|
||
[data-src-hue="3"] { --src-hue: var(--hue-3); }
|
||
[data-src-hue="4"] { --src-hue: var(--hue-4); }
|
||
[data-src-hue="5"] { --src-hue: var(--hue-5); }
|
||
[data-src-hue="6"] { --src-hue: var(--hue-6); }
|
||
[data-src-hue]:not([data-src-on]) { --src-hue-now: color-mix(in oklab, var(--src-hue) 70%, transparent); }
|
||
[data-src-hue][data-src-on] { --src-hue-now: var(--src-hue); }
|
||
.panes[data-layout="pages"]:not([data-colors="off"]) :is(.lnk, .wiki-text a)[data-src-hue] { text-decoration-color: var(--src-hue-now); text-decoration-thickness: 2px; }
|
||
.panes[data-layout="pages"]:not([data-colors="off"]) .anchor[data-src-hue] { background-image: linear-gradient(var(--src-hue-now), var(--src-hue-now)); background-size: 1px 2px; }
|
||
.panes[data-layout="pages"]:not([data-colors="off"]) :is(.node, .wrow)[data-src-hue] > .row { box-shadow: inset 2px 0 0 var(--src-hue-now); }
|
||
.panes[data-layout="pages"]:not([data-colors="off"]) :is(.node, .wrow)[data-src-hue] > .row::after { color: var(--src-hue-now); }
|
||
.panes[data-layout="pages"]:not([data-colors="off"]) :is(.backlinks, .related-list) li[data-src-hue] { box-shadow: inset 2px 0 0 var(--src-hue-now); }
|
||
|
||
/* A tap shows where it landed, quietly, in the text's ink. */
|
||
.view-pages { -webkit-tap-highlight-color: color-mix(in srgb, var(--fg) 10%, transparent); }
|
||
/* A panel's key buttons (the libraries': new, close, delete's yes and no), a finger's size too. */
|
||
.view-pages .panel .key { min-height: 40px; min-width: 40px; display: inline-flex; align-items: center; justify-content: center; }
|
||
.view-pages .panel-head { padding: 0.1rem 0; align-items: center; }
|
||
|
||
/* The top bar: each tool a finger's height. */
|
||
.view-pages .docbar { min-height: 44px; align-items: center; padding: 0 8px 0 4px; }
|
||
.view-pages .docbar .tool { min-height: 44px; min-width: 44px; justify-content: center; display: inline-flex; align-items: center; padding: 0 6px; }
|
||
.view-pages .docbar .tools { align-items: center; gap: 0.2em; }
|
||
.view-pages .docbar .lib-name { align-items: center; }
|
||
/* The status line keeps what is said and whether it is saved; the branch, the model and the key list are in the menu and the history. */
|
||
.view-pages .status .right > :is(.usage, [title="branch"], [title="model"], .q) { display: none; }
|
||
|
||
/* The trail: the focused branch, a step per pane, each underlined in its pane's colour; the one on screen in the text's ink. */
|
||
.trail {
|
||
flex: none; display: flex; align-items: stretch; height: 44px; border-top: 1px solid var(--hair); background: var(--bg);
|
||
font-family: var(--sans); font-size: 0.74rem; letter-spacing: 0.02em;
|
||
}
|
||
.trail-steps { flex: 1; min-width: 0; display: flex; align-items: stretch; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding: 0 4px; }
|
||
.trail-steps::-webkit-scrollbar { display: none; }
|
||
.trail-step {
|
||
position: relative; flex: none; display: flex; align-items: center; gap: 0.3em; min-width: 44px; max-width: 11em; padding: 0 12px;
|
||
font: inherit; color: var(--dim); background: none; border: 0; border-radius: 0; cursor: pointer;
|
||
}
|
||
.trail-step:hover { border: 0; }
|
||
@media (hover: hover) { .trail-step:hover { color: var(--fg); } }
|
||
.trail-step::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 10px; height: 1px; background: var(--hue-faint); }
|
||
.trail-step.here { color: var(--fg); font-weight: 600; }
|
||
.trail-step.here::after { height: 2px; background: var(--hue); }
|
||
.trail-step.ahead { color: var(--faint); }
|
||
.trail-step + .trail-step::before { content: "›"; position: absolute; left: -0.2em; color: var(--rule); font-weight: 400; }
|
||
.trail-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||
.trail-step .wmark { flex: none; font-size: 0.95em; }
|
||
/* How many panes a step's page holds: a dot each, top to bottom, its own filled in its colour; past four, their number. */
|
||
.trail-stack { flex: none; display: flex; flex-direction: column; gap: 2px; margin: 0 0 2px 1px; }
|
||
.trail-stack i { display: block; width: 4px; height: 4px; border-radius: 50%; background: var(--rule); }
|
||
.trail-stack i.on { background: var(--hue); }
|
||
.trail-count { flex: none; margin-left: 1px; padding: 0 3px; border: 1px solid var(--rule); border-radius: 2px; font-size: 0.6rem; line-height: 1.35; font-weight: 400; color: var(--dim); font-variant-numeric: tabular-nums; }
|
||
.trail-map { flex: none; min-width: 64px; padding: 0 14px; font: inherit; color: var(--dim); background: none; border: 0; border-left: 1px solid var(--hair); border-radius: 0; cursor: pointer; }
|
||
.trail-map:hover { border-color: var(--hair); }
|
||
.trail-map[aria-expanded="true"] { color: var(--fg); }
|
||
@media (hover: hover) { .trail-map:hover { color: var(--fg); } }
|
||
.trail-n { color: var(--faint); font-variant-numeric: tabular-nums; margin-left: 0.15em; }
|
||
|
||
/* The map: every open pane, as an outline of the forest, in a sheet from the foot. */
|
||
.pane-map {
|
||
position: fixed; left: 0; right: 0; bottom: var(--foot-at); z-index: 30; max-height: 70vh; max-height: 70dvh; overflow-y: auto; overscroll-behavior: contain; outline: none;
|
||
background: var(--bg); border-top: 3px double var(--rule); box-shadow: 0 -2px 10px 0 color-mix(in srgb, var(--fg) 12%, transparent);
|
||
padding: 0 env(safe-area-inset-right, 0px) 0.4rem env(safe-area-inset-left, 0px); font-family: var(--sans); font-size: 0.86rem; line-height: 1.35;
|
||
}
|
||
.map-head {
|
||
position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: baseline; gap: 1em; padding: 0.6rem 1rem 0.35rem;
|
||
background: var(--bg); font-size: 0.6rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint);
|
||
}
|
||
.map-hint { font-weight: 400; letter-spacing: 0.02em; text-transform: none; text-align: right; }
|
||
.map-rows { list-style: none; margin: 0; padding: 0; }
|
||
/* Each row 44 px, indented by its column (Pages.tsx sets it); its tree lines drawn in it (pages.ts rails). */
|
||
.map-row { position: relative; display: flex; align-items: stretch; height: 44px; }
|
||
.map-go { flex: 1; min-width: 0; display: flex; align-items: center; gap: 0.55em; padding: 0 8px; font: inherit; color: var(--dim); text-align: left; background: none; border: 0; border-radius: 0; cursor: pointer; }
|
||
.map-go:hover { border: 0; }
|
||
@media (hover: hover) { .map-go:hover { color: var(--fg); } }
|
||
/* A line into a pane in that pane's colour, fainter off the focused branch and stronger on it; over the active row's ground. */
|
||
.rail { position: absolute; z-index: 1; pointer-events: none; border: 0 solid var(--hue-faint); }
|
||
.rail.strong { border-color: var(--hue); }
|
||
.rail.r-dash { border-bottom-width: 1px; }
|
||
.rail.r-elbow { border-left-width: 1px; border-bottom-width: 1px; }
|
||
.rail:is(.r-on, .r-pass, .r-down) { border-left-width: 1px; }
|
||
.rail.strong.r-dash { border-bottom-width: 2px; }
|
||
.rail.strong.r-elbow { border-left-width: 2px; border-bottom-width: 2px; }
|
||
.rail.strong:is(.r-on, .r-pass, .r-down) { border-left-width: 2px; }
|
||
.map-row.on-branch .map-go { color: var(--fg); }
|
||
.map-row.here .map-go { font-weight: 600; background: var(--sel); }
|
||
.map-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||
.map-sub { flex: none; color: var(--faint); font-size: 0.66rem; font-style: italic; }
|
||
.map-btn { flex: none; display: block; width: 44px; height: 44px; padding: 14px; color: var(--faint); background: none; border: 0; border-radius: 0; cursor: pointer; }
|
||
.map-btn.none { cursor: default; }
|
||
.map-btn svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
|
||
/* Pointed at with a mouse only: a finger leaves no hover behind on what comes under it next. */
|
||
.map-btn:hover { border: 0; }
|
||
@media (hover: hover) { .map-btn:hover { color: var(--fg); background: var(--sel); } }
|
||
.map-btn.pin.on { color: var(--fg); }
|
||
.map-btn.pin.on svg { fill: currentColor; }
|
||
|
||
/* A long press on a link (touch): what it opens, above its menu. */
|
||
.menu-card { padding: 0.5rem 1rem 0.6rem; border-bottom: 1px solid var(--hair); font-family: var(--serif); font-size: 0.82rem; line-height: 1.45; max-height: 40vh; overflow-y: auto; }
|
||
.menu-card:has(.l-wiki) { background: var(--wiki-bg); }
|
||
/* ---- end pages ---- */
|