add panels and margin notes, with no engine code at all

Expandable sections, tabs and asides — three of the things parked earlier — turn
out to be two theme fragments and nine lines of CSS. That is what the container
mechanism bought: they needed no Go.

Tabs without script were the only real problem, and containers do not nest, so
:::tabs wrapping :::tab was never available. Sibling <details> elements sharing a
name attribute are natively mutually exclusive, which is what tabs are, so
grouping is one argument on the same fragment an expando already uses. A browser
too old for grouping opens them independently — the content is never hidden,
which is the failure mode worth caring about.

The aside is beside the text where the viewport has room and in the flow where
it does not, in one media query. No JS anywhere, and the demo case asserts the
page contains no <script> at all.

No ADR: nothing here is expensive to reverse, and the contract grew additively
as its stability rule allows.
This commit is contained in:
Claude Opus 5
2026-08-01 22:14:58 +06:00
committed by bdeshi
parent 8bfacc7e98
commit fdc76ba1b9
8 changed files with 43 additions and 5 deletions
+4
View File
@@ -127,6 +127,10 @@ var exampleFeatures = []featureCase{
{what: "an abbreviation expands and its definition line renders nothing", path: "/writing/notes-on-water/", code: 200,
expect: []string{`<abbr title="National Institute of Water and Atmospheric Research">NIWA</abbr>`},
absent: []string{"*[NIWA]"}},
{what: "panels and margin notes need no script", path: "/writing/notes-on-water/", code: 200,
expect: []string{"<summary>Show the raw transcription</summary>", `<details name="readings"`,
`<aside class="side">`, `<p class="side-title">On the gauges</p>`},
absent: []string{"<script"}},
{what: "a table of contents links the page's own headings", path: "/writing/notes-on-water/", code: 200,
expect: []string{`<nav class="toc">`, `<a href="#the-dialect">The dialect</a>`, `class="toc-2"`}},
{what: "a container renders its body through the theme fragment", path: "/writing/notes-on-water/", code: 200,