You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One thing I would find very useful is the ability to check if two selectors are semantically equal. I'm currently comparing the string representations of selectors, but that doesn't capture the fact that (for example) :is(a, b) means the same thing as :is(b, a) or that [a=\-1] means the same thing as [a="-1"]. postcss-selector-parser notionally has enough information in its AST to make these comparisons, so it would be awesome if that logic was implemented and made available as an API.
One thing I would find very useful is the ability to check if two selectors are semantically equal. I'm currently comparing the string representations of selectors, but that doesn't capture the fact that (for example)
:is(a, b)
means the same thing as:is(b, a)
or that[a=\-1]
means the same thing as[a="-1"]
.postcss-selector-parser
notionally has enough information in its AST to make these comparisons, so it would be awesome if that logic was implemented and made available as an API.For prior art, it may be useful to look at Dart Sass's AST and in particular implementations of the
operator ==
andhash
methods.The text was updated successfully, but these errors were encountered: