v3.0.0
Added
-
<kbd>is styled in prose. Nothing painted it before, so a key name rendered as
body text and read as the word beside it. It takes the inline-code sizing —--bg-alt
fill,--font-mono,0.8em,nowrapso a key never wraps mid-name — plus a cap edge:
a 1px border and a0 2px 0shadow under it, both from--kbd-edge. That is a local
mix of--fginto--border, which darkens on light and lightens on dark; a fixed
color would have vanished into one theme or the other. A chord nests per the spec —
<kbd><kbd>Ctrl</kbd> + <kbd>C</kbd></kbd>— where the outer element groups rather than
names a key, so:has(kbd)takes the cap off it and leaves the inner two.CSS: the selector is
.prose kbd.--kbd-edgeis declared on that rule rather than
on:root, same as--admon admonitions, so a site retuning the edge sets it in its
own.prose kbdblock — setting it higher up will not reach.
Changed
-
The copy button on a code block is
<copy-elemental>now. The one the theme drew
itself did the visible half and none of the other. It swapped an icon to a tick and told a
screen reader nothing at all, which is
WCAG 2.2 SC 4.1.3 Status Messages
unmet — and a clipboard write that failed swapped nothing, so a refused copy and a button
nobody pressed looked exactly alike. Both halves are what the element exists for, so the
theme takes it rather than growing a live region of its own.book-of-elementalsis
^0.5.0(was^0.4.0), which is the release the element arrived in.What a reader gets: the tick is said out loud as well as drawn; a failed copy is red
and says Copy failed in the same corner tooltip the success uses; and on a page served
over plainhttp, wherenavigator.clipboarddoes not exist to be asked, there is no
button rather than one that quietly does nothing. What lands on the clipboard is also
trimmed now — leading newlines and trailing whitespace, so a pasted block does not run its
last command on arrival, and indentation is left alone.DOM this changes: the
.code-wraparound each.prose prestays. Inside it the
button is now
<copy-elemental for="…"><button data-tip data-tip-error></button></copy-elemental>, plus
the<span role="status">the element appends for the announcement. The button has lost
its.copy-btnclass and its two inline<svg>s — the icon is a CSS mask. A<pre>with
noidis givencode-block-N, sinceforis how the element finds what to copy; an id
the page already uses is stepped over rather than taken.CSS this changes: every
.copy-btnrule is gone, and a site overriding one is
overriding nothing. The button iscopy-elemental > button, its states are
copy-elemental[data-state="copied"]and[data-state="error"], and the stand-down inside
a live sample iscode-preview copy-elemental { display: none }. The look is the element's
own theme with four properties re-pointed:--copy-elemental-surfaceto--bg,
--copy-elemental-border-colorto--border,--copy-elemental-hoverto--bg-alt,
--copy-elemental-icon-sizeto1rem.Canvasis what the first of those had been —
the UA's page colour, which is a shade off this theme's own on a dark page. -
The sidebar drawer inherits 0.5's
<disclosure-elemental>fixes. Its region — which
here is#sidebar-nav— is nowdisplay: flow-root, so a region whose first or last child
carries a margin no longer slides open past where it sits and snaps back, and it carries
data-state="open"/"closed"alongsidehidden. Nothing in this theme moves: the rail's
inset is on.sidebar > .navand nothing in there was collapsing a margin out through the
edge. A site that gave the region adisplayof its own still wins — the rule is one
class — but one leaning on a child margin escaping it has that to put back.
Fixed
-
Tapping the search field no longer zooms iOS into the topbar. Safari zooms the page
whenever a field under 16px takes focus, and it does not zoom back out when the field is
blurred — so one tap on search left the reader scrolled sideways through a magnified page
with no way back but a pinch.#search-inputwas0.9rem, which is 14.4px at the default
root size. It ismax(16px, 1em)now: 16px is Safari's threshold verbatim, so it holds even
for a reader whose root size is smaller, which a plainremwould follow straight back under
it; the1emarm lets a scaled topbar carry the field up.It is not a phone-only bug and it is not gated behind a media query, because the two queries
that look like they would scope it both miss the same device: an iPad with a trackpad
attached clears the 40rem breakpoint and reportspointer: fine, and its screen still
gets tapped. A site retuning the field wants a floor of its own, not a barefont-size.
Changed
-
Code blocks carry the same 16px floor as the search field.
.prose prewas0.85rem
— 13.6px on a default root, small enough on a phone that reading a snippet meant pinching,
and pinching a block that scrolls sideways zooms the page instead. It ismax(16px, 1em)
now: body size in an ordinary article, and never under the size iOS zooms below. That
second half is not only about legibility — acode-previewpane can make a block editable,
and an editable block is a field Safari will zoom into on focus like any other.
The extra width goes to theoverflow-xthe block already had.Inline code and
<kbd>are unchanged: both are sized inem, so they follow whatever text
they sit in rather than the root, and neither can take focus.CSS: the selector is
.prose pre. A site that wants the old density should keep a floor
rather than replace the declaration outright — a barefont-size: 0.85remthere puts an
editable preview back under the threshold.
Full Changelog: v2.0.0...v3.0.0