v0.12.0
Cirth v0.12.0
Cirth v0.12.0 makes the 44px touch target a property of the components
rather than an outcome of the type scale, gives textarea a default worth
having, and fixes three bugs shipped with the popover and modal work in
0.11.0.
A minor, not a patch: nothing was removed or renamed, and every change here
is the framework doing what it already claimed to do — but two of them
alter how markup that already exists will render, and the version number is
the only warning most people get.
Before you upgrade
- A
textareawithoutrowsgets taller. Four rows instead of the
browser's two — 122px where it used to be 70px at the default type scale.
Pages with a comment box or a message field get longer. To keep the old
height, say so in the markup:<textarea rows="2">. An explicitrows
always wins, and always did. - Controls stop shrinking when you change their font size. Buttons,
selectandtextareanow hold a 44px minimum height regardless of the
type set on them, so a button styled at0.875remgrows from 40.75px to
44px. If you were relying on a smaller control, setmin-block-sizeon
it — or put it in anav, where the floor is 24px by design.
Changed
- A
textareaopens four rows tall instead of two. Two rows shows a
line and a half of a paragraph, so a control meant for prose opened as a
box you immediately scroll inside. The four rows are measured inlh, so
they stay four rows of that textarea's own text if you change its font
size, rather than four rows of the default scale. An explicitrows
attribute takes over completely: that is you declaring the height in the
markup, and the default only fills in where you have not.
Fixed
-
The 44px target size is now a floor, not a coincidence. A control's
height was padding plus line-height, which adds up to 44px at the default
type scale and stops the moment anyone sets a different font-size — a
button at0.875remcame out at 40.75px, aselectat 41px. Buttons,
selectandtextareaeach carry amin-block-sizemeasured from
--cirth-size-4rather than from their own text, so the guarantee
belongs to the component instead of to the type scale.Controls inside a
navopt down rather than out. A navigation row is
compact by design, so it restates the floor at 24px — WCAG 2.5.8 Target
Size (Minimum), the AA threshold — where 44px is 2.5.5's AAA one.[type="file"]::file-selector-buttonis exempt outright: it is a part of
the input rather than a target of its own, and the input is already 44px
tall. -
A modal's close button is a 44px target instead of a 16px one. It is
drawn as a 1rem icon and had 1rem of hit area to go with it, on the
control people reach for in a hurry. The icon is unchanged and nothing
around it moves — the box grows,background-sizekeeps the glyph at
1rem, and negative margins take the extra back out of the layout. -
An open, non-modal
<dialog>no longer locks the page. The scroll
lock added in 0.11.0 was keyed onhtml:has(dialog[open]), which is true
of a dialog rendered inline as ordinary content — so a page showing one
as an example could not be scrolled. It is nowhtml:has(dialog:modal):
only a dialog opened withshowModal(), the one that actually covers the
page, locks it. -
A popover stays centred when your CSS touches its margins. The
browser centres a popover withmargin: autoon all four sides, so a
rule like.container > :last-child { margin-bottom: 0 }left the other
sides to absorb the free space and slid the panel to the bottom of the
screen. The open panel declaresinset: 0; margin: autoitself now.
Anchor positioning still wins:position-areatakes precedence, so
nothing needs undoing first.
Full Changelog: v0.11.0...v0.12.0