-
Notifications
You must be signed in to change notification settings - Fork 16
Prevent IDE unused CSS selector warning #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
Comments
Fixed in |
It seems that the warning you're having is correct: You do not have a you may change your css selector to: <style lang="scss" module>
.login-form {
...
.email {
...
}
}
</style> Also, I don't know if the <style lang="scss" module>
.login-form {
...
:global(input) {
...
}
}
</style> |
Hi @micantoine My SCSS works good, just VS Code shows error. This means it's IDE plugin issue most likely. |
Yes, your code works as cssModules prevents non class selectors to be scoped (native mode). So if the Still, the IDE is telling you the truth. Your rule doesn’t exist within the component because At the end, I would recommend not to use .login-form { … }
.email { … } |
Oh! This is giving a sense, thank you very much for explanation and solution. (and generally for whole package, it's life saver!. |
When using css module classname
$style.myClassName
on a html element. The svelte IDE extension does not recognize it and highlight the class.myClassName
as an unused selector.The text was updated successfully, but these errors were encountered: