You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 36b3170
Browse filesBrowse the repository at this point in the historyBrowse files
CssData: index nested and layered rules; resolve colours through the engine
Three consumer-side changes the refreshed engine needs to actually take effect.
CssData.IndexRules now recurses into IStyleRule.NestedRules and ILayerRule.Rules.
A CSS-Nesting child rule lives in its parent's NestedRules, deliberately outside
Children, so it is invisible to Stylesheet.Rules - without the recursion every
nested rule would parse and then silently never apply. Likewise, once `@layer
name { ... }` parses into a LayerRule, its contents would fall through the
if/else chain and stop applying; they are now indexed as ordinary unlayered
rules. Layer *precedence* is still not implemented.
CssData.FlattenStyleRules replaces the top-level-only Stylesheet.StyleRules scan
in DomUtils.WriteStylesheet/CollectSimpleSelectorStyles and
DomParser.SetTextSelectionStyle, so a ::selection rule nested inside @layer or
another rule is still found.
CssParser.ParseStyle no longer lets a bare `@layer a, b;` statement close the
@import prologue - that is legal before @import per CSS Cascade 5, and treating
it as a non-import rule silently skipped every @import after it.
CssValueParser.GetColorByName falls back to the engine's ToResolvedColor when
the adapter's palette does not recognize a value, so lab()/oklab()/lch()/
oklch()/color-mix() resolve to real colours everywhere a colour is parsed
instead of coming out black. It also fixes `transparent`, which the palette
reports with a zero alpha and which was previously rejected as invalid.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
0 commit comments