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.
A tab bar no longer looks like an outlined text field with a chip inside.
Material, Lightfield and Classic draw it as a row of labels over a soft
divider; the open tab keeps the text color and an accent underline, and
hovered tabs take a rounded fill.
KssStructuralMatch compared the name against eleven pseudo-classes in an
else-if chain; it is now `if name == { case "root"; ... case; }`.
Old and new versions agree on all 458,752 combinations of the fourteen
names tried (the eleven, an unknown one, "hover", and "") and the facts'
flags and small indexes, on C and on the portable runner. make check
passes on the pinned Ziran.
`ziran check --lint` found six casts that only widen a whole assigned
value (u8 to s32 or u32, float32 to float64). They are removed; the hex
digit arithmetic still happens on the byte before it widens. The
generated C of every KSS entry is identical before and after.
The lexer, parser, and formatter compared bytes with character codes
written as numbers (47, 42, 123, 58, ...). `ziran check --lint` found 226
such comparisons; they now read #char "/", #char "*", #char "{",
#char ":" and so on.
The change is textual only: the generated C of every KSS entry is
identical before and after, and `make test` passes with the pinned Ziran.
`ziran check --lint` found three casts that convert a value to the type
it already has: two cast(float64) on float64 parts of a number and one
cast(u8) on a byte. They are removed. `make test` still passes with the
pinned Ziran.
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.
kryon/system_theme and kryon/theme resolve both in a --project build
and in an app's module-path build with --module-path kryon=DIR, so an
app that compiles KSS from source without the package map can use it.
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.