-
Notifications
You must be signed in to change notification settings - Fork 11
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
suit regexp is weak #16
Comments
@maximkoretskiy ping |
Hi. Sorry for long response. I will be able to implement it next on next week end. |
@maximkoretskiy no worries, thank you! I'll let you know if I find the time to work on it but otherwise feel free to start if you can/want/have time ;) |
@giuseppeg Should attributes with a selector always be ignored? Is this the only bug or is there a list of rules to write against here? I can take a look at this |
@simonsmith the only things to reset are component roots and descendants I suppose, everything else should be ignored. .Component {}
.namespace-Component {}
.Component-descendant {}
.namespace-Component-descendant {} So yes attributes with a selector should be ignored because they will always be more specific than the above. One may be tempted to add the attribute selector case to the current check but keep in mind that this plugin can run on anything (utilities files, resets and non-suit compliant code) so we really want to make sure that we reset only components classes. |
I see, okay. We can safely ignore pseudo classes too? Current version checks for presence of |
I guess so. |
Hi, I know that regexps are expensive but the one for suit is very flaky and weak.
For instance the plugin resets things like
which results in specificity issues e.g.:
Is compiled to
and because
.Component[aria-hidden="true"]
is more specific than.Component
font-size: 3em
is overridden.You may want to use
postcss-bem-linter
's regexps.We are considering to add this plugin to suitcss and this is a blocker.
Let me know if you need some help ✌️
The text was updated successfully, but these errors were encountered: