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.

@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Test Results

   864 files     864 suites   42m 52s ⏱️
 8 056 tests  7 811 ✅ 243 💤 2 ❌
20 602 runs  19 945 ✅ 655 💤 2 ❌

For more details on these failures, see this check.

Results for commit bb88085.

♻️ This comment has been updated with latest results.

@vogella vogella force-pushed the css-selector-specificity-tests branch 3 times, most recently from da08ff4 to 2364fd1 Compare June 15, 2026 12:59
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.
@vogella vogella force-pushed the css-selector-specificity-tests branch from 2364fd1 to bb88085 Compare June 15, 2026 15:58
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