Dizhan Xue 6a038a67df
fix(docs): light the contents rail between headings and use raven.evermind.ai's favicon (#734)
## Summary

Two fixes to the documentation site.

**The contents rail went dark between headings.** The right-hand table
of contents lit an entry only while its heading was inside the viewport.
Partway through a section longer than the screen every heading sits
above or below it, so nothing was lit, the gold stretch collapsed to
zero height, and the column stopped following the reader. On the built
site before this change, 18 of 28 English pages had such stretches: 114
of 1264 scroll positions sampled every 120px. `sync()` in
`docs-site/docs/javascripts/toc-progress.js` now falls back to the
nearest heading above when none is in view and lights that entry alone.
The lit stretch and the column follow read the same list, so both pick
it up with no further change. Above the first heading nothing is lit,
since no section has begun there. The design spec states the rule, and
the rail's section comment in `evermind.css`, which still credited
Material with marking the section, now names what does.

**The tab icon differed from raven.evermind.ai.** The site drew its own
simplified EverMind mark, a single heavy lemniscate without the rings.
raven.evermind.ai links one 192px PNG of the full mark for its light,
dark and apple-touch icons alike. `theme.favicon` in
`docs-site/mkdocs.yml` now inlines that PNG byte for byte as a data URI,
since AGENTS.md section 7 keeps image files out of `docs-site/`. For
whoever refreshes it: that site's CDN answers any `Accept` naming
`image/avif` with a lossy AVIF re-encode (5178 bytes), and only a plain
`Accept: */*` returns the original PNG (5184 bytes). The comment above
the value says so.

Checked and deliberately left alone:

- The mark at the top of the navigation rail (`--em-mark` in
`evermind.css`) is a separate drawing and still the simplified one. This
change is the tab icon only.
- raven.evermind.ai also sets an apple-touch icon. Material emits no
such link, and adding one needs a template override, which is an `.html`
file that section 7 blocks.
- The favicon's identity is verified by the measurements below rather
than pinned by a test: a pinned hash would only detect change, and
comparing against the live site would put the network in the suite.
- `tests/integration/` is outside every CI job (`norecursedirs`), so the
e2e results below are local runs.

## Type

- [x] Fix
- [ ] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other

## Verification

- `uv run --frozen --extra browser --group docs pytest
tests/integration/test_docs_site_controls_e2e.py
tests/integration/test_docs_site_search_e2e.py -n 0 -q`: 63 passed.
- `uv run --frozen --extra browser --group docs pytest
tests/test_docs_site.py -q`: 16 passed.
- The new
`test_table_of_contents_keeps_the_section_above_lit_between_headings`
computes, from the Sandbox page's own layout, every stretch between two
headings (or after the last) with none on screen, and checks the middle
of each. Against the unfixed script it fails (`at 1354px: assert [] ==
[2]`), and with the fix it passes.
- A sweep of every built page in headless Chrome at 1440x900, one sample
every 120px, checking the rule at each position: 0 violations over 1264
English, 1145 Chinese and 21 Overview positions after the change, and
wherever an entry is lit, the first one sits inside the contents column.
The unfixed script gives 114 violations over the same English positions.
- Favicon: each of the 63 built HTML files carries exactly one icon
link, and its decoded bytes match the PNG raven.evermind.ai links
(sha256 `4a5051e1781fac64...`). Drawn in Chrome at 16, 32 and 192px, the
docs icon and that PNG differ in 0 pixels.
- `mkdocs build --strict`, `scripts/check_source_language.py
origin/main...HEAD`, `scripts/check_large_files.py origin/main...HEAD`,
`scripts/check_commit_messages.py origin/main..HEAD`, commitlint,
`pre-commit run --from-ref origin/main --to-ref HEAD`, ruff and `git
diff --check`: all pass.

- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [ ] User-facing docs or screenshots are updated when needed

The last box is left blank because nothing needed it: no documentation
page describes the rail or the icon, and the design spec is updated in
this change.

## Risk

- Between headings, the entry of the section above now stays lit and the
contents column keeps it in view. While any heading is on screen the
behaviour is unchanged.
- The tab icon changes to the full mark. Each page's head now carries
about 6.9 KB of base64 for it, against about 0.6 KB for the previous
SVG.
- The new code relies on no browser API newer than
`Array.prototype.includes` (2016).
- The two halves touch disjoint files, so either can be reverted on its
own.

- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes

The inlined PNG was read chunk by chunk: standard chunks plus three
ImageMagick timestamps, and nothing after IEND. Inlining it adds no
third-party request, which hotlinking the CDN copy would have.

## Related Issues

N/A

---------

Co-authored-by: Claude (claude-opus-5-5[1m]) <noreply@anthropic.com>
2026-09-23 22:09:48 +08:00

1585 lines
47 KiB
CSS

