Runs/html · chain · Fable 5.1/024
html · chain · Fable 5.1 · step 024 of 64
offline render, Chrome 154, light scheme, 2 s of virtual time
runs in a sandboxed frame with no origin; live pages may fetch CDN fonts the offline render did not
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<meta name="color-scheme" content="light dark">
<title>0</title>
<link rel="icon" href="data:,">
<style>
html {
-webkit-text-size-adjust: 100%;
text-size-adjust: 100%;
}
body {
max-inline-size: 40rem;
margin-block: 0;
margin-inline: auto;
padding:
max(1.5rem, env(safe-area-inset-top))
max(1.5rem, env(safe-area-inset-right))
max(1.5rem, env(safe-area-inset-bottom))
max(1.5rem, env(safe-area-inset-left));
font: 100%/1.5 system-ui, sans-serif;
overflow-wrap: break-word;
}
h1, h2, h3, h4, h5, h6 {
margin-block: 0 1rem;
line-height: 1.2;
text-wrap: balance;
}
h1 {
font-size: clamp(2rem, 1.5rem + 2.5vi, 3rem);
}
:is(h2, h3, h4, h5, h6):not(:first-child) {
margin-block-start: 2rem;
}
p, ul, ol, dl, blockquote, pre, table, figure, details, address {
margin-block: 0 1rem;
}
p, li, dd, blockquote, figcaption {
text-wrap: pretty;
}
figure {
margin-inline: 0;
}
blockquote {
margin-inline: 0;
padding-inline-start: 1rem;
border-inline-start: 0.25rem solid;
}
dd {
margin-inline-start: 1.5rem;
}
li > ul, li > ol {
margin-block-end: 0;
}
pre, code, kbd, samp {
font-family: ui-monospace, monospace;
font-size: 1em;
}
pre {
overflow-x: auto;
tab-size: 2;
}
sub, sup {
line-height: 0;
}
button, input, select, textarea {
font: inherit;
letter-spacing: inherit;
box-sizing: border-box;
}
table {
display: block;
max-inline-size: 100%;
overflow-x: auto;
border-collapse: collapse;
}
th, td {
padding: 0.25rem 0.5rem;
text-align: start;
vertical-align: top;
}
:focus-visible {
outline: 2px solid;
outline-offset: 2px;
}
:target {
scroll-margin-block-start: 1.5rem;
}
main > :last-child {
margin-block-end: 0;
}
img, svg, video, canvas, audio, iframe, embed, object, button, input, select, textarea {
max-inline-size: 100%;
}
img, svg, video, canvas {
block-size: auto;
vertical-align: middle;
}
@media print {
body {
max-inline-size: none;
padding: 0;
}
h1, h2, h3, h4, h5, h6 {
break-after: avoid;
}
p, li, dd, blockquote {
orphans: 3;
widows: 3;
}
a[href^="http"]::after {
content: " (" attr(href) ")";
font-size: 0.875em;
}
pre {
white-space: pre-wrap;
}
table {
display: table;
}
img, svg, video, canvas, figure, blockquote, tr {
break-inside: avoid;
}
}
</style>
<main>
<h1>0</h1>
</main>
what changed from step 023
+10 / -3 lines
margin-inline: 0; }+ blockquote {+ margin-inline: 0;+ padding-inline-start: 1rem;+ border-inline-start: 0.25rem solid;+ }+ dd {+ margin-inline-start: 1.5rem;+ } li > ul, li > ol { margin-block-end: 0;⋯ line 67 button, input, select, textarea { font: inherit;- }- input, select, textarea {+ letter-spacing: inherit; box-sizing: border-box; }⋯ line 91 margin-block-end: 0; }- img, svg, video, canvas, iframe, input, select, textarea {+ img, svg, video, canvas, audio, iframe, embed, object, button, input, select, textarea { max-inline-size: 100%; }
What the model said
`0.html` was already in good shape, so I made only a few small CSS changes, all in the stylesheet. I did not render it in a browser to check them.
## What changed
- **Blockquotes on narrow screens:** the browser's default 40px margin on both sides is replaced with a 1rem start padding and a start-side border, so quotes keep their width on phones and still look distinct.
- **Definition lists:** the `dd` indent is reduced from 40px to 1.5rem.
- **Overflow protection:** `audio`, `embed`, `object` and `button` now join the elements capped at `max-inline-size: 100%`.
- **Form controls:** `button` now gets `box-sizing: border-box` like the other controls, and all of them inherit `letter-spacing` along with the font.
The page content (`<h1>0</h1>`) and the markup are untouched.
## Things I left alone
- **Meta description:** there isn't one, and I didn't invent one, since the page has no real content to describe yet.
- **Tables:** `table { display: block }` makes wide tables scroll, but it can strip table semantics for screen readers in older browsers. The safer pattern is a scrollable wrapper `<div>` around each table, which needs markup changes once you have tables.
- **Scrollable code blocks:** a `<pre>` that overflows can't be scrolled by keyboard unless it has `tabindex="0"`, which also has to be added in the markup.