Commit Graph
12 Commits
Author SHA1 Message Date
waozi 00d65fcb36 Refuse browser-only CSS natively and generate the property table
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.
2026-11-22 19:15:09 -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 48f2da629b Flatten nested & rules into compound selectors
A rule can hold &:state, &.class, &#id and &[attribute] rules one level
deep. Each adds its parts to every parent selector, is read after the
parent yields, and exports with the parent's selector text. A part that
repeats a parent's class, id, attribute or state with another value is
an error. Combinators, :not() and child-position pseudo-classes stay
errors, now naming the native idiom, because native styles are matched
without tree context.
2026-11-22 19:00:19 -03:00
waozi 3effc75222 Resolve calc(), min(), max(), clamp(), em, vw and vh natively
Lengths read through one expression reader. Without viewport units an
expression folds to pixels as the sheet is read, so box, size and flex
lengths take calc() and em too (em is the rule's own font-size, else
16px). With vw or vh it stays a clamp of linear forms the install
evaluates against the environment's viewport; packs carry them in an
exprs table, and CssSheetSameMedia reports a change when a new viewport
changes an active rule's length. A var() fallback may hold one more
var(), and var(--kryon-NAME) reads the installed theme palette.
2026-11-22 18:54:17 -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 834f60cff8 Compile native flex styles and responsive layout packs 2026-11-22 16:32:02 -03:00
waozi e87bd75a45 Report recoverable and browser-only native CSS issues 2026-11-22 15:55:25 -03:00
waozi 7dd9fff21b Enable native viewport grids in CSS 2026-11-21 17:08:31 -03:00
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 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