/*
* EverMind brand skin for Material for MkDocs.
*
* The repository forbids committing HTML (AGENTS.md section 7, machine-checked
* by scripts/check_large_files.py), so the theme cannot be customised through
* Material's usual overrides/*.html partials. Everything here is therefore done
* by remapping Material's own CSS custom properties onto the EverMind brand
* tokens declared below, then correcting the handful of places where Material
* hardcodes a value instead of reading a variable -- chiefly its rounded
* corners, which are the one thing that most breaks the brand's square
* geometry. The Presentation section of
* docs/specs/2026-09-18-docs-site-design.md carries the constraint and the
* rationale.
*/
@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@1,500;1,600&family=Brygada+1918:ital,wght@0,400;0,500&display=swap");
/*
* Surfaces and text are sampled from the EverMe application rather than from
* the marketing site: same warm axis (every value keeps R >= G >= B, so none
* of them is the cool grey the brand rules out), but far less chroma. A tinted
* light reads heavier than a neutral one of the same lightness, which is what
* made the parchment set look dark in a dense documentation page.
*/
:root {
--em-canvas: #fffefc;
--em-panel: #f5f5f5;
--em-panel-warm: #ebebeb;
--em-ink: #0d0b04;
--em-text: #0d0b04;
--em-text-serif: #312f29;
--em-text-muted: #6b6966;
--em-text-faint: #908f8c;
--em-text-on-dark: #fffefc;
--em-gold: #d99400;
--em-gold-light: #f7cb72;
--em-gold-olive: #9c7c1e;
--em-hairline: rgba(13, 11, 4, 0.08);
--em-font-serif: "Cormorant Garamond", serif;
--em-font-label: "Brygada 1918", serif;
}
/* ------------------------------------------------- Material remapping --- */
[data-md-color-scheme="default"] {
--md-default-bg-color: var(--em-canvas);
--md-default-fg-color: var(--em-text);
--md-default-fg-color--light: var(--em-text-muted);
--md-default-fg-color--lighter: var(--em-text-faint);
--md-default-fg-color--lightest: var(--em-hairline);
--md-primary-fg-color: var(--em-ink);
--md-primary-fg-color--light: #2b2a29;
--md-primary-fg-color--dark: #050505;
--md-primary-bg-color: var(--em-text-on-dark);
--md-primary-bg-color--light: var(--em-text-faint);
--md-accent-fg-color: var(--em-gold);
--md-accent-fg-color--transparent: rgba(217, 148, 0, 0.1);
--md-typeset-color: var(--em-text);
--md-typeset-a-color: var(--em-gold-olive);
--md-code-bg-color: var(--em-panel);
--md-code-fg-color: var(--em-text);
--md-footer-bg-color: var(--em-canvas);
--md-footer-bg-color--dark: var(--em-panel);
--md-footer-fg-color: var(--em-text);
--md-footer-fg-color--light: var(--em-text-muted);
--md-footer-fg-color--lighter: var(--em-text-faint);
}
/* ------------------------------------------------------- Square first --- */
/*
* Material rounds buttons, code blocks, tables, admonitions, search and tabs.
* Square corners are the brand's strongest identity cue, so they are reset
* globally and re-granted only to the two shapes the brand keeps round:
* cards and pills.
*/
.md-typeset pre > code,
.md-typeset .highlight,
.md-typeset table:not([class]),
.md-typeset .admonition,
.md-typeset details,
.md-typeset code,
.md-search__form,
.md-search__output,
.md-nav__link,
.md-tabs__link,
.md-button {
border-radius: 0;
}
/* --------------------------------------------------------- Typography --- */
.md-typeset h1 {
font-weight: 500;
font-size: clamp(2.1rem, 4.4vw, 2.9rem);
line-height: 1.04;
letter-spacing: -0.045em;
color: var(--em-ink);
margin-bottom: 0.4em;
}
.md-typeset h2 {
font-weight: 500;
letter-spacing: -0.02em;
color: var(--em-ink);
margin-top: 2.4em;
border-top: 1px solid var(--em-hairline);
padding-top: 1.4em;
}
.md-typeset h3 {
font-weight: 500;
letter-spacing: -0.02em;
color: var(--em-text-serif);
}
.md-typeset p,
.md-typeset li {
color: var(--em-text-muted);
}
.md-typeset a {
text-decoration: none;
}
.md-typeset a:hover {
color: var(--em-gold);
}
/* The one italic serif accent word permitted inside a headline. */
.md-typeset .em-accent {
font-family: var(--em-font-serif);
font-style: italic;
font-weight: 600;
color: var(--em-gold-olive);
letter-spacing: 0;
}
/* Gold kicker above the page title, words joined by a middot. */
.md-typeset .em-eyebrow {
color: var(--em-gold);
font-weight: 500;
font-size: 0.72rem;
letter-spacing: 0.02em;
margin-bottom: 0.9rem;
}
/* One-sentence standfirst under an h1, in the secondary serif. */
.md-typeset .em-standfirst {
font-family: var(--em-font-label);
font-size: 0.95rem;
line-height: 1.55;
letter-spacing: -0.01em;
color: var(--em-text-serif);
margin-top: -0.3em;
margin-bottom: 2.2em;
}
/* ------------------------------------------------------------- Header --- */
.md-header {
background-color: var(--em-ink);
box-shadow: none;
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.md-header__title {
font-weight: 500;
letter-spacing: -0.02em;
}
/*
* The EverMind mark, in place of Material's default book icon. Section 7 of
* AGENTS.md keeps image files out of the repository, so it is inlined here
* rather than shipped as a file and pointed at by theme.logo. Material puts a
* logo in two places -- the header above 76.25em, the navigation drawer below
* it -- and both are replaced here, sized to the glyph each one drops.
*/
:root {
--em-mark: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 192 192"><rect width="192" height="192" rx="38.8" fill="%23ffc53d"/><g fill="none" stroke="%230c0902" stroke-width="3.6"><ellipse cx="101.3" cy="96" rx="5.3" ry="30.9" opacity="0.21"/><ellipse cx="90.7" cy="96" rx="5.3" ry="30.9" opacity="0.21"/><ellipse cx="112.9" cy="96" rx="16.9" ry="30.9" opacity="0.42"/><ellipse cx="79.1" cy="96" rx="16.9" ry="30.9" opacity="0.42"/><ellipse cx="124.4" cy="96" rx="28.4" ry="30.9" opacity="0.63"/><ellipse cx="67.6" cy="96" rx="28.4" ry="30.9" opacity="0.63"/><ellipse cx="136.2" cy="96" rx="40.2" ry="30.9" opacity="0.84"/><ellipse cx="55.8" cy="96" rx="40.2" ry="30.9" opacity="0.84"/><path d="M16 96C16 78.3 30.4 64 48 64C69.6 64 88 86.1 96 96C104 105.9 122.4 128 144 128C161.6 128 176 113.7 176 96C176 78.3 161.6 64 144 64C122.4 64 104 86.1 96 96C88 105.9 69.6 128 48 128C30.4 128 16 113.7 16 96Z"/></g></svg>');
}
.md-header__button.md-logo::before,
.md-nav__button.md-logo::before {
content: "";
display: block;
background-image: var(--em-mark);
background-size: contain;
background-repeat: no-repeat;
background-position: center;
}
.md-header__button.md-logo::before {
width: 1rem;
height: 1rem;
}
.md-nav__button.md-logo::before {
width: 2.4rem;
height: 2.4rem;
}
/*
* Material sets display on the drawer glyph through a three-class selector,
* which outranks a two-class rule whatever the load order, so the drawer half
* has to carry .md-nav__title as well.
*/
.md-header__button.md-logo img,
.md-header__button.md-logo svg,
.md-nav__title .md-nav__button.md-logo img,
.md-nav__title .md-nav__button.md-logo svg {
display: none;
}
.md-tabs {
background-color: var(--em-ink);
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.md-tabs__link {
font-size: 0.72rem;
font-weight: 500;
opacity: 0.62;
}
.md-tabs__link:hover,
.md-tabs__link--active {
opacity: 1;
}
/* Gold underline marks the active section, the only accent in the bar. */
.md-tabs__item--active {
box-shadow: inset 0 -2px 0 var(--em-gold);
}
.md-search__form {
background-color: rgba(255, 255, 255, 0.08);
}
.md-search__form:hover {
background-color: rgba(255, 255, 255, 0.14);
}
/* --------------------------------------------------------- Navigation --- */
/*
* Sidebar group labels are set as gold kickers so the sidebar reads as
* sections rather than a flat list.
*/
.md-nav__title {
color: var(--em-text-faint);
font-weight: 500;
}
/*
* Material colours the section label through `.md-nav__item--section >
* .md-nav__link[for]`, whose attribute selector outranks the same rule without
* it: the uppercase and the size below land, the colour alone loses. Match the
* attribute to take it back.
*/
.md-nav--secondary .md-nav__title,
.md-nav__item--section > .md-nav__link[for],
.md-nav__item--section > .md-nav__link {
color: var(--em-gold);
font-weight: 500;
font-size: 0.66rem;
text-transform: uppercase;
letter-spacing: 0.08em;
}
.md-nav__link {
color: var(--em-text-muted);
}
.md-nav__link--active,
.md-nav__link:hover {
color: var(--em-ink);
}
.md-nav__link--active {
font-weight: 500;
}
/* ------------------------------------------------------------- Content --- */
.md-typeset pre > code {
border: 1px solid var(--em-hairline);
}
.md-typeset table:not([class]) {
border: 1px solid var(--em-hairline);
box-shadow: none;
}
.md-typeset table:not([class]) th {
background-color: var(--em-panel);
border-bottom: 1px solid var(--em-hairline);
color: var(--em-ink);
font-weight: 500;
}
.md-typeset hr {
border-bottom: 1px solid var(--em-hairline);
}
/* --------------------------------------------------------- Card grids --- */
/*
* The landing page is a directory of linked tiles rather than prose. Cards are
* one of the two shapes the brand keeps rounded; they stay flat, with a
* hairline border and a gold rule that appears on hover.
*/
.md-typeset .grid.cards > ul > li,
.md-typeset .grid > .card {
background-color: var(--em-canvas);
border: 1px solid var(--em-hairline);
border-radius: 12px;
box-shadow: none;
padding: 1.4rem 1.5rem;
transition: border-color 120ms, box-shadow 120ms;
}
.md-typeset .grid.cards > ul > li:hover,
.md-typeset .grid > .card:hover {
border-color: var(--em-gold-light);
box-shadow: 0 0 20px rgba(0, 0, 0, 0.07);
}
.md-typeset .grid.cards > ul > li > hr {
margin: 0.7em 0;
border-bottom: 1px solid var(--em-hairline);
}
.md-typeset .grid.cards > ul > li > p:first-child strong {
color: var(--em-ink);
font-size: 1.05rem;
font-weight: 500;
letter-spacing: -0.02em;
}
/* A leading numeral turns a card grid into a sequence, as on the index page. */
.md-typeset .em-step > ul > li > p:first-child::before {
counter-increment: em-step;
content: counter(em-step);
display: block;
font-family: var(--em-font-label);
font-size: 1.6rem;
line-height: 1;
color: var(--em-gold);
margin-bottom: 0.45rem;
}
.md-typeset .em-step {
counter-reset: em-step;
}
/* ------------------------------------------------------------- Footer --- */
.md-footer,
.md-footer-meta {
background-color: var(--em-canvas);
color: var(--em-text-muted);
}
.md-footer {
border-top: 1px solid var(--em-hairline);
}
.md-footer-meta {
border-top: 1px solid var(--em-hairline);
font-size: 0.66rem;
}
/*
* The meta bar carried only Material's generator notice, which mkdocs.yml now
* switches off; with no copyright and no social links configured there is
* nothing left in it but an empty strip under the previous/next row. Drop this
* rule if a copyright line is ever added.
*/
.md-footer-meta {
display: none;
}
.md-footer__link {
color: var(--em-text-muted);
}
.md-footer__link:hover {
color: var(--em-ink);
}
.md-footer__title {
font-size: 0.8rem;
}
.md-footer__direction {
color: var(--em-text-faint);
}
.md-footer__link {
opacity: 0.8;
}
.md-footer__link:hover {
opacity: 1;
}
/* ------------------------------------------------------------- Shell --- */
/*
* The reference layout this site follows puts the brand, the search box and
* the whole navigation tree in one full-height rail down the left, and gives
* the section tabs only the width of the content column. Material ships a
* full-width header above a full-width tab bar instead, and its markup cannot
* be rearranged here, so the header is taken out of flow and stacked into the
* rail. Everything below is desktop-only: at narrow widths Material's own
* drawer is the better answer and is left alone.
*/
:root {
--em-rail: 13.7rem;
--em-rail-head: 7.6rem;
--em-rail-foot: 64px;
--em-toc: 286px;
--em-rail-mark: 1.7rem;
--em-search-dialog: 640px;
--em-search-height: 1.8rem;
--em-search-radius: 6px;
/* The two marks the search field carries, redrawn: a data URI cannot read a
custom property, so these repeat the values of --em-text-faint, --em-panel
and --em-hairline and have to be changed with them. */
--em-search-glyph: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23908f8c" d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>');
--em-search-key: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 18"><rect x=".5" y=".5" width="21" height="17" rx="4" fill="%23f5f5f5" stroke="rgba(13,11,4,0.08)"/><path d="M12.4 4.9 9.6 13.1" fill="none" stroke="%23908f8c" stroke-width="1.3" stroke-linecap="round"/></svg>');
}
@media screen and (min-width: 76.25em) {
.md-header {
position: fixed;
top: 0 !important;
left: 0;
width: var(--em-rail);
height: var(--em-rail-head);
background: var(--em-panel);
color: var(--em-text);
box-shadow: none;
border: 0;
border-right: 1px solid var(--em-hairline);
/*
* Above the rail, which the header does not overlap but the search
* results panel does: it hangs out of the header over the nav tree.
*/
z-index: 5;
}
.md-header__inner {
flex-direction: column;
align-items: stretch;
gap: 0.5rem;
padding: 0.85rem 0.8rem 0;
margin: 0;
max-width: none;
}
.md-header__button.md-logo {
margin: 0;
padding: 0;
width: var(--em-rail-mark);
}
.md-header__button.md-logo::before {
width: var(--em-rail-mark);
height: var(--em-rail-mark);
}
.md-header__title {
margin: 0;
font-size: 0.92rem;
line-height: 1.9rem;
height: auto;
order: -1;
}
/*
* Material animates the site name out and the page name in as you scroll,
* and parks both topics at opacity 0 with a transform while it does. In the
* rail the name is a fixed wordmark, not a scroll state, so the first topic
* is pinned visible and laid out statically (Material positions it
* absolutely) and the second is dropped.
*/
.md-header__title .md-header__topic:first-child {
position: static;
opacity: 1;
transform: none;
pointer-events: auto;
z-index: auto;
font-weight: 500;
}
.md-header__title .md-header__topic:nth-child(2) {
display: none;
}
/* Brand row: mark and wordmark side by side, above the search box. */
.md-header__inner > .md-header__button.md-logo {
position: absolute;
top: 0.85rem;
left: 0.8rem;
}
.md-header__title {
padding-left: 2.45rem;
}
.md-header__button[for="__drawer"],
.md-header__button[for="__search"] {
display: none;
}
/* Search sits inside the rail, full width, as a bordered box. */
.md-header .md-search {
position: static;
margin-top: 0;
padding: 0;
}
.md-header .md-search__overlay {
display: none;
}
.md-header .md-search__inner {
position: static;
width: 100%;
height: auto;
margin: 0;
transform: none;
opacity: 1;
float: none;
}
/* Leaving search puts the dialog's parts back in the rail, and the theme
transitions each of them: the box collapses its width, fades its
background in and fades the magnifier's colour, so the corner of the page
goes on animating after the reader has moved on. The backdrop keeps its
own fade -- it is the page behind the dialog, not the box. */
.md-header .md-search__inner,
.md-header .md-search__form,
.md-header .md-search__icon,
.md-header .md-search__output {
transition: none;
}
.md-header .md-search__input::placeholder {
transition: none;
}
/*
* Opening the search lifts it off the rail. Material grows the field in
* place, which cannot work in a 274px column -- a result line is typeset
* wider than that and every one comes out cut. The reference layout opens a
* dialog over the page instead, which is what these rules build out of the
* parts Material already emits: the overlay becomes the backdrop and the
* inner wrapper becomes the dialog.
*/
/*
* The dialog takes the only field Material emits, which would leave a hole
* in the rail where the control was. The rail keeps a field of its own
* shape in that place instead, built from the same measures, so the column
* does not change on a click.
*/
[data-md-toggle="search"]:checked ~ .md-header .md-search {
position: relative;
display: block;
/* the wrapper Material lays the field out in sits 2px proud of it */
height: calc(var(--em-search-height) + 4px);
color: var(--em-text-faint);
}
[data-md-toggle="search"]:checked ~ .md-header .md-search::before {
content: "";
position: absolute;
inset: 2px 0;
background: var(--em-canvas);
border: 1px solid var(--em-hairline);
border-radius: var(--em-search-radius);
}
[data-md-toggle="search"]:checked ~ .md-header .md-search::after {
content: "Search";
position: absolute;
inset: 2px 0;
/* The field's label sits inside the form's 1px border while its two marks
are placed from the outer edge, so the replica carries that border for
the text and paints the marks from the border box. */
border: 1px solid transparent;
background-origin: border-box;
padding-left: 1.8rem;
font-size: 0.72rem;
line-height: var(--em-search-height);
color: var(--em-text-faint);
background-image: var(--em-search-glyph), var(--em-search-key);
background-position: 12px calc(50% + 3px), right 10px center;
background-size: 24px, 22px 18px;
background-repeat: no-repeat;
}
html[lang^="zh"] [data-md-toggle="search"]:checked ~ .md-header .md-search::after {
content: "搜索";
}
[data-md-toggle="search"]:checked ~ .md-header .md-search__overlay {
display: block;
position: fixed;
inset: 0;
width: 100%;
height: 100%;
background: rgba(28, 27, 27, 0.32);
backdrop-filter: blur(4px);
-webkit-backdrop-filter: blur(4px);
opacity: 1;
z-index: 6;
}
[data-md-toggle="search"]:checked ~ .md-header .md-search__inner {
transition: none;
position: fixed;
top: 20vh;
left: 50%;
width: var(--em-search-dialog);
max-width: calc(100vw - 4rem);
height: auto;
transform: translateX(-50%);
background: var(--em-canvas);
border: 1px solid var(--em-hairline);
border-radius: 12px;
box-shadow: 0 16px 48px rgba(28, 27, 27, 0.18);
overflow: hidden;
z-index: 7;
}
/* inside the dialog the field is the header, not a bordered control */
[data-md-toggle="search"]:checked ~ .md-header .md-search__form {
height: 2.8rem;
border: 0;
border-bottom: 1px solid var(--em-hairline);
border-radius: 0;
background: transparent;
}
[data-md-toggle="search"]:checked ~ .md-header .md-search__input {
font-size: 0.9rem;
padding-left: 2.6rem;
}
[data-md-toggle="search"]:checked ~ .md-header .md-search__icon[for="__search"] {
width: 1.1rem;
height: 1.1rem;
top: 0.85rem;
left: 0.9rem;
}
/* the results become the dialog's body rather than a panel hung off the rail */
[data-md-toggle="search"]:checked ~ .md-header .md-search__output {
position: static;
width: 100%;
max-height: min(26rem, 60vh);
border: 0;
border-radius: 0;
overflow: auto;
}
.md-header .md-search__form {
height: var(--em-search-height);
background: var(--em-canvas);
border: 1px solid var(--em-hairline);
border-radius: var(--em-search-radius);
}
.md-header .md-search__form:hover {
background: var(--em-canvas);
border-color: var(--em-gold-light);
}
.md-header .md-search__input {
font-size: 0.66rem;
padding-left: 1.8rem;
}
.md-header .md-search__input::placeholder {
color: var(--em-text-faint);
}
.md-header .md-search__icon[for="__search"] {
width: 0.85rem;
height: 0.85rem;
top: 0.52rem;
left: 0.55rem;
color: var(--em-text-faint);
}
.md-header .md-search__output {
position: absolute;
top: 100%;
left: 0;
width: var(--em-rail);
border: 1px solid var(--em-hairline);
background: var(--em-canvas);
}
/*
* Material lays the result rows out at a fixed 34.4rem, the width of the
* dropdown its own header bar opens. The panel above is clipped to the rail,
* so without this the rows are typeset 415px wider than the box that shows
* them and every one is cut off mid-line.
*/
.md-header .md-search__scrollwrap {
width: 100%;
}
/*
* The repo link and the language selector drop to the foot of the rail.
* They are fixed to the viewport and carry no background of their own, so
* without a band behind them the navigation tree scrolls right up into
* their row and a heading ends up sharing a line with an icon. The band is
* painted here rather than wrapped around them because Material emits the
* two as siblings with no container to style.
*/
.md-header::after {
content: "";
position: fixed;
left: 0;
bottom: 0;
width: var(--em-rail);
height: var(--em-rail-foot);
background: var(--em-panel);
border-top: 1px solid var(--em-hairline);
border-right: 1px solid var(--em-hairline);
}
.md-header__option,
.md-header__source {
position: fixed;
bottom: 16px;
margin: 0;
max-width: none;
width: auto;
z-index: 1;
}
.md-header__option {
left: 16px;
width: 32px;
height: 32px;
}
.md-header__source {
left: 48px;
width: 32px;
}
[dir="ltr"] .md-header__source,
[dir="rtl"] .md-header__source {
margin-left: 0;
margin-right: 0;
}
.md-header__option .md-select {
width: 32px;
height: 32px;
}
/*
* Material opens this menu downward, which is right under a header bar at
* the top of the page and wrong at the foot of the rail: there the menu
* lands below the viewport, where it still animates and still answers
* querySelector but cannot be reached. Direction, alignment and the little
* arrow all flip with the control.
*/
.md-select__inner {
top: auto;
bottom: calc(100% - 0.2rem);
left: 0;
margin-top: 0;
margin-bottom: 0.2rem;
transform: translate3d(0, -0.3rem, 0);
}
.md-select:focus-within .md-select__inner,
.md-select:hover .md-select__inner {
transform: translate3d(0, 0, 0);
}
.md-select__inner::after {
top: auto;
bottom: 0;
left: 1.2rem;
margin-top: 0;
margin-bottom: -0.2rem;
border-top: 0.2rem solid var(--md-default-bg-color);
border-bottom: 0;
}
/* The rail foot carries icon buttons only, as the reference layout does. */
.md-header__source .md-source__repository {
display: none;
}
.md-header__source .md-source__icon {
padding-right: 0;
}
/* Match the reference docs shell: a 32px icon button with a 20px solid
GitHub mark, quiet until the pointer reaches it. */
.md-header__option .md-select > .md-header__button,
.md-header__source .md-source {
display: inline-flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
padding: 6px;
margin: 0;
border-radius: 6px;
color: var(--em-text-muted);
transition: background-color 120ms, color 120ms;
}
.md-header__option .md-select > .md-header__button:hover,
.md-header__source .md-source:hover {
background-color: var(--em-panel-warm);
color: var(--em-ink);
}
.md-header__option .md-select > .md-header__button svg {
width: 20px;
height: 20px;
}
.md-header__source .md-source__icon {
width: 20px;
height: 20px;
padding: 0;
}
.md-header__source .md-source__icon svg {
display: none;
}
.md-header__source .md-source__icon::before {
content: "";
display: block;
width: 20px;
height: 20px;
background-color: currentColor;
-webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12Z"/></svg>') center / contain no-repeat;
mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12Z"/></svg>') center / contain no-repeat;
}
/* The nav tree fills the rest of the rail. */
.md-sidebar--primary {
position: fixed;
top: var(--em-rail-head);
left: 0;
width: var(--em-rail);
height: calc(100vh - var(--em-rail-head));
margin: 0;
padding: 0;
background: var(--em-panel);
border-right: 1px solid var(--em-hairline);
transform: none;
z-index: 4;
}
/*
* The tree ends where the foot band starts, so no entry is ever half-hidden
* behind it. Material's own script writes an inline height on this element,
* computed from the viewport and its header bar and blind to the band, and
* an inline declaration is what !important is for.
*/
.md-sidebar--primary .md-sidebar__scrollwrap {
margin: 0;
height: calc(100% - var(--em-rail-foot)) !important;
padding: 0.4rem 0.6rem 0.6rem;
}
.md-sidebar--primary .md-nav__title {
display: none;
}
/* Tabs take only the content column, on parchment rather than ink. */
.md-tabs {
position: fixed;
top: 0;
left: var(--em-rail);
width: calc(100% - var(--em-rail));
background: var(--em-canvas);
color: var(--em-text);
border-bottom: 1px solid var(--em-hairline);
z-index: 3;
}
.md-tabs__list {
padding-left: 1.6rem;
}
.md-tabs__link {
color: var(--em-text-muted);
opacity: 1;
font-size: 0.7rem;
}
.md-tabs__link:hover,
.md-tabs__link--active {
color: var(--em-ink);
}
.md-tabs__item--active {
box-shadow: inset 0 -2px 0 var(--em-gold);
}
/* Content clears the rail and the tab strip. */
.md-container {
padding-top: 1.6rem;
}
/*
* Both columns are fixed, so the document keeps the full width underneath
* them. That only shows where a reader can scroll level with a column, which
* is the footer: without the right inset its links are drawn in the same
* strip as the table of contents.
*/
.md-footer,
.md-footer-meta {
margin-left: var(--em-rail);
margin-right: var(--em-toc);
}
.md-main__inner {
margin-left: var(--em-rail);
margin-right: var(--em-toc);
max-width: none;
padding-right: 1.2rem;
}
.md-content {
max-width: 44rem;
}
.md-sidebar--secondary {
margin-left: 0;
}
}
/* --------------------------------------------------- Shell corrections --- */
/*
* Material paints the tab labels in the primary background colour, which is
* cream: correct over its own ink header, invisible once the strip is moved
* onto parchment. The colour has to be restated after the move, and the
* opacity Material animates them in with has to be pinned open.
*/
@media screen and (min-width: 76.25em) {
.md-tabs .md-tabs__list .md-tabs__link {
color: var(--em-text-muted);
opacity: 1;
transition: none;
}
.md-tabs .md-tabs__list .md-tabs__link:hover,
.md-tabs .md-tabs__list .md-tabs__item--active .md-tabs__link {
color: var(--em-ink);
}
/* The search box carries the shortcut that actually works: Material binds
f, s and slash, so printing the reference's Command-K would name a key
this site does not listen for. It belongs to the field at rest: a reader
already inside the dialog has nothing to press it for, and the theme
puts its clear button in that same corner. */
[data-md-toggle="search"]:checked ~ .md-header .md-search__form::after {
content: none;
}
/* The theme seats the clear button a fixed distance from the form's top,
which centres it only in a form of the theme's own height. This dialog's
is taller, so the button is centred against the box instead and follows
whatever height the form takes. */
[data-md-toggle="search"]:checked ~ .md-header .md-search__options {
top: 50%;
display: flex;
align-items: center;
transform: translateY(-50%);
}
.md-header .md-search__form::after {
content: "/";
position: absolute;
top: 50%;
right: 0.45rem;
transform: translateY(-50%);
min-width: 1rem;
padding: 0.05rem 0.25rem;
border: 1px solid var(--em-hairline);
border-radius: 4px;
background: var(--em-panel);
color: var(--em-text-faint);
font-size: 0.6rem;
line-height: 1.1;
text-align: center;
pointer-events: none;
}
}
/* ------------------------------------------------ Card grid, corrected --- */
/*
* Three to a row, as on the reference layout, and short enough that a row of
* them reads as one band rather than three columns of prose. Each card leads
* with a line icon: they are CSS masks rather than files, because the
* repository does not take committed SVGs and the emoji extension that would
* otherwise supply them needs a YAML tag the check-yaml hook refuses.
*/
/*
* Material puts display:contents on the ul inside .grid.cards, so the ul takes
* part in no layout at all and the grid lives on the .grid.cards div itself.
* Column rules written against the ul are silently inert.
*/
.md-typeset .grid.cards {
gap: 0.85rem;
margin: 0;
}
/*
* Fixed column counts below this width squeeze the cards past the viewport
* edge; Material's own auto-fit track list handles the narrow case.
*/
@media screen and (min-width: 60em) {
.md-typeset .grid.cards {
grid-template-columns: repeat(3, 1fr);
}
}
.md-typeset .grid.cards > ul > li {
padding: 1.1rem 1.15rem;
margin: 0;
}
.md-typeset .grid.cards > ul > li > p {
font-size: 0.72rem;
line-height: 1.5;
margin: 0.3rem 0 0;
}
.md-typeset .grid.cards > ul > li > p:first-child strong {
font-size: 0.85rem;
}
.md-typeset .grid.cards > ul > li > hr {
display: none;
}
.md-typeset .grid.cards > ul > li::before {
content: "";
display: block;
width: 1.15rem;
height: 1.15rem;
margin-bottom: 0.6rem;
background-color: var(--em-gold-olive);
-webkit-mask: var(--em-icon) center / contain no-repeat;
mask: var(--em-icon) center / contain no-repeat;
}
/* The numbered sequence keeps its numeral, placed beside the icon. */
.md-typeset .em-step > ul > li::before {
display: inline-block;
vertical-align: middle;
margin-bottom: 0;
margin-right: 0.45rem;
}
.md-typeset .em-step > ul > li > p:first-child::before {
display: inline;
font-size: 0.85rem;
color: var(--em-gold);
margin: 0 0.3rem 0 0;
}
/*
* One icon per card, keyed per grid. Scoping them to :nth-child alone
* restarts the count in every grid, which is how three separate sections came
* to show the same three icons.
*/
.md-typeset .em-step > ul > li:nth-child(1) {
--em-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.6"><path d="M12 3v12m0 0 4-4m-4 4-4-4M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2"/></svg>');
}
.md-typeset .em-step > ul > li:nth-child(2) {
--em-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.6"><rect x="3" y="4" width="18" height="6" rx="1"/><rect x="3" y="14" width="18" height="6" rx="1"/><path d="M7 7h.01M7 17h.01"/></svg>');
}
.md-typeset .em-step > ul > li:nth-child(3) {
--em-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.6"><rect x="3" y="4" width="18" height="16" rx="1"/><path d="M3 9h18M7 6.5h.01M10 6.5h.01"/></svg>');
}
.md-typeset .em-use > ul > li:nth-child(1) {
--em-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="8.5"/><path d="M12 7v5l3.5 2"/></svg>');
}
.md-typeset .em-use > ul > li:nth-child(2) {
--em-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M9 7.5 6.5 5 3 8.5 5.5 11M15 16.5l2.5 2.5 3.5-3.5-2.5-2.5M14 5 10 19"/></svg>');
}
.md-typeset .em-use > ul > li:nth-child(3) {
--em-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.6" stroke-linejoin="round"><rect x="4" y="4" width="16" height="16" rx="2"/><path d="M4 9h16M8 6.5h.01M11 6.5h.01M14 6.5h.01M8 13h8M8 16h5"/></svg>');
}
.md-typeset .em-explore > ul > li:nth-child(1) {
--em-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M5 4h10l4 4v12H5z"/><path d="M15 4v5h4M8 13h8M8 16h6"/></svg>');
}
.md-typeset .em-explore > ul > li:nth-child(2) {
--em-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="m8 7-5 5 5 5M16 7l5 5-5 5M14 4l-4 16"/></svg>');
}
/* ------------------------------------------------------ Scale refinement --- */
/*
* The first pass established the layout and colour system. These values keep
* the same restrained palette while giving reading text, controls and card
* content enough room to breathe at the desktop rail width and on phones.
*/
:root {
--em-radius-card: 14px;
--em-radius-control: 8px;
}
.md-typeset {
font-size: 0.78rem;
line-height: 1.68;
}
.md-typeset p,
.md-typeset li {
font-size: 0.78rem;
line-height: 1.68;
letter-spacing: 0.006em;
}
.md-typeset h1 {
font-size: clamp(2.1rem, 4.8vw, 3.1rem);
line-height: 1.02;
margin-bottom: 0.55em;
}
.md-typeset h2 {
font-size: 1.4rem;
line-height: 1.25;
margin-top: 2.8em;
padding-top: 1.25em;
}
.md-typeset h3 {
font-size: 1.12rem;
line-height: 1.35;
}
.md-typeset .grid.cards {
gap: 1rem;
}
.md-typeset .grid.cards > ul > li {
border-radius: var(--em-radius-card);
padding: 1.3rem 1.35rem;
}
.md-typeset .grid.cards > ul > li > p {
font-size: 0.78rem;
line-height: 1.58;
margin-top: 0.45rem;
}
.md-typeset .grid.cards > ul > li > p:first-child strong {
font-size: 0.95rem;
line-height: 1.3;
}
.md-typeset .grid.cards > ul > li::before {
width: 1.3rem;
height: 1.3rem;
margin-bottom: 0.75rem;
background-color: var(--em-gold);
}
.md-typeset .em-step > ul > li > p:first-child::before {
font-size: 0.9rem;
font-weight: 600;
letter-spacing: 0;
}
.md-typeset pre > code {
font-size: 0.76rem;
line-height: 1.55;
padding: 1rem 1.1rem;
}
.md-typeset table:not([class]) th,
.md-typeset table:not([class]) td {
font-size: 0.76rem;
line-height: 1.55;
padding: 0.72rem 0.9rem;
}
.md-typeset code {
font-size: 0.84em;
padding: 0.12em 0.28em;
}
.md-nav__link {
letter-spacing: 0.01em;
}
.md-sidebar--secondary .md-nav__link {
font-size: 0.7rem;
line-height: 1.45;
padding-top: 0.3rem;
padding-bottom: 0.3rem;
}
.md-header .md-search__form {
border-radius: var(--em-radius-control);
}
@media screen and (min-width: 76.25em) {
:root {
--em-rail-head: 6.4rem;
}
/*
* Mark and wordmark are both anchored to the top of the brand row, so they
* share a centre line only while the wordmark's line box is the mark's box.
* The leading that drops out is added back underneath, which keeps the row
* 2.1rem tall and the search box below it where it was.
*/
.md-header__title {
font-size: 1rem;
line-height: var(--em-rail-mark);
padding-bottom: calc(2.1rem - var(--em-rail-mark));
padding-left: 2.35rem;
}
.md-header .md-search__form {
height: var(--em-search-height);
}
.md-header .md-search__input {
font-size: 0.72rem;
}
.md-header .md-search__icon[for="__search"] {
width: 1rem;
height: 1rem;
top: 0.4rem;
}
.md-header .md-search__form::after {
min-width: 1.1rem;
font-size: 0.64rem;
}
.md-sidebar--primary .md-nav__link {
font-size: 0.72rem;
line-height: 1.45;
padding: 0.3rem 0.5rem;
border-radius: 6px;
margin-top: 0.1rem;
}
.md-sidebar--primary .md-nav__link--active,
.md-sidebar--primary .md-nav__link:hover {
background: rgba(217, 148, 0, 0.1);
}
.md-nav__item--section > .md-nav__link[for],
.md-nav__item--section > .md-nav__link {
font-size: 0.68rem;
letter-spacing: 0.1em;
}
}
/* ----------------------------------------------------- Section markers --- */
/*
* Section headings use the same quiet line-icon language as the landing cards.
* Keeping them in CSS avoids a second icon set and keeps the navigation text
* free of colour emoji that vary across operating systems.
*/
.md-typeset h2 .em-section-icon {
display: inline-block;
width: 1.35rem;
height: 1.35rem;
margin-right: 0.55rem;
vertical-align: -0.18em;
background-color: var(--em-gold);
-webkit-mask: var(--em-section-icon) center / contain no-repeat;
mask: var(--em-section-icon) center / contain no-repeat;
}
.em-section-icon--prerequisites {
--em-section-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><rect x="5" y="3" width="14" height="18" rx="1.5"/><path d="M9 3.5h6M8 9l1.5 1.5L12 8M8 14l1.5 1.5L12 13M13.5 9H16M13.5 14H16"/></svg>');
}
.em-section-icon--compose {
--em-section-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="6" rx="1"/><rect x="3" y="14" width="18" height="6" rx="1"/><path d="M7 7h.01M7 17h.01"/></svg>');
}
.em-section-icon--configuration {
--em-section-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3.5 14 5l2.5-.2 1.2 2.2 2.2 1.2-.2 2.5 1.5 2-1.5 2 .2 2.5-2.2 1.2-1.2 2.2-2.5-.2-2 1.5-2-1.5-2.5.2-1.2-2.2-2.2-1.2.2-2.5-1.5-2 1.5-2-.2-2.5 2.2-1.2L7.5 4.8 10 5z"/><circle cx="12" cy="12" r="3"/></svg>');
}
.em-section-icon--build {
--em-section-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><path d="m14.5 5.5 4 4M4 20l5.8-1.5L19.7 8.6a2.8 2.8 0 0 0-4-4L5.8 14.7zM4 20l3.4-3.4"/><path d="M14 15.5 20.5 22"/></svg>');
}
.em-section-icon--source {
--em-section-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><path d="m8 9-4 3 4 3M16 9l4 3-4 3M13 6l-2 12"/></svg>');
}
@media screen and (max-width: 59.99em) {
.md-typeset h1 {
font-size: 2.2rem;
line-height: 1.06;
}
.md-typeset h2 {
font-size: 1.35rem;
margin-top: 2.35em;
padding-top: 1.15em;
}
.md-typeset .grid.cards {
gap: 0.75rem;
}
.md-typeset .grid.cards > ul > li {
padding: 1.2rem 1.15rem;
}
.md-typeset .grid.cards > ul > li::before {
width: 1.25rem;
height: 1.25rem;
}
.md-typeset h2 .em-section-icon {
width: 1.2rem;
height: 1.2rem;
margin-right: 0.4rem;
}
}
/* ------------------------------------------------ Reading progress rail --- */
/* The rail marks the section being read: toc-progress.js lights the stretch
for the headings on screen, or for the nearest one above when none is. */
@media screen and (min-width: 76.25em) {
.md-sidebar--secondary {
position: fixed;
top: 0 !important;
right: 0;
bottom: 0;
width: var(--em-toc);
height: 100vh;
margin: 0;
padding: 48px 0 0;
box-sizing: border-box;
z-index: 2;
pointer-events: none;
}
/*
* Material's script writes an inline height here too, sized for the column
* it ships rather than this full-height one, which leaves the list cut off
* partway down the screen with empty space beneath it.
*/
.md-sidebar--secondary .md-sidebar__scrollwrap {
height: calc(100vh - 48px) !important;
max-height: none;
margin: 0;
padding: 0 16px 0 0;
overflow: auto;
pointer-events: none;
/* the column carries no chrome of its own; the bar would be drawn over
the entries, since this engine overlays it rather than reserving a gutter */
scrollbar-width: none;
-ms-overflow-style: none;
/*
* The list runs to the foot of the screen, so an entry crossing that edge
* would otherwise be sliced through the letters. It fades out over the
* last 16px instead, the distance the reference layout uses. Only the
* bottom fades: Material puts the "On this page" label inside this
* scrolling box, and a matching fade at the top would wash it out.
*/
-webkit-mask-image: linear-gradient(#fff calc(100% - 16px), rgba(0, 0, 0, 0));
mask-image: linear-gradient(#fff calc(100% - 16px), rgba(0, 0, 0, 0));
}
.md-sidebar--secondary .md-sidebar__scrollwrap::-webkit-scrollbar {
display: none;
}
.md-sidebar--secondary .md-sidebar__inner {
padding: 0;
}
.md-sidebar--secondary .md-nav--secondary {
margin: 0;
pointer-events: auto;
}
.md-sidebar--secondary .md-nav--secondary > .md-nav__list > .md-nav__item > .md-nav {
position: relative;
margin-left: 0;
padding-left: 0;
}
.md-sidebar--secondary .md-nav--secondary > .md-nav__list > .md-nav__item > .md-nav > .md-nav__list {
padding: 0 !important;
}
/*
* Material pins this title while the entries scroll under it. Transparent,
* the two are drawn through each other and the entry takes the pointer as
* well, so the label needs to be opaque and to carry the gap the entries
* pass behind.
*/
.md-sidebar--secondary .md-nav__title {
height: 20px;
padding: 0 0 8px;
background: var(--em-canvas);
pointer-events: auto;
/* the entries carry z-index 1 so they sit over the rail's polyline, and at
an equal z-index the later element wins, so the label has to outrank it */
z-index: 2;
color: var(--em-text-muted);
font-size: 0;
font-weight: 500;
line-height: 20px;
text-transform: none;
}
.md-sidebar--secondary .md-nav__title .md-nav__icon {
display: none;
}
.md-sidebar--secondary .md-nav__title::before {
content: "";
display: inline-block;
width: 16px;
height: 16px;
margin-right: 6px;
vertical-align: -3px;
background: currentColor;
-webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18M3 12h18M3 18h18" fill="none" stroke="black" stroke-width="2" stroke-linecap="round"/></svg>') center / contain no-repeat;
mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18M3 12h18M3 18h18" fill="none" stroke="black" stroke-width="2" stroke-linecap="round"/></svg>') center / contain no-repeat;
}
.md-sidebar--secondary .md-nav__title::after {
content: "On this page";
font-size: 0.7rem;
letter-spacing: 0;
}
html[lang^="zh"] .md-sidebar--secondary .md-nav__title::after {
content: "本页内容";
}
.md-sidebar--secondary .md-nav__list {
padding: 12px 0 12px 0 !important;
}
.md-sidebar--secondary .md-nav--secondary > .md-nav__list {
position: relative;
}
.md-sidebar--secondary .raven-toc-progress {
position: absolute;
top: 0;
left: 0;
width: 12px;
height: 100%;
overflow: visible;
pointer-events: none;
z-index: 0;
}
.md-sidebar--secondary .raven-toc-progress path {
fill: none;
stroke-linecap: butt;
stroke-linejoin: miter;
stroke-width: 1;
}
.md-sidebar--secondary .raven-toc-progress__base {
stroke: var(--em-hairline);
}
.md-sidebar--secondary .raven-toc-progress__active {
stroke: var(--em-gold);
}
.md-sidebar--secondary .raven-toc-progress clipPath rect {
transition: y 150ms ease, height 150ms ease;
}
.md-sidebar--secondary .md-nav__link {
position: relative;
min-height: 0;
margin: 0;
margin-right: 0;
padding: 6px 11px 6px 26px;
color: var(--em-text-muted);
font-size: 14px;
line-height: 20px;
transition: color 120ms;
z-index: 1;
}
/*
* The indent follows the heading level, not whether an entry happens to have
* children: a trailing h2 with no h3 under it belongs in the same column as
* the h2 that does.
*/
.md-sidebar--secondary .md-nav--secondary > .md-nav__list > .md-nav__item > .md-nav__link {
padding-left: 14px;
}
.md-sidebar--secondary
.md-nav--secondary
> .md-nav__list
> .md-nav__item
> .md-nav
> .md-nav__list
> .md-nav__item
> .md-nav
> .md-nav__list
> .md-nav__item
> .md-nav__link {
padding-left: 38px;
}
/*
* Material pulls a nested list up into the entry below it. The rail is drawn
* across entry boundaries, so it needs them to meet rather than overlap.
*/
.md-sidebar--secondary .md-nav__item > .md-nav {
margin-bottom: 0;
}
.md-sidebar--secondary .md-nav--secondary > .md-nav__list > .md-nav__item:first-of-type > .md-nav__link {
margin-top: 0;
padding-top: 0;
}
.md-sidebar--secondary .md-nav--secondary > .md-nav__list > .md-nav__item:last-of-type > .md-nav__link {
padding-bottom: 0;
}
.md-sidebar--secondary .md-nav__link--active {
color: var(--em-text-muted);
font-weight: 400;
}
.md-sidebar--secondary .md-nav__link--raven-active {
color: var(--em-ink);
}
.md-sidebar--secondary .md-nav__link:hover {
color: var(--em-ink);
}
}