-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider exposing calculateSpecificityOfSelectorObject
#17
Comments
Maybe |
1 more way to improve this function is to allow our own csstree walker. Project Wallace is powered by CSSTree too, so we already have a walker function available, next to the full AST. If we could expose a function that would accept a |
What would that look like? Got some pseudo/theoretical code to clarify? |
Ah, sorry, misread the code: it doesn't use an AST walker, it just loops over some of the nodes 😬. So that already makes it pretty lightweight. The only dependency it seems to have is the |
As per request by @bartveneman on Twitter:
Considered this in the past but hadn’t done set yet because I’m not too happy with the name of the function. Open to suggestions for a shorter - yet also clear - name. If no alternative can be found, then I’m fine with exposing as is.
The text was updated successfully, but these errors were encountered: