Fix `value-no-vendor-prefix` false positives for `-webkit-box`
See original GitHub issueWhat is the problem you’re trying to solve?
I recently applied a fairly straightforward stylelint config to a legacy project and found that several instances of display: -webkit-box;
got changed to display: box;
, as I would expect with the value-no-vendor-prefix
rule enabled.
However, to my surprise not only is there not an equivalent non-prefixed display
value available, display: -webkit-box;
and the related -webkit-line-clamp
property have been added to the CSS Overflow Module 3 spec in that same vendor-prefixed syntax. As far as I can tell, display: -webkit-box;
is the only valid way (even in non-webkit browsers) to produce the line -webkit-line-clamp
behavior at the time of writing.
I was able to avoid this autofixing by adding
"value-no-vendor-prefix": [
true,
{
"ignoreValues": ["box"]
}
]
to my .stylelintrc.json
, as the docs correctly suggest.
What solution would you like to see?
Have "ignoreValues": ["box"]
be the default value of value-no-vendor-prefix
Issue Analytics
- State:
- Created a year ago
- Comments:6 (6 by maintainers)
Sorry for the confusion. Let’s do it this way, i.e. make the change in the standard config.
If they’re been standardized for legacy compatibility then we should probably fix the behaviour of the rules so that they’re not flagged as problematic.