Repository navigation
Specify and verify the cascade priority matrix #449
Description
Goal and background
The engine already has compare_rule_priority and token value_priority; canonical autofix already compares rule shapes. The complete cascade contract still needs browser-observed verification.
Parent tracker: #445
Baseline: 70444b18c8102fa7a9d811ec51ef96902573792c
Phase: 2.0 freeze
Ownership and scope
mastercss-engine, mastercss-lint, @master/css-runtime, and site
Dependencies
- Freeze class, selector, condition and mode semantics #447
- Freeze directive removal and native definition ownership #448
Implementation tasks
- Build a matrix covering layers, importance, selectors/conditions, shorthand/longhand properties, value sources, custom utilities, groups, and native utility declarations.
- Distinguish engine ordering from the browser cascade. Direct values override tokens only within comparable scope, layer, and importance.
- Preserve necessary deterministic tie-breakers; do not remove stable ordering solely to satisfy a textual slogan.
- Verify that HTML class order, scanning batches, and runtime insertion order do not change the winner.
- Autofixes must preserve outcomes when other classes compete. Do not automatically apply a rewrite whose safety cannot be established.
Acceptance criteria
- Cover
p-md/p:8px, shorthand/longhand competition,display:block/block/flex, important declarations, cross-layer cases, groups, and native utility declarations. - Expected CSS bytes, priority metadata, and computed styles have a consistent explanation.
- Meaningful regression tests accompany changes; updating snapshots alone is insufficient.
Validation
Engine priority/layer tests, lint canonical/conflict tests, and runtime browser computed-style cases.
Completion report
Include source and test evidence, PRs, actual commands and results, and any CSS/API/syntax/migration impact. Checks that were not run or were blocked must not be reported as passing.
Final acceptance (2026-09-28)
The four-mode freeze-cascade matrix and three-browser runtime suite verify observable cascade and resource behavior. Native declaration ordering and refusal of unsafe canonical rewrites remain covered after Compose removal. No undefined-name or value-based property inference was introduced.
Merged into rust through PR #461 at 262adb809b928af7082107e1b5633d945cb7f427. The verified candidate is 16a90bdde96ef08ba4312e5d94aaf36d50048dca; removal commit 9d9817241 is preserved through integration merge e231a700e.
Final CI passes Linux package tests/lint/types (111/111 tasks), site build/CSS contract/Playground/lint/types and examples (36/36); Windows package tests (59/59 tasks, including Vite 676/676) and examples (36/36); Rust fmt/Clippy/workspace/codegen/parity; eight native targets; and Linux runtime/Next E2E. Runtime E2E passes 432 cases across Chromium, Firefox and WebKit, plus 10 Next cases.
Both deployments at this exact candidate pass page, canonical and removal-notice checks: Cloudflare and Vercel. Cloudflare health passes. Visual checks on the preceding candidate cover identical production site sources.
The dated audit preserves scoped commands and historical failures; this final result supersedes its pending CI status. The Compose integration review and site CSS review explain intentional contract changes. Site lint has 265 existing warnings and zero errors. No npm publication, package rename, version bump, lockfile change or release-workflow change is included.
Activity