Selectors: + and ~ match siblings already submitted in the same frame, restricted to a typed/class/id left side directly before the styled compound; chains and ancestor+sibling are refused with clear errors instead of silently mis-matching. The removed HTML DOM backend takes its DOM-browser tests with it. Flex: flex-basis accepts lengths (px, rem, em, vw, vh) and percentages of the measured flex row inner width; auto and content-based keywords stay browser-only until Kryon measures content sizes. Packs are regenerated, the properties README table and catalog output match the parser, and css_tool exposes the selector diagnostics.
A usability trial ran five ordinary web stylesheets through css_tool
check. Its fifteen most frequent non-native features are handled here.
HTML type selectors that are one Kryon widget match it: a, p, button,
input, textarea, select, img and body. Headings, tables, label and plain
containers fail with their native form. Browser-only declarations and
common web properties without a native form (position and its offsets,
backdrop-filter, named grid areas, box-sizing, aspect-ratio, object-fit,
overflow-x/-y, place-items, appearance, float) say what Kryon does
instead, as do z-index, cursor, display: none and inline-*, unequal grid
tracks and percentage sizes inside min(). Two classes in one selector and
unequal block padding name the native form.
css_tool check exits with status 1 when it skipped anything natively and
stays at 0 for browser-only declarations alone.
border-top, border-right, border-bottom, border-left and the logical
block and inline sides, each with -width, -color and -style, become box
fields on Row, Column and Grid, var() values included; a uniform border
later in the same rule clears earlier sides. With a border radius a box
paints its uniform border, and css_tool check reports it. Border widths
take thin, medium and thick.
outline, outline-width and outline-offset size the native focus ring;
outline: none keeps it, which css_tool check says. The pack format is 82
words a rule and the README table lists the new properties. Pins Kryon
d97c19e8.
A plain CssSheetParse no longer skips a browser-only declaration
silently: it fails with a message that points shared sheets to
CssSheetParseWithDiagnostics, which keeps native rules and reports the
declaration. The web declaration counters on the parser and sheet are
gone; packs refuse such declarations through the same parse, and the
formatter counts them from the recorded declarations.
The README property table is generated by css_tool properties from the
parser's catalog, make check fails when it is stale, and the parse tests
read every catalog row natively on its target.
box-shadow selects an elevation role: none clears it, a shadow whose
largest blur is at most 8px is raised and a softer one floating. The
font shorthand sets style, weight, size and line height; its size is
one term so the slash starts the line height. A generic first family
keeps the theme face and monospace selects the code font role. The
diagnostics fixture uses text-transform as its browser-only example.
Behavior tests for the parser, sheets, formatter, migrator and DOM
export; a conformance digest that C, C++, Go, ZX, Android and the
browser export must agree on; and a sanitized fuzzer. The export keeps
Kryon's rule ranking, HSL rounds as browsers round it, and the
migrator refuses output that would not parse.
Work in progress: the CSS parser, sheet, compiled packs, formatter,
migrator and DOM export replace the KSS reader. Tests and downstream
conversion follow.
The byte classes the lexer reads, white space, digits, letters, hex
digits, and name and selector-name characters, were Bend laws over one
representative byte per class on Kryon's old runtime. They are now
Ziran laws proved for every byte, and `make test` checks them.
The fuzz check now ignores vertical tab and form feed as the lexer
does, so it cannot see them vanish from quoted text. This test formats
a sheet with both inside a quoted value and requires the formatter to
copy them through.
KSS moves here from Kryon, with the classic, lightfield, and material
style packs, the pack module generator, and the parser tests and
sanitized fuzzing. Kryon keeps the rule table and style resolution;
apps that read .kss text add this package and import kss/Kss or
kss/SystemStyle.