Files
rust_browser/tests/goldens.rs
Zachary D. Rowitsch dbadb659bc Add CSS cascade origin ordering per CSS Cascading Level 4
Author-origin declarations now always beat UA-origin declarations
regardless of specificity, fixing issues like `.btn-primary { color: white }`
failing to override UA `a:link { color: #0000EE }`. The cascade now checks
origin+importance weight before specificity: UA normal (0) < Author normal (1)
< Author !important (2) < UA !important (3).

The UA stylesheet is applied internally by compute_styles rather than being
prepended by callers, making origin structurally determined. Promotes 3 WPT
tests from known_fail to pass.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 16:35:44 -05:00

22 KiB