Closed silverwind closed 3 years ago
That's definitely a bug and affects all the properties.
Seems correct. MDN also says it can be applied to any CSS property.
@silverwind I checked it right now and can't reproduce. May be you have some specific conditions?
Hmm, can't reproduce either with a fresh repo. Will check further.
Actually it seems it's an error on my side. I was liniting a Less source and the plugin was outputting a wrong line number and I saws color: inherit
near the reported line so I assumed it was that.
I've reduced the file down to the error and found out it's actually color: lighten(#000000, 70%)
that is causing the error and I guess that may just be expected because this plugin is probably not aware of Less functions.
The wrong line numbers are probably a different bug, maybe it has to do something with Less being involved.
I guess that may just be expected because this plugin is probably not aware of Less functions.
I believe you can extend type definition dictionary, if you want.
For example:
{
"plugins": [
"stylelint-csstree-validator"
],
"rules": {
"csstree/validator": {
"types": {
"color": "| lighten(<color>, <percentage>)"
}
}
}
}
Yeah, I think it should be possible to create a config to cover Less/Sass extensions with that, thanks.
According to the spec,
inherit
is a valid value for thecolor
property but it's being rejected:I assume this is an issue for many if not all properties that can take
<color>
.