Commit Graph
12 Commits
Author SHA1 Message Date
waozi 95fd8e09cb Compile native CSS transitions and keyframes 2026-11-20 01:52:45 -03:00
waozi 850bf7465c Resolve native CSS color mixes and reduced-motion queries 2026-11-20 01:07:50 -03:00
waozi ad4ec746bb Expand native CSS authoring and remove legacy KSS 2026-11-19 22:12:22 -03:00
waozi 240cf61ab6 Test the CSS subset on every backend
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.
2026-11-07 13:53:00 -03:00
waozi bc247a75de Parse Kryon styles as a CSS subset
Work in progress: the CSS parser, sheet, compiled packs, formatter,
migrator and DOM export replace the KSS reader. Tests and downstream
conversion follow.
2026-11-07 13:15:02 -03:00
waozi 7646df8106 Use shared rule capacity for custom KSS sheets 2026-10-09 00:35:23 -03:00
waozi 8dfb075422 Support typed customization tokens and preserve rejected style snapshots 2026-10-09 00:14:04 -03:00
waozi c6f104e0ac Write the structural pseudo-class dispatch as an if-case
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.
2026-09-30 08:11:17 -03:00
waozi d416dde5d6 Let Ziran widen values without explicit casts
`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.
2026-09-30 07:31:45 -03:00
waozi 4e2868c3af Write compared characters as #char literals
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.
2026-09-30 07:27:46 -03:00
waozi f8c92299d3 Drop casts to a value's own type
`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.
2026-09-30 07:21:57 -03:00
waozi 95387b23f5 Parse, format, and install KSS style sheets as a package over Kryon
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.
2026-09-29 20:56:55 -03:00