mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-12 12:32:21 +00:00
LibWeb/CSS: Make non-nested & selector have 0 specificity
If a & simple selector is on a style rule with no parent style rule, then it behaves like :scope - but notably, :scope provides 1 specificity in the class category, but & is supposed to provide 0. To solve this, we stop replacing it directly, and just handle the & like any other simple selector. We know that if the selector engine ever sees one, it's equivalent to :scope, because the nested ones will have been replaced with :is() before that point. This gets us one more subtest pass. :^)
This commit is contained in:
parent
219346011b
commit
7a104fef66
Notes:
github-actions[bot]
2024-11-09 13:30:26 +00:00
Author: https://github.com/AtkinsSJ
Commit: 7a104fef66
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2240
4 changed files with 19 additions and 17 deletions
|
@ -6,6 +6,6 @@ Rerun
|
|||
|
||||
Found 1 tests
|
||||
|
||||
1 Fail
|
||||
1 Pass
|
||||
Details
|
||||
Result Test Name MessageFail CSS Nesting: Specificity of top-level '&'
|
||||
Result Test Name MessagePass CSS Nesting: Specificity of top-level '&'
|
Loading…
Add table
Add a link
Reference in a new issue