etodanik / ie8linter

A little tool to lint websites for IE8 compatibility, with warnings for possible pitfalls
http://ie8.caffeine.co.il/
MIT License
727 stars 20 forks source link

More sophisticated regEx #5

Open davidhund opened 9 years ago

davidhund commented 9 years ago

I noticed was that your regular expressions are very naive: e.g. it picked up the following rule:

.some-rule {
    background: #fff url('../img/bg_creme.png') repeat-x 0 0;
}

and —because the regEx simply matches rem in the property value— warned about using REM.

One (still simplistic) way to improve this specific regex would be to check for /\drem/.

This would probably go for most other tests...

etodanik commented 9 years ago

right, that's true.

If you have some spare time and want to submit a Pull Request, it is very straight forward to edit the regex. There is a hash of them here: https://github.com/israelidanny/ie8linter/blob/master/specs/unsupported-css.js

otherwise I'll probably do it over the course of the weeek.

davidhund commented 9 years ago

Yup, I'll see what I can do.