(WIP) fix: correctly mark :not
selectors
#14176
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a start at trying to properly fix the matching behavior of
:not
selectors (#14168). I'm in favor of cancling the endeavour because in my opinion it's just too complicated to do correctly and will make the wholecss-prune.js
file a hot mess - frankly it already is very complicated, and this would boost that even further.The idea is to recognize when we're in a
:not
selector to revert the "did not match" logic. That itself sounds easy enough, but doesn't suffice at all. There are loads of special cases, which all need extra code::global(...)
we're right now assuming "yeah it matches", but we can't assume "yeah it does not match" for:not
, because it could.:not
does not apply", instead we also gotta keep track of "on of them did not match, so:not
applies"class:
or<svelte:element>
we gotta assume it does match, even within:not