10 Commits
Author SHA1 Message Date
waozi b60763223b Make translate the standard move and rename the part metric
translate: x [y] is a transform property now: it moves the whole box at
paint time after rotate, scale and transform, through Kryon's paint
transform pass, and transition: translate eases it. The widget part
metric it used to set (a NavigationBar panel's width, a Modal panel, a
Segment's label padding) is -kryon-content-offset; the three presets
use it, and there is no alias. The pack format is 118 words a rule.

Tests: the classic pack keeps NavigationBar 340, Modal 420 and the
Segment label padding as content offsets with no visual translate, and
a :hover translate lifts a box by 2px and applies after rotate.
2026-11-23 04:44:46 -03:00
waozi 0ca5922573 Store compiled pack rules sparse
Most of a rule's 116 words are zero. A pack now stores each rule as a
four-word mask of the words that are set, then only those words, and
CssSheetLoad unpacks them; CssPackRule writes the form for css_tool and
the tests. The Material pack the app starter loads shrinks its portable
bundle by 96,289 bytes (4,105,197 to 4,008,908). A pack carries
compiled.rule_count; one without it, or one that ends inside a rule, is
refused as stale.
2026-11-23 04:05:06 -03:00
waozi f748d90d94 Read transform, scale, rotate and transform-origin natively
transform takes translate(), scale() and rotate() and their X and Y forms
in any order that does not shear, kept as one translation, turn and x and
y scale; scale, rotate and transform-origin are read too, and a
transition that names transform (or all) sets how a change eases. They
are box fields Kryon's paint transform pass applies on every host.
Skew, matrix(), 3D functions, translate() percentages and shearing lists
fail a plain native parse with the reason; a shared sheet leaves them to
the browser.

Transforms are opt-in paint code in Kryon: CssSheetInstall refuses a
sheet that sets one until the app has called PaintTransformInstall(),
and says so. The browser-only transform message this replaces is gone.
The pack format is 116 words a rule. Pins Kryon fdd70c4b.
2026-11-23 03:08:06 -03:00
waozi 8cc92b4e52 Read per-side borders and outline natively
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.
2026-11-22 23:17:16 -03:00
waozi 161ca72c41 Map box-shadow, font and generic families to native roles
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.
2026-11-22 19:05:27 -03:00
waozi 82398790ca Lower CSS box properties to native layout and use one pack layout
margin (with auto), min-width, max-width, max-height, overflow and
text-align now compile to Kryon's StyleBoxData instead of passing to
the browser. Compiled packs use a single 69-word rule and 22-word
condition layout; a pack in an older layout is refused as stale, and
the five rule formats and the old condition format are gone. The
layout test checks centering, margins, clamps and clipping at 550 and
1200 px. Tests import kryon/Frame. Pins Kryon 28453c71.
2026-11-22 17:32:59 -03:00
waozi e87bd75a45 Report recoverable and browser-only native CSS issues 2026-11-22 15:55:25 -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