Hide prefixed css?
ShaggyDude opened this issue ยท 6 comments
'-webkit-appearance: button;' is giving a warning 'CSS Appearance not supported by: IE (11)'.
Shouldn't this be hidden because '-webkit' only applies to webkit?
It isn't really obvious what the right behaviour is.
Technically, -webkit
only works in webkit browser so it should complain at any none webkit browser.
No I think it should not complain at all. Anyone typeing -webkit knows they are doing something for webkit only. anything that is autoprefixed -webkit is something that is supported?
But the point of this tool is to tell you what browsers are supported by your stylesheet. Since you use webkit specific properties your stylesheet is only supported by webkits ~ and similar.
If you need exceptions for progressive enhancement or fixing a browser specific bug you have /* doiuse-disable feature */
. Then it is also clear from your stylesheet that you avoided a test.
I think the main issue here is, that after running Autoprefixer, you want to know just about "what's left" (as Autoprefixer denied implementing such reporting functionality in favor of doiuse).
@ai thoughts?
Users need to write hacks with prefixes even with Autoprefixer, so I think doiuse it will be good to avoid warning for prefixed properties
Anyone typeing -webkit knows they are doing something for webkit only. anything that is autoprefixed -webkit is something that is supported?
Kinda. For example, Firefox supports -webkit-box-clamp
: https://caniuse.com/?search=line-clamp
As an author, I would like to know what my -webkit-*
isn't going to work on the browsers I listed. And I'd be happy to know that browsers beside -webkit
also support the syntax. If all my supported browsers pass then I'm good. But if one of the fails, then I have to ignore the rule and script some workaround. (I do this for -webkit-mask-image
for example.)
This shows that prefixes are not really related to the browsers anymore. That also means we can't just say "Don't show webkit
errors on Firefox`.