Skip to content

Add selector specificity tests pinning cascade ordering#4091

Open
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:css-selector-specificity-tests
Open

Add selector specificity tests pinning cascade ordering#4091
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:css-selector-specificity-tests

Conversation

@vogella

@vogella vogella commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

These tests pin the CSS 2.1 specificity that the internal Selector AST computes: 100 for an id, 10 for a class, attribute or pseudo-class, 1 for an element, and 0 for the universal selector, with combinators summing their operands and a selector list reporting the maximum.
Cascade ordering depends on these values, so locking them in keeps the parser replacement planned for the next step from silently shifting selector precedence.
The change is test-only and touches no production code.

Contributes to #3980.

Lock in the CSS 2.1 specificity the internal Selector AST computes
(id 100, class / attribute / pseudo 10, element 1, universal 0;
combinators sum, selector lists report the maximum). Cascade order
depends on these values, so the replacement parser planned for Phase 3
step 2 must reproduce them.
@github-actions

Copy link
Copy Markdown
Contributor

Test Results

   864 files  ±  0     864 suites  ±0   44m 53s ⏱️ - 2m 22s
 8 056 tests +  6   7 813 ✅ +  6  243 💤 ± 0  0 ❌ ±0 
20 602 runs  +321  19 947 ✅ +261  655 💤 +60  0 ❌ ±0 

Results for commit f730bcc. ± Comparison against base commit 8a0d043.

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