Repository navigation
Accept the legacy -webkit-box-* properties, inert outside display -webkit-box - #259
thejackshelton wants to merge 9 commits into
Conversation
…webkit-box -webkit-box-align, -direction, -flex, -ordinal-group, -orient and -pack are read by Chrome 145 only under display -webkit-box and -webkit-inline-box (Blink ComputedStyle IsDeprecatedFlexbox), which Dragon refuses. They become surrogate shorthands of the flex family that set nothing, with Chrome's grammar (CSSParserFastPaths keywords, WebkitBoxFlex and WebkitBoxOrdinalGroup ParseSingleValue). The legacy-box-inert fixture proves them inert beside flex, inline-flex and block layout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JKaoLmr6Q9ij268L5imav2
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JKaoLmr6Q9ij268L5imav2
…es-native-na-mv5iob-legacy-box # Conflicts: # packages/dragon/test/aliases.test.ts
Commands: pnpm regen --skip lanes-host --skip tw-sweep (macos-26) and pnpm regen --only lanes-host (xcode-27), alternated to a fixed point, then pnpm regen --only tw-sweep (macos-26). Base: 290d11b Run: https://github.com/compiled-run/dragoncss/actions/runs/38070655151
…es-native-na-mv5iob-legacy-box
Commands: pnpm regen --skip lanes-host --skip tw-sweep (macos-26) and pnpm regen --only lanes-host (xcode-27), alternated to a fixed point, then pnpm regen --only tw-sweep (macos-26). Base: 4923513 Run: https://github.com/compiled-run/dragoncss/actions/runs/38076521151
…es-native-na-mv5iob-legacy-box
… driver kept this side's, whose stale profiles left text-latin-capture without web output); regenerate the grammar (pnpm grammar:gen); pnpm regen on CI rebuilds the rest Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JKaoLmr6Q9ij268L5imav2
Commands: pnpm regen --skip lanes-host --skip tw-sweep (macos-26) and pnpm regen --only lanes-host (xcode-27), alternated to a fixed point, then pnpm regen --only tw-sweep (macos-26). Base: a29bc42 Run: https://github.com/compiled-run/dragoncss/actions/runs/38081727403
|
One Chrome case fails on this head, and it is not this PR's: Everything this PR touches passes on 312894b (run https://github.com/compiled-run/dragoncss/actions/runs/38085466501): parity 603 passed, the new Generated by Claude Code |
Requested by Jack · project thread
Before:
-webkit-box-orient,-webkit-box-pack,-webkit-box-align,-webkit-box-flex,-webkit-box-directionand-webkit-box-ordinal-groupwere refused as unknown properties on every target, so any stylesheet carrying the old flexbox prefixes (Tailwind'sline-clamp-none, autoprefixed CSS, old resets) failed to compile even where they do nothing.After: Dragon accepts them with Chrome 145's grammar and emits nothing for them. Chrome reads these properties only under
display: -webkit-boxand-webkit-inline-box(BlinkComputedStyle::IsDeprecatedFlexbox, andis_webkit_box_in the flex layout algorithm), and Dragon already refuses those displays (display-legacy.ts), so outside them they are inert. The line-clamp pattern is still refused, through its display and-webkit-line-clamp.How: the six names are surrogate shorthands of the flex family that set no longhand (the same shape as
text-orientation). Their grammar comes from BlinkCSSParserFastPaths::IsValidKeywordPropertyAndValue(the keyword ones),WebkitBoxFlex::ParseSingleValue(any number) andWebkitBoxOrdinalGroup::ParseSingleValue(a positive integer), added togen-css-grammar.tsas overrides, since webref lists them without a syntax.-webkit-box-flexand-webkit-box-ordinal-grouptake the number grammar for math functions.Proof: the new Chrome fixture
legacy-box-inert(ltr and rtl) sets every property, with values that would visibly move boxes if they applied, on flex rows, flex columns, inline-flex and block boxes, and compares Dragon's layout with Chrome's.Test changes, with reasons:
aliases.test.ts: the "stay refused as unknown properties" list swaps-webkit-box-orientand-webkit-box-flex, which are now accepted, for-webkit-box-reflectand-webkit-line-clamp, which are still unknown.display-legacy.test.ts: the line-clamp pattern now reports two refusals (display and-webkit-line-clamp) instead of three, because-webkit-box-orientalone is inert.Passed: locally
pnpm typecheckand the platform-freelegacy-box,aliases,display-legacy,seams,registry-claims,animation-kinds,writing-mode,math-validityandunitstests. On CI, at 312894b afterpnpm ci:regen(run 38085466501): parity 603 passed (the new legacy-box-inert cases included), css-escapes 2, display-parse 1, hit-lanes 6, chrome-ports 13, registry-claims 8, tailwind-sweep units 37 and sweep 1. Parity'sreject-gradient-em-unknownand the summary test that counts it fail identically on master f88834c (run 38086087370), so they are not this PR's. The regen moves no profile row and no status; rows only gain the new fixture's cases.🤖 Generated with Claude Code
https://claude.ai/code/session_01JKaoLmr6Q9ij268L5imav2
Generated by Claude Code