@tempoxyz/ds 0.3.17 → 0.3.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/docs/AGENTS.md +1 -1
- package/dist/docs/product/documents.md +25 -2
- package/dist/document/Enhance.d.ts.map +1 -1
- package/dist/document/Enhance.js +109 -19
- package/dist/document/Enhance.js.map +1 -1
- package/dist/document/document.css +28 -13
- package/dist/document/script.js +88 -15
- package/dist/document/templates/brief.html +3 -3
- package/dist/document/templates/essay.html +3 -3
- package/dist/document/templates/post.html +3 -3
- package/package.json +1 -1
- package/src/document/Enhance.ts +120 -22
- package/src/document/document.css +28 -13
package/dist/docs/AGENTS.md
CHANGED
|
@@ -25,7 +25,7 @@ Each file opens with its contents. Find a section with `rg -n '^## ' <file>`, an
|
|
|
25
25
|
## Files
|
|
26
26
|
|
|
27
27
|
- [product/foundations.md](product/foundations.md) (156 KB): Getting Started, the FAQ, and the foundations: color, layout, type, icons, motion, content, accessibility, intent, and the linter.
|
|
28
|
-
- [product/documents.md](product/documents.md) (
|
|
28
|
+
- [product/documents.md](product/documents.md) (12 KB): Document mode: templates, widths, blocks, and the lint for HTML documents.
|
|
29
29
|
- [product/patterns.md](product/patterns.md) (338 KB): Layouts that combine components, such as forms, tables, payments, and errors, and the product references.
|
|
30
30
|
- [product/components.md](product/components.md) (15 KB): Every component by family, and how to choose between similar ones.
|
|
31
31
|
- [product/components/actions.md](product/components/actions.md) (58 KB): Button, ButtonGroup, CopyButton, SplitButton.
|
|
@@ -34,7 +34,7 @@ Start from a template, fill it in, and publish it once the lint passes.
|
|
|
34
34
|
npx -p @tempoxyz/ds@latest tempo-document lint brief.html
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
4. Publish the HTML file as is, for example on Slate.
|
|
37
|
+
4. Publish the HTML file as is, for example on Slate. The page loads the stylesheet, the script, and the fonts from jsDelivr. On Slate, the page loads them from a copy that Slate serves, and the file needs no change.
|
|
38
38
|
|
|
39
39
|
#### Link the Files
|
|
40
40
|
|
|
@@ -73,6 +73,8 @@ One column for arguments and write-ups read from top to bottom. Add `data-rail`
|
|
|
73
73
|
|
|
74
74
|
A column with a sticky summary on the right, for plans, reviews, and status. Wrap the page in `div.brief` with a `header`, the `article.doc`, and an `aside.summary` that holds a `dl.facts` and a `nav` of section links. The script marks the section in view. On a phone the summary moves above the text and the links hide.
|
|
75
75
|
|
|
76
|
+
A rule opens each section after the first. Keep each fact to a short label and one line, and put the detail in a note. A summary taller than the window scrolls.
|
|
77
|
+
|
|
76
78
|
```html title="brief.html"
|
|
77
79
|
<div class="brief">
|
|
78
80
|
<header>
|
|
@@ -107,6 +109,7 @@ One plain column with a byline, for blog posts and guides. Number steps with `ol
|
|
|
107
109
|
| --------------------------- | -------------------------------- |
|
|
108
110
|
| Title, `h1` | heading.h2, Pilat |
|
|
109
111
|
| Section, `h2` | heading.h3, Pilat |
|
|
112
|
+
| Big number | heading.h2, Pilat |
|
|
110
113
|
| Subsection, `h3` | body.b2Strong, Inter 14px medium |
|
|
111
114
|
| Lead, `.dek` | body.b1 |
|
|
112
115
|
| Body text and table cells | body.b2, 14px on a 22px line |
|
|
@@ -138,7 +141,7 @@ Write each block from semantic HTML. The stylesheet styles the elements, so most
|
|
|
138
141
|
| Scope table | `table.kv` with a `th scope="row"` per row |
|
|
139
142
|
| Results table | `table.results` with a `td.outcome` per row |
|
|
140
143
|
| Quote | `blockquote` with an optional `footer`. Use `blockquote.input` with `data-label` to quote an input. |
|
|
141
|
-
| Big numbers | `dl.figures` with two to
|
|
144
|
+
| Big numbers | `dl.figures` with two to six `div`s of `dt`, `dd`, and an optional second `dd` |
|
|
142
145
|
| Code | `pre > code`. The script adds a copy button. |
|
|
143
146
|
| Note | `span.sn > small` after the words it explains |
|
|
144
147
|
| Chronology | `ol.chronology` with a `time` and a `p` per item |
|
|
@@ -149,6 +152,8 @@ Write each block from semantic HTML. The stylesheet styles the elements, so most
|
|
|
149
152
|
|
|
150
153
|
A note is a footnote. The script numbers it, opens it in a popover on hover, tap, or Enter, and lists every note at the end. Escape closes the popover and returns focus to the number. Without the script a note reads inline, in parentheses.
|
|
151
154
|
|
|
155
|
+
A note also works in a list item, a table cell, a big number, and a fact of the Brief summary.
|
|
156
|
+
|
|
152
157
|
```html
|
|
153
158
|
<p>
|
|
154
159
|
The widths follow Distill.<span class="sn"
|
|
@@ -157,6 +162,24 @@ A note is a footnote. The script numbers it, opens it in a popover on hover, tap
|
|
|
157
162
|
</p>
|
|
158
163
|
```
|
|
159
164
|
|
|
165
|
+
#### Big Numbers
|
|
166
|
+
|
|
167
|
+
Each `div` holds a label in `dt` and the number in `dd`. Add a second `dd` for one line about the number. Start that line with the standing of the number in `b`, such as Agreed, Estimate, or Disputed.
|
|
168
|
+
|
|
169
|
+
```html
|
|
170
|
+
<dl class="figures">
|
|
171
|
+
<div>
|
|
172
|
+
<dt>Fee</dt>
|
|
173
|
+
<dd>2 bps</dd>
|
|
174
|
+
<dd><b>Proposed.</b> None in the first year.</dd>
|
|
175
|
+
</div>
|
|
176
|
+
</dl>
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
#### Chronology
|
|
180
|
+
|
|
181
|
+
On a wide screen the `time` hangs in the margin, in a column that fits about ten characters. Write a short date, such as `Nov 20`, `Mar 2027`, or `Q2 2027`. A full date such as `Nov 20, 2026` does not fit. Put the year in an `h3` above the items.
|
|
182
|
+
|
|
160
183
|
#### Code
|
|
161
184
|
|
|
162
185
|
The script adds a Copy button to the top right of each `pre`, named Copy code for assistive technology. It copies the code's text, shows Copied, announces it, and then reverts. The block keeps room on the right so the button never covers the first line, and long lines still scroll.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Enhance.d.ts","sourceRoot":"","sources":["../../src/document/Enhance.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAcH;;;;;GAKG;AACH,wBAAgB,GAAG,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"Enhance.d.ts","sourceRoot":"","sources":["../../src/document/Enhance.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAcH;;;;;GAKG;AACH,wBAAgB,GAAG,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI,CAuBxC"}
|
package/dist/document/Enhance.js
CHANGED
|
@@ -31,7 +31,9 @@ export function run(page) {
|
|
|
31
31
|
live.textContent = message;
|
|
32
32
|
};
|
|
33
33
|
for (const doc of page.querySelectorAll('.doc')) {
|
|
34
|
-
|
|
34
|
+
// The summary of a Brief is a sibling of its article, and its notes join the article's notes.
|
|
35
|
+
const summary = doc.closest('.brief')?.querySelector(':scope > .summary');
|
|
36
|
+
notes(doc, view, summary ?? undefined);
|
|
35
37
|
anchors(doc, view, announce);
|
|
36
38
|
code(doc, view, announce);
|
|
37
39
|
if (doc.hasAttribute('data-rail'))
|
|
@@ -139,7 +141,11 @@ function code(doc, view, announce) {
|
|
|
139
141
|
});
|
|
140
142
|
}
|
|
141
143
|
}
|
|
142
|
-
/**
|
|
144
|
+
/**
|
|
145
|
+
* Marks the Brief contents link of the section in view: the last one whose heading reached the
|
|
146
|
+
* line where a followed link puts it. A followed link marks its own section while that heading
|
|
147
|
+
* stays on screen, so a section too short to reach the line is marked as well.
|
|
148
|
+
*/
|
|
143
149
|
function contents(nav, view) {
|
|
144
150
|
const page = nav.ownerDocument;
|
|
145
151
|
const links = [...nav.querySelectorAll('a[href^="#"]')];
|
|
@@ -149,24 +155,94 @@ function contents(nav, view) {
|
|
|
149
155
|
});
|
|
150
156
|
if (targets.length === 0)
|
|
151
157
|
return;
|
|
158
|
+
const root = page.documentElement;
|
|
159
|
+
// The address holds a fragment percent-encoded, and an id holds it as written.
|
|
160
|
+
const fragment = () => (() => {
|
|
161
|
+
const hash = view.location.hash.slice(1);
|
|
162
|
+
try {
|
|
163
|
+
return decodeURIComponent(hash);
|
|
164
|
+
}
|
|
165
|
+
catch {
|
|
166
|
+
return hash;
|
|
167
|
+
}
|
|
168
|
+
})();
|
|
169
|
+
let chosen;
|
|
152
170
|
const mark = () => {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
171
|
+
// A followed link stops its heading below the scroll padding of the page and the scroll
|
|
172
|
+
// margin of the heading. The 4px covers fractional scroll positions.
|
|
173
|
+
const padding = Number.parseFloat(view.getComputedStyle(root).scrollPaddingTop) || 0;
|
|
174
|
+
let reading = 0;
|
|
175
|
+
targets.forEach((target, index) => {
|
|
176
|
+
const margin = Number.parseFloat(view.getComputedStyle(target).scrollMarginTop) || 0;
|
|
177
|
+
if (target.getBoundingClientRect().top <= padding + margin + 4)
|
|
178
|
+
reading = index;
|
|
179
|
+
});
|
|
180
|
+
// At the end of the page the last heading may never reach the line.
|
|
181
|
+
const end = view.scrollY > 0 && view.scrollY + view.innerHeight >= root.scrollHeight - 2;
|
|
182
|
+
if (chosen) {
|
|
183
|
+
const top = targets[chosen.index]?.getBoundingClientRect().top ?? -1;
|
|
184
|
+
const visible = top >= 0 && top < view.innerHeight;
|
|
185
|
+
chosen.arrived ||= visible;
|
|
186
|
+
// The choice ends when the reading position agrees with it, or when its heading leaves the
|
|
187
|
+
// screen or a later heading reaches the line. The heading starts off screen for a far link.
|
|
188
|
+
const agrees = reading === chosen.index && !end;
|
|
189
|
+
const left = chosen.arrived && (!visible || reading > chosen.index);
|
|
190
|
+
if (agrees || left)
|
|
191
|
+
chosen = undefined;
|
|
192
|
+
}
|
|
193
|
+
const current = targets[chosen?.index ?? (end ? targets.length - 1 : reading)];
|
|
157
194
|
for (const anchor of links)
|
|
158
195
|
anchor.setAttribute('aria-current', String(anchor.getAttribute('href') === '#' + current?.id));
|
|
159
196
|
};
|
|
160
|
-
|
|
197
|
+
const choose = (id) => {
|
|
198
|
+
const index = targets.findIndex((target) => target.id === id);
|
|
199
|
+
chosen = index < 0 ? undefined : { arrived: false, index };
|
|
200
|
+
mark();
|
|
201
|
+
};
|
|
202
|
+
// A choice whose heading is not on screen once the page is at rest went somewhere else.
|
|
203
|
+
const settle = () => {
|
|
204
|
+
mark();
|
|
205
|
+
if (chosen && !chosen.arrived)
|
|
206
|
+
chosen = undefined;
|
|
207
|
+
mark();
|
|
208
|
+
};
|
|
209
|
+
// Only a plain click scrolls this page. A click with a modifier opens the link somewhere else.
|
|
210
|
+
for (const anchor of links)
|
|
211
|
+
anchor.addEventListener('click', (event) => {
|
|
212
|
+
const modified = event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;
|
|
213
|
+
if (event.button !== 0 || modified || event.defaultPrevented)
|
|
214
|
+
return;
|
|
215
|
+
choose((anchor.getAttribute('href') ?? '').slice(1));
|
|
216
|
+
});
|
|
217
|
+
// The address also changes on Back and Forward, after the page scrolls. The event of a followed
|
|
218
|
+
// link is late, and its choice may have ended by then.
|
|
219
|
+
view.addEventListener('hashchange', () => {
|
|
220
|
+
const id = fragment();
|
|
221
|
+
if (targets[chosen?.index ?? -1]?.id === id)
|
|
222
|
+
return;
|
|
223
|
+
choose(id);
|
|
224
|
+
settle();
|
|
225
|
+
});
|
|
161
226
|
view.addEventListener('scroll', () => view.requestAnimationFrame(mark), { passive: true });
|
|
227
|
+
view.addEventListener('scrollend', settle);
|
|
228
|
+
// The browser may scroll to the fragment of the address after this script runs.
|
|
229
|
+
choose(fragment());
|
|
230
|
+
if (page.readyState === 'complete')
|
|
231
|
+
settle();
|
|
232
|
+
else
|
|
233
|
+
view.addEventListener('load', settle, { once: true });
|
|
162
234
|
}
|
|
163
235
|
/**
|
|
164
236
|
* Turns each `span.sn > small` into a numbered button with a popover, and lists the notes at the
|
|
165
|
-
* end. Escape closes the open note and returns focus to its button.
|
|
237
|
+
* end. Escape closes the open note and returns focus to its button. The notes of a Brief summary
|
|
238
|
+
* take the first numbers, since the summary is at the top of the page.
|
|
166
239
|
*/
|
|
167
|
-
function notes(doc, view) {
|
|
240
|
+
function notes(doc, view, summary) {
|
|
168
241
|
const page = doc.ownerDocument;
|
|
169
|
-
const
|
|
242
|
+
const roots = summary ? [summary, doc] : [doc];
|
|
243
|
+
const items = roots
|
|
244
|
+
.flatMap((root) => [...root.querySelectorAll('.sn')])
|
|
245
|
+
.flatMap((note) => {
|
|
170
246
|
const small = note.querySelector(':scope > small');
|
|
171
247
|
return small ? [{ note, small }] : [];
|
|
172
248
|
});
|
|
@@ -180,20 +256,30 @@ function notes(doc, view) {
|
|
|
180
256
|
open.button.setAttribute('aria-expanded', 'false');
|
|
181
257
|
open = undefined;
|
|
182
258
|
};
|
|
259
|
+
const place = (note, button, small) => {
|
|
260
|
+
// The open note is positioned against its containing block: the nearest positioned ancestor
|
|
261
|
+
// (the article.doc), or the window for a note in the sticky summary. That note is fixed, so
|
|
262
|
+
// the scroll box of the summary does not clip it.
|
|
263
|
+
const fixed = view.getComputedStyle(small).position === 'fixed';
|
|
264
|
+
const frame = fixed ? { left: 0, top: 0 } : (small.offsetParent ?? doc).getBoundingClientRect();
|
|
265
|
+
const anchor = button.getBoundingClientRect();
|
|
266
|
+
const width = Math.min(320, view.innerWidth - 40);
|
|
267
|
+
const x = Math.max(20 - frame.left, Math.min(anchor.left - frame.left - 16, view.innerWidth - 20 - width - frame.left));
|
|
268
|
+
// A fixed note does not scroll into view, so it opens above its number when the window has
|
|
269
|
+
// no room below.
|
|
270
|
+
const below = anchor.bottom + 8;
|
|
271
|
+
const above = Math.max(8, anchor.top - 8 - small.offsetHeight);
|
|
272
|
+
const y = fixed && below + small.offsetHeight > view.innerHeight - 8 ? above : below;
|
|
273
|
+
note.style.setProperty('--pop-x', x + 'px');
|
|
274
|
+
note.style.setProperty('--pop-y', y - frame.top + 'px');
|
|
275
|
+
};
|
|
183
276
|
const show = (note, button, small) => {
|
|
184
277
|
if (open && open.note !== note)
|
|
185
278
|
close();
|
|
186
279
|
note.classList.add('open');
|
|
187
280
|
button.setAttribute('aria-expanded', 'true');
|
|
188
|
-
open = { button, note };
|
|
189
|
-
|
|
190
|
-
// ancestor (the article.doc), so measure from that box.
|
|
191
|
-
const frame = (small.offsetParent ?? doc).getBoundingClientRect();
|
|
192
|
-
const anchor = button.getBoundingClientRect();
|
|
193
|
-
const width = Math.min(320, view.innerWidth - 40);
|
|
194
|
-
const x = Math.max(20 - frame.left, Math.min(anchor.left - frame.left - 16, view.innerWidth - 20 - width - frame.left));
|
|
195
|
-
note.style.setProperty('--pop-x', x + 'px');
|
|
196
|
-
note.style.setProperty('--pop-y', anchor.bottom - frame.top + 8 + 'px');
|
|
281
|
+
open = { button, note, small };
|
|
282
|
+
place(note, button, small);
|
|
197
283
|
};
|
|
198
284
|
const list = page.createElement('ol');
|
|
199
285
|
items.forEach((item, index) => {
|
|
@@ -201,6 +287,7 @@ function notes(doc, view) {
|
|
|
201
287
|
const number = String(index + 1);
|
|
202
288
|
small.id ||= 'note-' + number;
|
|
203
289
|
small.setAttribute('role', 'note');
|
|
290
|
+
small.dataset['note'] = number;
|
|
204
291
|
const button = page.createElement('button');
|
|
205
292
|
button.type = 'button';
|
|
206
293
|
button.className = 'sn-ref';
|
|
@@ -237,6 +324,9 @@ function notes(doc, view) {
|
|
|
237
324
|
if (open && !open.note.contains(event.target))
|
|
238
325
|
close();
|
|
239
326
|
});
|
|
327
|
+
// A fixed note does not move with its number, so place it again when anything scrolls.
|
|
328
|
+
if (summary)
|
|
329
|
+
view.addEventListener('scroll', () => view.requestAnimationFrame(() => open && place(open.note, open.button, open.small)), { capture: true, passive: true });
|
|
240
330
|
page.addEventListener('keydown', (event) => {
|
|
241
331
|
if (event.key !== 'Escape' || !open)
|
|
242
332
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Enhance.js","sourceRoot":"","sources":["../../src/document/Enhance.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,wGAAwG;AACxG,2CAA2C;AAC3C,MAAM,IAAI,GACR,0DAA0D;IAC1D,2xCAA2xC;IAC3xC,4QAA4Q;IAC5Q,ixCAAixC;IACjxC,QAAQ,CAAA;AAEV,wEAAwE;AACxE,MAAM,MAAM,GAAG,IAA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AAC,IAAY;IACxB,OAAO,IAAI;SACR,WAAW,EAAE;SACb,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC;SAC3B,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAA;AAC1B,CAAC"}
|
|
@@ -102,9 +102,15 @@ h1 { font-family: Pilat, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", R
|
|
|
102
102
|
.dek { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 16px; font-weight: 400; letter-spacing: -.18px; line-height: 22px; color: var(--doc-content-secondary); margin: 0 0 1rem; text-wrap: pretty; }
|
|
103
103
|
.byline { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 12px; font-weight: 400; letter-spacing: 0px; line-height: 16px; color: var(--doc-content-secondary); margin: 0; }
|
|
104
104
|
|
|
105
|
-
/* Headings: Pilat for the title
|
|
105
|
+
/* Headings: Pilat for the title, the article's H2s, and big numbers. Inter everywhere else. No H4. */
|
|
106
106
|
h2 { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 14px; font-weight: 500; letter-spacing: -.09px; line-height: 22px; margin: 2.5rem 0 0.75rem; text-wrap: balance; }
|
|
107
107
|
.doc > h2 { font-family: Pilat, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif; font-size: 20px; font-weight: 500; letter-spacing: -.3px; line-height: 23px; color: var(--doc-content-primary); }
|
|
108
|
+
/* A rule opens each section of a Brief after the first, so a section after a long list reads as new. */
|
|
109
|
+
.brief > .doc > * + h2 { margin-top: 1.25rem; padding-top: 1.75rem; border-top: 1px solid var(--doc-line-primary); }
|
|
110
|
+
/* A note ends on its own rule, which already closes the section. */
|
|
111
|
+
.brief > .doc > .note + h2 { margin-top: 0.75rem; padding-top: 0; border-top: 0; }
|
|
112
|
+
/* The section rules frame the big numbers of a Brief, which drop their own. */
|
|
113
|
+
.brief > .doc > .figures { border-block: 0; padding-block: 0.5rem 0.25rem; }
|
|
108
114
|
h3 { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 14px; font-weight: 500; letter-spacing: -.09px; line-height: 22px; margin: 1.5rem 0 0.25rem; }
|
|
109
115
|
p, li { text-wrap: pretty; }
|
|
110
116
|
p { margin: 0 0 1rem; }
|
|
@@ -161,11 +167,14 @@ svg .fill-line { fill: var(--doc-line-primary); }
|
|
|
161
167
|
.chart-plot { min-width: calc(var(--bars, 0) * var(--doc-bar-min)); }
|
|
162
168
|
.chart-plot > svg { display: block; width: 100%; height: 12rem; }
|
|
163
169
|
|
|
164
|
-
/* Big numbers: a
|
|
165
|
-
.figures { display:
|
|
166
|
-
.figures
|
|
167
|
-
.figures
|
|
168
|
-
.figures
|
|
170
|
+
/* Big numbers: two to six, each above its label. A second dd is a line about the number. */
|
|
171
|
+
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); gap: 1.5rem 2rem; padding-block: 1.25rem; border-block: 1px solid var(--doc-line-primary); }
|
|
172
|
+
.figures:has(dd ~ dd) { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
|
|
173
|
+
.figures > div { display: flex; flex-direction: column; min-width: 0; }
|
|
174
|
+
.figures dt { order: 1; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 12px; font-weight: 400; letter-spacing: .01px; line-height: 16px; color: var(--doc-content-secondary); }
|
|
175
|
+
.figures dd { margin: 0 0 0.25rem; font-family: Pilat, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif; font-size: 24px; font-weight: 500; letter-spacing: -.36px; line-height: 27.6px; color: var(--doc-content-primary); font-variant-numeric: tabular-nums; }
|
|
176
|
+
.figures dd ~ dd { order: 2; margin: 0.375rem 0 0; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 12px; font-weight: 400; letter-spacing: .01px; line-height: 16px; color: var(--doc-content-secondary); font-variant-numeric: normal; }
|
|
177
|
+
.figures dd ~ dd b, .figures dd ~ dd strong { color: var(--doc-content-primary); }
|
|
169
178
|
|
|
170
179
|
/* Tables: one size for every cell. Row titles primary and medium, descriptions secondary and regular. */
|
|
171
180
|
table { width: 100%; border-collapse: collapse; }
|
|
@@ -188,9 +197,9 @@ table.results td.outcome { white-space: nowrap; }
|
|
|
188
197
|
.sn > small::after { content: ")"; }
|
|
189
198
|
.sn-ref {
|
|
190
199
|
all: unset; cursor: pointer; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 12px; font-weight: 500; letter-spacing: .01px; line-height: 16px; vertical-align: super; line-height: 0;
|
|
191
|
-
padding: 0.35em 0.2em; margin: -0.35em 0; color: var(--doc-content-
|
|
200
|
+
padding: 0.35em 0.2em; margin: -0.35em 0; color: var(--doc-content-secondary); border-radius: var(--doc-radius-3xs);
|
|
192
201
|
}
|
|
193
|
-
.sn-ref:hover, .sn-ref[aria-expanded="true"] { text-decoration: underline; text-underline-offset: 0.2em; }
|
|
202
|
+
.sn-ref:hover, .sn-ref[aria-expanded="true"] { color: var(--doc-content-primary); text-decoration: underline; text-underline-offset: 0.2em; }
|
|
194
203
|
.sn-ref:focus-visible { outline: 2px solid var(--doc-border-focus); outline-offset: 1px; }
|
|
195
204
|
.js .sn > small { display: none; }
|
|
196
205
|
.js .sn.open > small {
|
|
@@ -199,7 +208,7 @@ table.results td.outcome { white-space: nowrap; }
|
|
|
199
208
|
background: var(--doc-background-elevated); box-shadow: var(--doc-shadow-regular); color: var(--doc-content-primary);
|
|
200
209
|
animation: doc-pop 200ms var(--doc-ease-snappy);
|
|
201
210
|
}
|
|
202
|
-
.js .sn.open > small::before { content:
|
|
211
|
+
.js .sn.open > small::before { content: attr(data-note) "\2002"; color: var(--doc-content-secondary); }
|
|
203
212
|
.js .sn.open > small::after { content: none; }
|
|
204
213
|
@keyframes doc-pop { from { opacity: 0; transform: scale(0.96); } }
|
|
205
214
|
.footnotes { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 12px; font-weight: 400; letter-spacing: .01px; line-height: 16px; color: var(--doc-content-secondary); }
|
|
@@ -237,6 +246,7 @@ h2:hover .h-anchor, h3:hover .h-anchor, .h-anchor:focus-visible, .h-anchor[data-
|
|
|
237
246
|
/* Timeline: Chronology, dates hanging left of the column */
|
|
238
247
|
.chronology { list-style: none; padding: 0; }
|
|
239
248
|
.chronology > li { position: relative; margin: 0 0 1rem; }
|
|
249
|
+
.chronology > li:last-child { margin-bottom: 0; }
|
|
240
250
|
.chronology > li > time { display: block; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 12px; font-weight: 400; letter-spacing: .01px; line-height: 16px; padding-top: 2px; color: var(--doc-content-secondary); font-variant-numeric: tabular-nums; }
|
|
241
251
|
.chronology > li > p { margin: 0; }
|
|
242
252
|
|
|
@@ -313,11 +323,14 @@ h2:hover .h-anchor, h3:hover .h-anchor, .h-anchor:focus-visible, .h-anchor[data-
|
|
|
313
323
|
[page-end screen-end];
|
|
314
324
|
}
|
|
315
325
|
.brief > .summary { grid-area: side; }
|
|
316
|
-
.summary { position: sticky; top: 2rem; align-self: start; border-top: 1px solid var(--doc-content-primary); padding-top: 0.75rem; }
|
|
326
|
+
.summary { position: sticky; top: 2rem; align-self: start; max-height: calc(100vh - 4rem); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; border-top: 1px solid var(--doc-content-primary); padding-top: 0.75rem; }
|
|
317
327
|
.summary dl { margin: 0; }
|
|
318
328
|
.summary dd { margin: 0; }
|
|
319
|
-
|
|
320
|
-
.summary .
|
|
329
|
+
/* The summary is outside the article that counts the notes, so its inline notes have no number. */
|
|
330
|
+
.summary .sn > small::before { content: " ("; }
|
|
331
|
+
.summary .facts { display: grid; grid-template-columns: fit-content(5.5rem) 1fr; column-gap: 0.75rem; }
|
|
332
|
+
.summary .facts > div { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; padding-block: 0.5rem; border-bottom: 1px solid var(--doc-line-secondary); }
|
|
333
|
+
.summary .facts dt { min-width: 4.5rem; color: var(--doc-content-primary); font-weight: 500; }
|
|
321
334
|
.summary .facts dd { color: var(--doc-content-secondary); }
|
|
322
335
|
.summary nav { margin-top: 1.75rem; }
|
|
323
336
|
.summary nav h2 { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 12px; font-weight: 500; letter-spacing: .01px; line-height: 16px; color: var(--doc-content-secondary); margin: 0 0 0.5rem; }
|
|
@@ -333,6 +346,7 @@ ol.steps > li { counter-increment: step; position: relative; padding-left: 2rem;
|
|
|
333
346
|
ol.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 1.375rem; text-align: center; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 12px; font-weight: 500; letter-spacing: .01px; line-height: 16px; line-height: 1.375rem; border-radius: var(--doc-radius-full); background: var(--doc-container-regular); color: var(--doc-content-primary); }
|
|
334
347
|
|
|
335
348
|
@media (min-width: 1024px) {
|
|
349
|
+
.js .summary .sn.open > small { position: fixed; }
|
|
336
350
|
.chronology > li > time { position: absolute; right: calc(100% + 1.5rem); top: 0; width: calc(2 * var(--doc-hang) - 1.5rem); text-align: right; white-space: nowrap; }
|
|
337
351
|
.doc[data-rail] { --doc-edge: 3.5rem; }
|
|
338
352
|
}
|
|
@@ -345,7 +359,7 @@ ol.steps > li::before { content: counter(step); position: absolute; left: 0; top
|
|
|
345
359
|
.brief { grid-template-columns: minmax(var(--doc-edge), 1fr) minmax(0, var(--doc-measure)) minmax(var(--doc-edge), 1fr); grid-template-areas: ". head ." ". side ." ". main ."; grid-template-rows: auto; padding-top: 3rem; }
|
|
346
360
|
.brief > header { padding-left: 0; margin-bottom: 1.5rem; }
|
|
347
361
|
.brief > .doc { grid-template-columns: [screen-start page-start outset-start body-start] minmax(0, 1fr) [body-end outset-end page-end screen-end]; }
|
|
348
|
-
.summary { position: static; margin-bottom: 1rem; border-bottom: 1px solid var(--doc-line-primary); padding-bottom: 0.5rem; }
|
|
362
|
+
.summary { position: static; max-height: none; overflow: visible; margin-bottom: 1rem; border-bottom: 1px solid var(--doc-line-primary); padding-bottom: 0.5rem; }
|
|
349
363
|
.summary .facts > div:last-child { border-bottom: 0; }
|
|
350
364
|
.summary nav { display: none; }
|
|
351
365
|
}
|
|
@@ -370,4 +384,5 @@ ol.steps > li::before { content: counter(step); position: absolute; left: 0; top
|
|
|
370
384
|
}
|
|
371
385
|
@media print {
|
|
372
386
|
.rail, .summary nav, .h-anchor, .copy { display: none; }
|
|
387
|
+
.summary { position: static; max-height: none; overflow: visible; }
|
|
373
388
|
}
|
package/dist/document/script.js
CHANGED
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
live.textContent = message;
|
|
21
21
|
};
|
|
22
22
|
for (const doc of page.querySelectorAll(".doc")) {
|
|
23
|
-
|
|
23
|
+
const summary = doc.closest(".brief")?.querySelector(":scope > .summary");
|
|
24
|
+
notes(doc, view, summary ?? void 0);
|
|
24
25
|
anchors(doc, view, announce);
|
|
25
26
|
code(doc, view, announce);
|
|
26
27
|
if (doc.hasAttribute("data-rail")) rail(doc, view);
|
|
@@ -113,7 +114,11 @@
|
|
|
113
114
|
});
|
|
114
115
|
}
|
|
115
116
|
}
|
|
116
|
-
/**
|
|
117
|
+
/**
|
|
118
|
+
* Marks the Brief contents link of the section in view: the last one whose heading reached the
|
|
119
|
+
* line where a followed link puts it. A followed link marks its own section while that heading
|
|
120
|
+
* stays on screen, so a section too short to reach the line is marked as well.
|
|
121
|
+
*/
|
|
117
122
|
function contents(nav, view) {
|
|
118
123
|
const page = nav.ownerDocument;
|
|
119
124
|
const links = [...nav.querySelectorAll("a[href^=\"#\"]")];
|
|
@@ -122,21 +127,73 @@
|
|
|
122
127
|
return target ? [target] : [];
|
|
123
128
|
});
|
|
124
129
|
if (targets.length === 0) return;
|
|
130
|
+
const root = page.documentElement;
|
|
131
|
+
const fragment = () => (() => {
|
|
132
|
+
const hash = view.location.hash.slice(1);
|
|
133
|
+
try {
|
|
134
|
+
return decodeURIComponent(hash);
|
|
135
|
+
} catch {
|
|
136
|
+
return hash;
|
|
137
|
+
}
|
|
138
|
+
})();
|
|
139
|
+
let chosen;
|
|
125
140
|
const mark = () => {
|
|
126
|
-
|
|
127
|
-
|
|
141
|
+
const padding = Number.parseFloat(view.getComputedStyle(root).scrollPaddingTop) || 0;
|
|
142
|
+
let reading = 0;
|
|
143
|
+
targets.forEach((target, index) => {
|
|
144
|
+
const margin = Number.parseFloat(view.getComputedStyle(target).scrollMarginTop) || 0;
|
|
145
|
+
if (target.getBoundingClientRect().top <= padding + margin + 4) reading = index;
|
|
146
|
+
});
|
|
147
|
+
const end = view.scrollY > 0 && view.scrollY + view.innerHeight >= root.scrollHeight - 2;
|
|
148
|
+
if (chosen) {
|
|
149
|
+
const top = targets[chosen.index]?.getBoundingClientRect().top ?? -1;
|
|
150
|
+
const visible = top >= 0 && top < view.innerHeight;
|
|
151
|
+
chosen.arrived ||= visible;
|
|
152
|
+
const agrees = reading === chosen.index && !end;
|
|
153
|
+
const left = chosen.arrived && (!visible || reading > chosen.index);
|
|
154
|
+
if (agrees || left) chosen = void 0;
|
|
155
|
+
}
|
|
156
|
+
const current = targets[chosen?.index ?? (end ? targets.length - 1 : reading)];
|
|
128
157
|
for (const anchor of links) anchor.setAttribute("aria-current", String(anchor.getAttribute("href") === "#" + current?.id));
|
|
129
158
|
};
|
|
130
|
-
|
|
159
|
+
const choose = (id) => {
|
|
160
|
+
const index = targets.findIndex((target) => target.id === id);
|
|
161
|
+
chosen = index < 0 ? void 0 : {
|
|
162
|
+
arrived: false,
|
|
163
|
+
index
|
|
164
|
+
};
|
|
165
|
+
mark();
|
|
166
|
+
};
|
|
167
|
+
const settle = () => {
|
|
168
|
+
mark();
|
|
169
|
+
if (chosen && !chosen.arrived) chosen = void 0;
|
|
170
|
+
mark();
|
|
171
|
+
};
|
|
172
|
+
for (const anchor of links) anchor.addEventListener("click", (event) => {
|
|
173
|
+
const modified = event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;
|
|
174
|
+
if (event.button !== 0 || modified || event.defaultPrevented) return;
|
|
175
|
+
choose((anchor.getAttribute("href") ?? "").slice(1));
|
|
176
|
+
});
|
|
177
|
+
view.addEventListener("hashchange", () => {
|
|
178
|
+
const id = fragment();
|
|
179
|
+
if (targets[chosen?.index ?? -1]?.id === id) return;
|
|
180
|
+
choose(id);
|
|
181
|
+
settle();
|
|
182
|
+
});
|
|
131
183
|
view.addEventListener("scroll", () => view.requestAnimationFrame(mark), { passive: true });
|
|
184
|
+
view.addEventListener("scrollend", settle);
|
|
185
|
+
choose(fragment());
|
|
186
|
+
if (page.readyState === "complete") settle();
|
|
187
|
+
else view.addEventListener("load", settle, { once: true });
|
|
132
188
|
}
|
|
133
189
|
/**
|
|
134
190
|
* Turns each `span.sn > small` into a numbered button with a popover, and lists the notes at the
|
|
135
|
-
* end. Escape closes the open note and returns focus to its button.
|
|
191
|
+
* end. Escape closes the open note and returns focus to its button. The notes of a Brief summary
|
|
192
|
+
* take the first numbers, since the summary is at the top of the page.
|
|
136
193
|
*/
|
|
137
|
-
function notes(doc, view) {
|
|
194
|
+
function notes(doc, view, summary) {
|
|
138
195
|
const page = doc.ownerDocument;
|
|
139
|
-
const items = [
|
|
196
|
+
const items = (summary ? [summary, doc] : [doc]).flatMap((root) => [...root.querySelectorAll(".sn")]).flatMap((note) => {
|
|
140
197
|
const small = note.querySelector(":scope > small");
|
|
141
198
|
return small ? [{
|
|
142
199
|
note,
|
|
@@ -151,20 +208,31 @@
|
|
|
151
208
|
open.button.setAttribute("aria-expanded", "false");
|
|
152
209
|
open = void 0;
|
|
153
210
|
};
|
|
211
|
+
const place = (note, button, small) => {
|
|
212
|
+
const fixed = view.getComputedStyle(small).position === "fixed";
|
|
213
|
+
const frame = fixed ? {
|
|
214
|
+
left: 0,
|
|
215
|
+
top: 0
|
|
216
|
+
} : (small.offsetParent ?? doc).getBoundingClientRect();
|
|
217
|
+
const anchor = button.getBoundingClientRect();
|
|
218
|
+
const width = Math.min(320, view.innerWidth - 40);
|
|
219
|
+
const x = Math.max(20 - frame.left, Math.min(anchor.left - frame.left - 16, view.innerWidth - 20 - width - frame.left));
|
|
220
|
+
const below = anchor.bottom + 8;
|
|
221
|
+
const above = Math.max(8, anchor.top - 8 - small.offsetHeight);
|
|
222
|
+
const y = fixed && below + small.offsetHeight > view.innerHeight - 8 ? above : below;
|
|
223
|
+
note.style.setProperty("--pop-x", x + "px");
|
|
224
|
+
note.style.setProperty("--pop-y", y - frame.top + "px");
|
|
225
|
+
};
|
|
154
226
|
const show = (note, button, small) => {
|
|
155
227
|
if (open && open.note !== note) close();
|
|
156
228
|
note.classList.add("open");
|
|
157
229
|
button.setAttribute("aria-expanded", "true");
|
|
158
230
|
open = {
|
|
159
231
|
button,
|
|
160
|
-
note
|
|
232
|
+
note,
|
|
233
|
+
small
|
|
161
234
|
};
|
|
162
|
-
|
|
163
|
-
const anchor = button.getBoundingClientRect();
|
|
164
|
-
const width = Math.min(320, view.innerWidth - 40);
|
|
165
|
-
const x = Math.max(20 - frame.left, Math.min(anchor.left - frame.left - 16, view.innerWidth - 20 - width - frame.left));
|
|
166
|
-
note.style.setProperty("--pop-x", x + "px");
|
|
167
|
-
note.style.setProperty("--pop-y", anchor.bottom - frame.top + 8 + "px");
|
|
235
|
+
place(note, button, small);
|
|
168
236
|
};
|
|
169
237
|
const list = page.createElement("ol");
|
|
170
238
|
items.forEach((item, index) => {
|
|
@@ -172,6 +240,7 @@
|
|
|
172
240
|
const number = String(index + 1);
|
|
173
241
|
small.id ||= "note-" + number;
|
|
174
242
|
small.setAttribute("role", "note");
|
|
243
|
+
small.dataset["note"] = number;
|
|
175
244
|
const button = page.createElement("button");
|
|
176
245
|
button.type = "button";
|
|
177
246
|
button.className = "sn-ref";
|
|
@@ -203,6 +272,10 @@
|
|
|
203
272
|
page.addEventListener("click", (event) => {
|
|
204
273
|
if (open && !open.note.contains(event.target)) close();
|
|
205
274
|
});
|
|
275
|
+
if (summary) view.addEventListener("scroll", () => view.requestAnimationFrame(() => open && place(open.note, open.button, open.small)), {
|
|
276
|
+
capture: true,
|
|
277
|
+
passive: true
|
|
278
|
+
});
|
|
206
279
|
page.addEventListener("keydown", (event) => {
|
|
207
280
|
if (event.key !== "Escape" || !open) return;
|
|
208
281
|
const { button, note } = open;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<!--
|
|
3
3
|
Brief template for Tempo document mode. Replace every placeholder that a comment marks,
|
|
4
4
|
keep the structure, and run the lint before you publish:
|
|
5
|
-
npx -p @tempoxyz/ds@0.3.
|
|
5
|
+
npx -p @tempoxyz/ds@0.3.18 tempo-document lint brief.html
|
|
6
6
|
-->
|
|
7
7
|
<html lang="en">
|
|
8
8
|
<head>
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
<title>Title of the brief</title>
|
|
13
13
|
<link
|
|
14
14
|
rel="stylesheet"
|
|
15
|
-
href="https://cdn.jsdelivr.net/npm/@tempoxyz/ds@0.3.
|
|
15
|
+
href="https://cdn.jsdelivr.net/npm/@tempoxyz/ds@0.3.18/dist/document/document.css"
|
|
16
16
|
/>
|
|
17
17
|
<script
|
|
18
18
|
defer
|
|
19
|
-
src="https://cdn.jsdelivr.net/npm/@tempoxyz/ds@0.3.
|
|
19
|
+
src="https://cdn.jsdelivr.net/npm/@tempoxyz/ds@0.3.18/dist/document/script.js"
|
|
20
20
|
></script>
|
|
21
21
|
</head>
|
|
22
22
|
<body>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<!--
|
|
3
3
|
Essay template for Tempo document mode. Replace every placeholder that a comment marks,
|
|
4
4
|
keep the structure, and run the lint before you publish:
|
|
5
|
-
npx -p @tempoxyz/ds@0.3.
|
|
5
|
+
npx -p @tempoxyz/ds@0.3.18 tempo-document lint essay.html
|
|
6
6
|
-->
|
|
7
7
|
<html lang="en">
|
|
8
8
|
<head>
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
<title>Title of the essay</title>
|
|
13
13
|
<link
|
|
14
14
|
rel="stylesheet"
|
|
15
|
-
href="https://cdn.jsdelivr.net/npm/@tempoxyz/ds@0.3.
|
|
15
|
+
href="https://cdn.jsdelivr.net/npm/@tempoxyz/ds@0.3.18/dist/document/document.css"
|
|
16
16
|
/>
|
|
17
17
|
<script
|
|
18
18
|
defer
|
|
19
|
-
src="https://cdn.jsdelivr.net/npm/@tempoxyz/ds@0.3.
|
|
19
|
+
src="https://cdn.jsdelivr.net/npm/@tempoxyz/ds@0.3.18/dist/document/script.js"
|
|
20
20
|
></script>
|
|
21
21
|
</head>
|
|
22
22
|
<body>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<!--
|
|
3
3
|
Post template for Tempo document mode. Replace every placeholder that a comment marks,
|
|
4
4
|
keep the structure, and run the lint before you publish:
|
|
5
|
-
npx -p @tempoxyz/ds@0.3.
|
|
5
|
+
npx -p @tempoxyz/ds@0.3.18 tempo-document lint post.html
|
|
6
6
|
-->
|
|
7
7
|
<html lang="en">
|
|
8
8
|
<head>
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
<title>Title of the post</title>
|
|
13
13
|
<link
|
|
14
14
|
rel="stylesheet"
|
|
15
|
-
href="https://cdn.jsdelivr.net/npm/@tempoxyz/ds@0.3.
|
|
15
|
+
href="https://cdn.jsdelivr.net/npm/@tempoxyz/ds@0.3.18/dist/document/document.css"
|
|
16
16
|
/>
|
|
17
17
|
<script
|
|
18
18
|
defer
|
|
19
|
-
src="https://cdn.jsdelivr.net/npm/@tempoxyz/ds@0.3.
|
|
19
|
+
src="https://cdn.jsdelivr.net/npm/@tempoxyz/ds@0.3.18/dist/document/script.js"
|
|
20
20
|
></script>
|
|
21
21
|
</head>
|
|
22
22
|
<body>
|
package/package.json
CHANGED
package/src/document/Enhance.ts
CHANGED
|
@@ -36,7 +36,9 @@ export function run(page: Document): void {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
for (const doc of page.querySelectorAll<HTMLElement>('.doc')) {
|
|
39
|
-
|
|
39
|
+
// The summary of a Brief is a sibling of its article, and its notes join the article's notes.
|
|
40
|
+
const summary = doc.closest('.brief')?.querySelector<HTMLElement>(':scope > .summary')
|
|
41
|
+
notes(doc, view, summary ?? undefined)
|
|
40
42
|
anchors(doc, view, announce)
|
|
41
43
|
code(doc, view, announce)
|
|
42
44
|
if (doc.hasAttribute('data-rail')) rail(doc, view)
|
|
@@ -146,7 +148,11 @@ function code(doc: HTMLElement, view: Window, announce: (message: string) => voi
|
|
|
146
148
|
}
|
|
147
149
|
}
|
|
148
150
|
|
|
149
|
-
/**
|
|
151
|
+
/**
|
|
152
|
+
* Marks the Brief contents link of the section in view: the last one whose heading reached the
|
|
153
|
+
* line where a followed link puts it. A followed link marks its own section while that heading
|
|
154
|
+
* stays on screen, so a section too short to reach the line is marked as well.
|
|
155
|
+
*/
|
|
150
156
|
function contents(nav: HTMLElement, view: Window) {
|
|
151
157
|
const page = nav.ownerDocument
|
|
152
158
|
const links = [...nav.querySelectorAll<HTMLAnchorElement>('a[href^="#"]')]
|
|
@@ -156,52 +162,136 @@ function contents(nav: HTMLElement, view: Window) {
|
|
|
156
162
|
})
|
|
157
163
|
if (targets.length === 0) return
|
|
158
164
|
|
|
165
|
+
const root = page.documentElement
|
|
166
|
+
// The address holds a fragment percent-encoded, and an id holds it as written.
|
|
167
|
+
const fragment = () =>
|
|
168
|
+
(() => {
|
|
169
|
+
const hash = view.location.hash.slice(1)
|
|
170
|
+
try {
|
|
171
|
+
return decodeURIComponent(hash)
|
|
172
|
+
} catch {
|
|
173
|
+
return hash
|
|
174
|
+
}
|
|
175
|
+
})()
|
|
176
|
+
|
|
177
|
+
type Choice = { arrived: boolean; index: number }
|
|
178
|
+
let chosen: Choice | undefined
|
|
179
|
+
|
|
159
180
|
const mark = () => {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
181
|
+
// A followed link stops its heading below the scroll padding of the page and the scroll
|
|
182
|
+
// margin of the heading. The 4px covers fractional scroll positions.
|
|
183
|
+
const padding = Number.parseFloat(view.getComputedStyle(root).scrollPaddingTop) || 0
|
|
184
|
+
let reading = 0
|
|
185
|
+
targets.forEach((target, index) => {
|
|
186
|
+
const margin = Number.parseFloat(view.getComputedStyle(target).scrollMarginTop) || 0
|
|
187
|
+
if (target.getBoundingClientRect().top <= padding + margin + 4) reading = index
|
|
188
|
+
})
|
|
189
|
+
// At the end of the page the last heading may never reach the line.
|
|
190
|
+
const end = view.scrollY > 0 && view.scrollY + view.innerHeight >= root.scrollHeight - 2
|
|
191
|
+
|
|
192
|
+
if (chosen) {
|
|
193
|
+
const top = targets[chosen.index]?.getBoundingClientRect().top ?? -1
|
|
194
|
+
const visible = top >= 0 && top < view.innerHeight
|
|
195
|
+
chosen.arrived ||= visible
|
|
196
|
+
|
|
197
|
+
// The choice ends when the reading position agrees with it, or when its heading leaves the
|
|
198
|
+
// screen or a later heading reaches the line. The heading starts off screen for a far link.
|
|
199
|
+
const agrees = reading === chosen.index && !end
|
|
200
|
+
const left = chosen.arrived && (!visible || reading > chosen.index)
|
|
201
|
+
if (agrees || left) chosen = undefined
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
const current = targets[chosen?.index ?? (end ? targets.length - 1 : reading)]
|
|
163
205
|
for (const anchor of links)
|
|
164
206
|
anchor.setAttribute('aria-current', String(anchor.getAttribute('href') === '#' + current?.id))
|
|
165
207
|
}
|
|
166
|
-
|
|
208
|
+
const choose = (id: string) => {
|
|
209
|
+
const index = targets.findIndex((target) => target.id === id)
|
|
210
|
+
chosen = index < 0 ? undefined : { arrived: false, index }
|
|
211
|
+
mark()
|
|
212
|
+
}
|
|
213
|
+
// A choice whose heading is not on screen once the page is at rest went somewhere else.
|
|
214
|
+
const settle = () => {
|
|
215
|
+
mark()
|
|
216
|
+
if (chosen && !chosen.arrived) chosen = undefined
|
|
217
|
+
mark()
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
// Only a plain click scrolls this page. A click with a modifier opens the link somewhere else.
|
|
221
|
+
for (const anchor of links)
|
|
222
|
+
anchor.addEventListener('click', (event) => {
|
|
223
|
+
const modified = event.altKey || event.ctrlKey || event.metaKey || event.shiftKey
|
|
224
|
+
if (event.button !== 0 || modified || event.defaultPrevented) return
|
|
225
|
+
|
|
226
|
+
choose((anchor.getAttribute('href') ?? '').slice(1))
|
|
227
|
+
})
|
|
228
|
+
// The address also changes on Back and Forward, after the page scrolls. The event of a followed
|
|
229
|
+
// link is late, and its choice may have ended by then.
|
|
230
|
+
view.addEventListener('hashchange', () => {
|
|
231
|
+
const id = fragment()
|
|
232
|
+
if (targets[chosen?.index ?? -1]?.id === id) return
|
|
233
|
+
|
|
234
|
+
choose(id)
|
|
235
|
+
settle()
|
|
236
|
+
})
|
|
167
237
|
view.addEventListener('scroll', () => view.requestAnimationFrame(mark), { passive: true })
|
|
238
|
+
view.addEventListener('scrollend', settle)
|
|
239
|
+
|
|
240
|
+
// The browser may scroll to the fragment of the address after this script runs.
|
|
241
|
+
choose(fragment())
|
|
242
|
+
if (page.readyState === 'complete') settle()
|
|
243
|
+
else view.addEventListener('load', settle, { once: true })
|
|
168
244
|
}
|
|
169
245
|
|
|
170
246
|
/**
|
|
171
247
|
* Turns each `span.sn > small` into a numbered button with a popover, and lists the notes at the
|
|
172
|
-
* end. Escape closes the open note and returns focus to its button.
|
|
248
|
+
* end. Escape closes the open note and returns focus to its button. The notes of a Brief summary
|
|
249
|
+
* take the first numbers, since the summary is at the top of the page.
|
|
173
250
|
*/
|
|
174
|
-
function notes(doc: HTMLElement, view: Window) {
|
|
251
|
+
function notes(doc: HTMLElement, view: Window, summary?: HTMLElement) {
|
|
175
252
|
const page = doc.ownerDocument
|
|
176
|
-
const
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
253
|
+
const roots = summary ? [summary, doc] : [doc]
|
|
254
|
+
const items = roots
|
|
255
|
+
.flatMap((root) => [...root.querySelectorAll<HTMLElement>('.sn')])
|
|
256
|
+
.flatMap((note) => {
|
|
257
|
+
const small = note.querySelector<HTMLElement>(':scope > small')
|
|
258
|
+
return small ? [{ note, small }] : []
|
|
259
|
+
})
|
|
180
260
|
if (items.length === 0) return
|
|
181
261
|
|
|
182
|
-
let open: { button: HTMLButtonElement; note: HTMLElement } | undefined
|
|
262
|
+
let open: { button: HTMLButtonElement; note: HTMLElement; small: HTMLElement } | undefined
|
|
183
263
|
const close = () => {
|
|
184
264
|
if (!open) return
|
|
185
265
|
open.note.classList.remove('open')
|
|
186
266
|
open.button.setAttribute('aria-expanded', 'false')
|
|
187
267
|
open = undefined
|
|
188
268
|
}
|
|
189
|
-
const
|
|
190
|
-
|
|
191
|
-
note.
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
// ancestor (the article.doc), so measure from that box.
|
|
196
|
-
const frame = (small.offsetParent ?? doc).getBoundingClientRect()
|
|
269
|
+
const place = (note: HTMLElement, button: HTMLButtonElement, small: HTMLElement) => {
|
|
270
|
+
// The open note is positioned against its containing block: the nearest positioned ancestor
|
|
271
|
+
// (the article.doc), or the window for a note in the sticky summary. That note is fixed, so
|
|
272
|
+
// the scroll box of the summary does not clip it.
|
|
273
|
+
const fixed = view.getComputedStyle(small).position === 'fixed'
|
|
274
|
+
const frame = fixed ? { left: 0, top: 0 } : (small.offsetParent ?? doc).getBoundingClientRect()
|
|
197
275
|
const anchor = button.getBoundingClientRect()
|
|
198
276
|
const width = Math.min(320, view.innerWidth - 40)
|
|
199
277
|
const x = Math.max(
|
|
200
278
|
20 - frame.left,
|
|
201
279
|
Math.min(anchor.left - frame.left - 16, view.innerWidth - 20 - width - frame.left),
|
|
202
280
|
)
|
|
281
|
+
// A fixed note does not scroll into view, so it opens above its number when the window has
|
|
282
|
+
// no room below.
|
|
283
|
+
const below = anchor.bottom + 8
|
|
284
|
+
const above = Math.max(8, anchor.top - 8 - small.offsetHeight)
|
|
285
|
+
const y = fixed && below + small.offsetHeight > view.innerHeight - 8 ? above : below
|
|
203
286
|
note.style.setProperty('--pop-x', x + 'px')
|
|
204
|
-
note.style.setProperty('--pop-y',
|
|
287
|
+
note.style.setProperty('--pop-y', y - frame.top + 'px')
|
|
288
|
+
}
|
|
289
|
+
const show = (note: HTMLElement, button: HTMLButtonElement, small: HTMLElement) => {
|
|
290
|
+
if (open && open.note !== note) close()
|
|
291
|
+
note.classList.add('open')
|
|
292
|
+
button.setAttribute('aria-expanded', 'true')
|
|
293
|
+
open = { button, note, small }
|
|
294
|
+
place(note, button, small)
|
|
205
295
|
}
|
|
206
296
|
|
|
207
297
|
const list = page.createElement('ol')
|
|
@@ -210,6 +300,7 @@ function notes(doc: HTMLElement, view: Window) {
|
|
|
210
300
|
const number = String(index + 1)
|
|
211
301
|
small.id ||= 'note-' + number
|
|
212
302
|
small.setAttribute('role', 'note')
|
|
303
|
+
small.dataset['note'] = number
|
|
213
304
|
|
|
214
305
|
const button = page.createElement('button')
|
|
215
306
|
button.type = 'button'
|
|
@@ -245,6 +336,13 @@ function notes(doc: HTMLElement, view: Window) {
|
|
|
245
336
|
page.addEventListener('click', (event) => {
|
|
246
337
|
if (open && !open.note.contains(event.target as Node)) close()
|
|
247
338
|
})
|
|
339
|
+
// A fixed note does not move with its number, so place it again when anything scrolls.
|
|
340
|
+
if (summary)
|
|
341
|
+
view.addEventListener(
|
|
342
|
+
'scroll',
|
|
343
|
+
() => view.requestAnimationFrame(() => open && place(open.note, open.button, open.small)),
|
|
344
|
+
{ capture: true, passive: true },
|
|
345
|
+
)
|
|
248
346
|
page.addEventListener('keydown', (event) => {
|
|
249
347
|
if (event.key !== 'Escape' || !open) return
|
|
250
348
|
const { button, note } = open
|
|
@@ -102,9 +102,15 @@ h1 { font-family: Pilat, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", R
|
|
|
102
102
|
.dek { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 16px; font-weight: 400; letter-spacing: -.18px; line-height: 22px; color: var(--doc-content-secondary); margin: 0 0 1rem; text-wrap: pretty; }
|
|
103
103
|
.byline { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 12px; font-weight: 400; letter-spacing: 0px; line-height: 16px; color: var(--doc-content-secondary); margin: 0; }
|
|
104
104
|
|
|
105
|
-
/* Headings: Pilat for the title
|
|
105
|
+
/* Headings: Pilat for the title, the article's H2s, and big numbers. Inter everywhere else. No H4. */
|
|
106
106
|
h2 { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 14px; font-weight: 500; letter-spacing: -.09px; line-height: 22px; margin: 2.5rem 0 0.75rem; text-wrap: balance; }
|
|
107
107
|
.doc > h2 { font-family: Pilat, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif; font-size: 20px; font-weight: 500; letter-spacing: -.3px; line-height: 23px; color: var(--doc-content-primary); }
|
|
108
|
+
/* A rule opens each section of a Brief after the first, so a section after a long list reads as new. */
|
|
109
|
+
.brief > .doc > * + h2 { margin-top: 1.25rem; padding-top: 1.75rem; border-top: 1px solid var(--doc-line-primary); }
|
|
110
|
+
/* A note ends on its own rule, which already closes the section. */
|
|
111
|
+
.brief > .doc > .note + h2 { margin-top: 0.75rem; padding-top: 0; border-top: 0; }
|
|
112
|
+
/* The section rules frame the big numbers of a Brief, which drop their own. */
|
|
113
|
+
.brief > .doc > .figures { border-block: 0; padding-block: 0.5rem 0.25rem; }
|
|
108
114
|
h3 { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 14px; font-weight: 500; letter-spacing: -.09px; line-height: 22px; margin: 1.5rem 0 0.25rem; }
|
|
109
115
|
p, li { text-wrap: pretty; }
|
|
110
116
|
p { margin: 0 0 1rem; }
|
|
@@ -161,11 +167,14 @@ svg .fill-line { fill: var(--doc-line-primary); }
|
|
|
161
167
|
.chart-plot { min-width: calc(var(--bars, 0) * var(--doc-bar-min)); }
|
|
162
168
|
.chart-plot > svg { display: block; width: 100%; height: 12rem; }
|
|
163
169
|
|
|
164
|
-
/* Big numbers: a
|
|
165
|
-
.figures { display:
|
|
166
|
-
.figures
|
|
167
|
-
.figures
|
|
168
|
-
.figures
|
|
170
|
+
/* Big numbers: two to six, each above its label. A second dd is a line about the number. */
|
|
171
|
+
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); gap: 1.5rem 2rem; padding-block: 1.25rem; border-block: 1px solid var(--doc-line-primary); }
|
|
172
|
+
.figures:has(dd ~ dd) { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
|
|
173
|
+
.figures > div { display: flex; flex-direction: column; min-width: 0; }
|
|
174
|
+
.figures dt { order: 1; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 12px; font-weight: 400; letter-spacing: .01px; line-height: 16px; color: var(--doc-content-secondary); }
|
|
175
|
+
.figures dd { margin: 0 0 0.25rem; font-family: Pilat, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif; font-size: 24px; font-weight: 500; letter-spacing: -.36px; line-height: 27.6px; color: var(--doc-content-primary); font-variant-numeric: tabular-nums; }
|
|
176
|
+
.figures dd ~ dd { order: 2; margin: 0.375rem 0 0; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 12px; font-weight: 400; letter-spacing: .01px; line-height: 16px; color: var(--doc-content-secondary); font-variant-numeric: normal; }
|
|
177
|
+
.figures dd ~ dd b, .figures dd ~ dd strong { color: var(--doc-content-primary); }
|
|
169
178
|
|
|
170
179
|
/* Tables: one size for every cell. Row titles primary and medium, descriptions secondary and regular. */
|
|
171
180
|
table { width: 100%; border-collapse: collapse; }
|
|
@@ -188,9 +197,9 @@ table.results td.outcome { white-space: nowrap; }
|
|
|
188
197
|
.sn > small::after { content: ")"; }
|
|
189
198
|
.sn-ref {
|
|
190
199
|
all: unset; cursor: pointer; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 12px; font-weight: 500; letter-spacing: .01px; line-height: 16px; vertical-align: super; line-height: 0;
|
|
191
|
-
padding: 0.35em 0.2em; margin: -0.35em 0; color: var(--doc-content-
|
|
200
|
+
padding: 0.35em 0.2em; margin: -0.35em 0; color: var(--doc-content-secondary); border-radius: var(--doc-radius-3xs);
|
|
192
201
|
}
|
|
193
|
-
.sn-ref:hover, .sn-ref[aria-expanded="true"] { text-decoration: underline; text-underline-offset: 0.2em; }
|
|
202
|
+
.sn-ref:hover, .sn-ref[aria-expanded="true"] { color: var(--doc-content-primary); text-decoration: underline; text-underline-offset: 0.2em; }
|
|
194
203
|
.sn-ref:focus-visible { outline: 2px solid var(--doc-border-focus); outline-offset: 1px; }
|
|
195
204
|
.js .sn > small { display: none; }
|
|
196
205
|
.js .sn.open > small {
|
|
@@ -199,7 +208,7 @@ table.results td.outcome { white-space: nowrap; }
|
|
|
199
208
|
background: var(--doc-background-elevated); box-shadow: var(--doc-shadow-regular); color: var(--doc-content-primary);
|
|
200
209
|
animation: doc-pop 200ms var(--doc-ease-snappy);
|
|
201
210
|
}
|
|
202
|
-
.js .sn.open > small::before { content:
|
|
211
|
+
.js .sn.open > small::before { content: attr(data-note) "\2002"; color: var(--doc-content-secondary); }
|
|
203
212
|
.js .sn.open > small::after { content: none; }
|
|
204
213
|
@keyframes doc-pop { from { opacity: 0; transform: scale(0.96); } }
|
|
205
214
|
.footnotes { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 12px; font-weight: 400; letter-spacing: .01px; line-height: 16px; color: var(--doc-content-secondary); }
|
|
@@ -237,6 +246,7 @@ h2:hover .h-anchor, h3:hover .h-anchor, .h-anchor:focus-visible, .h-anchor[data-
|
|
|
237
246
|
/* Timeline: Chronology, dates hanging left of the column */
|
|
238
247
|
.chronology { list-style: none; padding: 0; }
|
|
239
248
|
.chronology > li { position: relative; margin: 0 0 1rem; }
|
|
249
|
+
.chronology > li:last-child { margin-bottom: 0; }
|
|
240
250
|
.chronology > li > time { display: block; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 12px; font-weight: 400; letter-spacing: .01px; line-height: 16px; padding-top: 2px; color: var(--doc-content-secondary); font-variant-numeric: tabular-nums; }
|
|
241
251
|
.chronology > li > p { margin: 0; }
|
|
242
252
|
|
|
@@ -313,11 +323,14 @@ h2:hover .h-anchor, h3:hover .h-anchor, .h-anchor:focus-visible, .h-anchor[data-
|
|
|
313
323
|
[page-end screen-end];
|
|
314
324
|
}
|
|
315
325
|
.brief > .summary { grid-area: side; }
|
|
316
|
-
.summary { position: sticky; top: 2rem; align-self: start; border-top: 1px solid var(--doc-content-primary); padding-top: 0.75rem; }
|
|
326
|
+
.summary { position: sticky; top: 2rem; align-self: start; max-height: calc(100vh - 4rem); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; border-top: 1px solid var(--doc-content-primary); padding-top: 0.75rem; }
|
|
317
327
|
.summary dl { margin: 0; }
|
|
318
328
|
.summary dd { margin: 0; }
|
|
319
|
-
|
|
320
|
-
.summary .
|
|
329
|
+
/* The summary is outside the article that counts the notes, so its inline notes have no number. */
|
|
330
|
+
.summary .sn > small::before { content: " ("; }
|
|
331
|
+
.summary .facts { display: grid; grid-template-columns: fit-content(5.5rem) 1fr; column-gap: 0.75rem; }
|
|
332
|
+
.summary .facts > div { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; padding-block: 0.5rem; border-bottom: 1px solid var(--doc-line-secondary); }
|
|
333
|
+
.summary .facts dt { min-width: 4.5rem; color: var(--doc-content-primary); font-weight: 500; }
|
|
321
334
|
.summary .facts dd { color: var(--doc-content-secondary); }
|
|
322
335
|
.summary nav { margin-top: 1.75rem; }
|
|
323
336
|
.summary nav h2 { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 12px; font-weight: 500; letter-spacing: .01px; line-height: 16px; color: var(--doc-content-secondary); margin: 0 0 0.5rem; }
|
|
@@ -333,6 +346,7 @@ ol.steps > li { counter-increment: step; position: relative; padding-left: 2rem;
|
|
|
333
346
|
ol.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 1.375rem; text-align: center; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 12px; font-weight: 500; letter-spacing: .01px; line-height: 16px; line-height: 1.375rem; border-radius: var(--doc-radius-full); background: var(--doc-container-regular); color: var(--doc-content-primary); }
|
|
334
347
|
|
|
335
348
|
@media (min-width: 1024px) {
|
|
349
|
+
.js .summary .sn.open > small { position: fixed; }
|
|
336
350
|
.chronology > li > time { position: absolute; right: calc(100% + 1.5rem); top: 0; width: calc(2 * var(--doc-hang) - 1.5rem); text-align: right; white-space: nowrap; }
|
|
337
351
|
.doc[data-rail] { --doc-edge: 3.5rem; }
|
|
338
352
|
}
|
|
@@ -345,7 +359,7 @@ ol.steps > li::before { content: counter(step); position: absolute; left: 0; top
|
|
|
345
359
|
.brief { grid-template-columns: minmax(var(--doc-edge), 1fr) minmax(0, var(--doc-measure)) minmax(var(--doc-edge), 1fr); grid-template-areas: ". head ." ". side ." ". main ."; grid-template-rows: auto; padding-top: 3rem; }
|
|
346
360
|
.brief > header { padding-left: 0; margin-bottom: 1.5rem; }
|
|
347
361
|
.brief > .doc { grid-template-columns: [screen-start page-start outset-start body-start] minmax(0, 1fr) [body-end outset-end page-end screen-end]; }
|
|
348
|
-
.summary { position: static; margin-bottom: 1rem; border-bottom: 1px solid var(--doc-line-primary); padding-bottom: 0.5rem; }
|
|
362
|
+
.summary { position: static; max-height: none; overflow: visible; margin-bottom: 1rem; border-bottom: 1px solid var(--doc-line-primary); padding-bottom: 0.5rem; }
|
|
349
363
|
.summary .facts > div:last-child { border-bottom: 0; }
|
|
350
364
|
.summary nav { display: none; }
|
|
351
365
|
}
|
|
@@ -370,4 +384,5 @@ ol.steps > li::before { content: counter(step); position: absolute; left: 0; top
|
|
|
370
384
|
}
|
|
371
385
|
@media print {
|
|
372
386
|
.rail, .summary nav, .h-anchor, .copy { display: none; }
|
|
387
|
+
.summary { position: static; max-height: none; overflow: visible; }
|
|
373
388
|
}
|