-
Notifications
You must be signed in to change notification settings - Fork 61
Remove or rename invalid -styled-mixin0
CSS properties caused by using mixins
#271
Comments
-styled-mixin0
CSS properties caused by using mixins
Yes, I have also received this Here is my work around: "rules": {
"selector-type-no-unknown": [true, {
"ignoreTypes": ["/^-styled-mixin/"]
}]
}, |
@jroebu14 Thanks for your suggestions. Sorry we didn't find a perfect solution. Comments may also introduce comment-related false-positive errors. Adding one more dash can't solve the problem from the root, either. And it can also break something like @leoyli's workaround. Currently, @leoyli's workaround is one of the best ideas. |
@chinesedfan, can be considered to add my workaround into the recommended setup? I mean people using it expect it can also take care about all valid use case. |
@leoyli @chinesedfan thanks for responding to my issue. Leoyli's is a good solution but unfortunately it won't work in our specific case where we're also using the csstree/stylelint-validator plugin. This plugin has it's own ignore option which doesn't support regular expressions. I have suggested this functionality in csstree/stylelint-validator. For now my workaround looks like this which is a custom stylelint processor we use in the processor pipeline after |
Hi, I'm running into the same issue with Suggestion:What about adding a configuration to give a custom name for mixins. Default would still be Thanks |
Would it be possible to prevent outputting invalid CSS properties that would fail a CSS syntax validation plugin such as csstree/stylelint-validator?
An example of this would be when using a mixin:
which the processor might output
My suggestion would be to wrap
-styled-mixin0: dummyValue;
in a CSS comment or prefix it with one more dash to turn it into a custom property e.g.--styled-mixin0: dummyValue;
The text was updated successfully, but these errors were encountered: