CSSLint / csslint

Automated linting of Cascading Stylesheets
http://csslint.net
Other
4.77k stars 483 forks source link

Browser support rule using caniuse.com data #350

Open stubbornella opened 11 years ago

stubbornella commented 11 years ago

It would be great if developers could use CSS Lint to check browser support. Rather than having to guess which properties/selectors might not be supported, CSS Lint could warn when a particular portion of the CSS is unsupported.

This would be particularly powerful when using a CSS Lint plugin for an editor (like the one for SublimeText2), as you would immediately get feedback when you need to find a graceful fallback for an older browser.

e.g. "Firefox does not support "local" value for background-attachment."

I believe the necessary data could be pulled from http://api.caniuse.com/ (or the github account).

This would be very cool in conjunction with #349, because then you would only get warned about compatibility with browsers you care about.

What do you think?

stubbornella commented 11 years ago

Here is the data on github: https://raw.github.com/Fyrd/caniuse/master/data.json

(thanks Paul)

stubbornella commented 11 years ago

To avoid false positives, it would need to test the ruleset for the same property with a supported value.

stubbornella commented 11 years ago

Jared mentions that it might be slow w an external dependency.

nschonni commented 11 years ago

Probably better to download and embed the dependency like parser-lib

madskristensen commented 9 years ago

+1