Back to the changelog View the v3.11.0 release on GitHub
v3.11.0
Check and inspect your config
A config is easier to trust when you can ask it questions. This release adds two CLI commands for that: one lists what your config registers, and the other finds what's wrong with it, without writing a file. A coding agent gets the same answers you do. The release also brings twelve recipes in line with their Open Components standards, so their text and borders keep their contrast in both themes, and the ones you can focus share one focus colour.
New
- A
checkcommand. Runstyleframe checkto validate your config without building it. It exits with1when it finds a problem or the config file doesn't exist, so it can stop a CI job or tell an agent to try again. Add--jsonfor one{ "ok", "diagnostics" }document on stdout, and--typecheckto run your project'stscon the entry file too, which needs thetypescriptpackage installed. - An
inspectcommand. Runstyleframe inspectto list the variables, themes, utilities, modifiers and recipes your config registers, or one section of them, likestyleframe inspect recipes. Add--jsonto get them as one document. In code, the newinspect(instance)function returns the same snapshot. - A guide for AI agents. Using Styleframe with AI agents covers the loop of
check,inspectandstrictbuilds, and the mistakes that build without a warning. Nine packages that shipped without a README now have one, and each links to the guide. - Card media, icon-only buttons and growing textareas. The new
useCardMediaRecipeputs an image at the top of a card. Buttons gain icon sizes and an icon-only style: a button withdata-icon-onlyanddata-sizeturns square and hides its label from view, but keeps it as the accessible name. Textareas gain anautogrowaxis, which grows the field with its text in browsers that supportfield-sizing. - Placement for tooltips and popovers. Both gain a
placementaxis (top,bottom,startorend), which defaults totop. On an element with thepopoverattribute, they open in the top layer beside their trigger and flip to the other side when there's no room. - A focus colour and five modifiers. The new
color.focustoken colours focus rings. It points at@color.primary, so nothing changes until you set it. The newhover-capable,any-pointer-coarse,aria-invalid,readonly-attranddata-loadingmodifiers come with aposition-try-fallbacksutility.
Improved
- Twelve recipes meet their standards. Button, Card, Checkbox, Checkbox Group, Input, Modal, Popover, Radio Group, Spinner, Switch, Textarea and Tooltip now follow their Open Components pages. Where their standards ask for it, labels keep 4.5:1 contrast and borders and tracks keep 3:1, in both themes. Hover styles apply only on devices that can hover, and buttons, inputs, textareas, radios and switches get a 44px hit area on touch screens. Most of them also draw in system colours in forced colours mode and at full strength with
prefers-contrast: more. Recipe names, axes, values and defaults stay the same, apart from the additions in this entry. - Buttons show every state. Buttons take their disabled, pressed, expanded and loading looks from
aria-disabled,aria-pressed,aria-expandedanddata-loadingas well as:disabled. A disabled button no longer setspointer-events: none, so its cursor shows and clicks don't fall through to what's behind it. - Modals fit the screen. A modal panel stays
1reminside the edges of the screen and caps its width per size, so you can drop anymax-widthyou set yourself. Its body scrolls while the header and footer stay put, and the page stops scrolling behind amodal-overlay. - Spinners match their text. The new
inheritsize makes a spinner1emwide and tall and lines it up with the text around it. With reduced motion, it pulses instead of turning. - No hover on tap. Link hover styles from
useLinkElementnow apply only on devices that can hover, so tapping a link, or a button rendered as<a href>, no longer leaves it looking hovered.
Fixed
- The separator in a date input takes the field's muted text colour on
lightanddarkfields, and@color.gray-400onneutralfields in the dark theme. Its dark-theme rule used a:darkpseudo-class that no browser matches.
Notes
- This release leaves the
styleframepackage at 3.9.2. To get the new commands,inspect()and the recipe changes, update@styleframe/core,@styleframe/cliand@styleframe/theme, which all work withstyleframe3.9.2. - The
styleframe buildcommand prints a warning for each problem it finds and exits with1when the build fails, where it used to exit with0. Withstrict: true, it writes nothing and exits with1when it finds a problem. - The bundler plugin logs each problem as a warning once per build, so you may see warnings you didn't see before. With
strict: true, it fails the build. - Render a
modal-overlayonly while its modal is open. The page can't scroll while an overlay is in the document, even a hidden one, so an overlay you keep mounted and hide, like withv-show, now locks the page. - Cards no longer set
overflow: hidden, so an image you put in a card yourself loses its rounded corners. Put it inuseCardMediaRecipe, which rounds its own, or clip it yourself. - CSS can't tell which side a tooltip or popover flipped to, so when one flips, set its arrow's
placementfrom a script. - The Spinner circle uses the
motion-reducemodifier, so register it first, asuseModifiersPresetdoes.