polish: keep wells on README code blocks; hide flanks until they truly fit
commit 68bc19f54a3ad88d433f3726eccc6e731483f717 · parent af1439ae41
· browse this tree
Ximianth, 2026-10-26 22:43:47 UTC
The exhibit pre-flattening was meant for file views (where the whole body is one pre and the frame is the box); scope it to pre.file so code blocks inside a framed README keep their wells. The flank hide threshold moves from 1250px to 1550px: below that, the flank's inner end still reached under the sheet.
diff --git a/chrome.go b/chrome.go index 711352d..c291707 100644 --- a/chrome.go +++ b/chrome.go @@ -141,7 +141,8 @@ body { } .flank.left { left: 0; } .flank.right { right: 0; transform: scaleX(-1); } -@media (max-width: 1250px) { .flank { display: none; } } +/* Below this, a flank's inner (already faded) end would still reach under the sheet. */ +@media (max-width: 1550px) { .flank { display: none; } } /* The arc: round buttons over the exhibit. Offsets along the arc are computed server-side into --dy; hover swaps the circle drawing, never the position. */ @@ -210,12 +211,14 @@ article p.clone.boxed { display: block; width: fit-content; } article .plaque { margin-left: auto; } article .plaque code { background: none; padding: 0; letter-spacing: .06em; } -/* Exhibit interiors: the frame is the box, so framed content drops its own wells. */ +/* Exhibit interiors. A file view's whole body is one pre (pre.file): there the frame + is the box, so that pre drops its well. Code blocks inside a framed README keep + theirs; they are exhibits' content, not the exhibit itself. */ .exhibit { margin-top: .5rem; } article .exhibit { margin-left: 0; } .exhibit > :first-child { margin-top: 0; } .exhibit > :last-child { margin-bottom: 0; } -.exhibit > pre, article .exhibit > pre { +article .exhibit > pre.file { margin-left: 0; background: none; border: none;