Skip to content

sizing: fold the thirteen size parsers into one - #293

Merged
samoht merged 1 commit into
mainfrom
sizing-one-parser
Aug 2, 2026
Merged

sizing: fold the thirteen size parsers into one#293
samoht merged 1 commit into
mainfrom
sizing-one-parser

Conversation

@samoht

@samoht samoht commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Each sizing family now names its CSS property, class prefix, keyword table and suborder offsets as data, so one parser, one to_style and one to_class serve all of them; the container scale and its defaults are defined once instead of three times.

Emitted CSS is byte-identical for 1071 sizing classes and for the whole-list ordering run, and 61 rejected shapes still parse-fail the same way. The one behaviour change: size-<n>/<m> fractions outside the old eleven-entry list (size-3/8, size-4/12, ...) parsed but then raised Failure from to_style; they now resolve to the percentage every other family already gave them.

Each sizing family now names its CSS property, class prefix, keyword table
and suborder offsets as data, so one parser, one to_style and one to_class
serve all of them, and the container scale is defined once.
@samoht
samoht merged commit e79fb1e into main Aug 2, 2026
2 checks passed
@samoht
samoht deleted the sizing-one-parser branch August 2, 2026 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant