-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Wrong CSS "Unused CSS selector" #14204
Comments
Sorry I deleted my original comment. What exactly is broken here, there is no This is not a boolean attribute so the value is stringified. |
If a variable is used for the data attribute then the css is good. Not sure how intentional this is but it makes sense to me as the css parser seems to be quite literal about the hard-coded values. |
I too do not fully understand what you're trying to show here. If the variable is false, then it's ok that it's marked as unused? Or is it about the weird discrepancy of one being marked as used and the other not? |
I don't know what the To me, the issue is that the first one isn't recognized as unused, not that the second one is. |
Thanks everyone for the comments @Conduitry said
Which is what I kinda want to point out, I would indeed skip the At the end we'd have two unused CSS selector |
I had this use case (which I changed later to using a state variable) but meanwhile I had this inner component using the old DOM API to add and remove |
I dug into this and it turns out that this goes back to our TS stripping algorithm not working correctly. While it removes the TS nodes, the |
I've added comments on the zimmerframe PR My guts are telling me that mutating things is usually not the right way of doing things though |
Describe the bug
I think we should relax the CSS verification for attributes
In my code I had to add
data-active={false as true}
to not trigger the first CSS selectorThen I added the second CSS selector, but this one is not correctly picked up
Reproduction
REPL
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: