anandthakker / doiuse

:bomb: Lint CSS for browser support against caniuse database.
MIT License
1.25k stars 51 forks source link

rem unit not supported but fallback provided #23

Closed sebastienbarre closed 9 years ago

sebastienbarre commented 9 years ago

I'm using the pixrem PostCSS plugin, which transforms this:

.sky {
  margin: 2.5rem 2px 3em 100%;
}

into this:

.sky {
  margin: 80px 2px 3em 100%;
  margin: 2.5rem 2px 3em 100%;
}

Unfortunately, doiuse still reports an error, I assume it's not noticing a fallback was provided and choking on the second rule?

rem (root em) units not supported by: IE (8,9,10)

Thanks

anandthakker commented 9 years ago

This is an interesting issue. What do you think is the best way to support fallbacks like this? I suppose we could check for duplicates of the same property, and only test against the last one. The duplicate checking would be slightly tricky because of shorthand properties, but otherwise it seems pretty straightforward.

@sebastienbarre thoughts?

sebastienbarre commented 9 years ago

My gut feeling is that this is no longer an issue now that we can ignore rules (issue #25). This was the extra incentive for me to send that PR :) Since I know my build process always provides a px fallback, I can safely ignore the corresponding rule. Thanks. Feel free to close, unless you think it would impact others.

anandthakker commented 9 years ago

Cool, let's close for now. Something to mull over still, but I agree that the ignore option is at least a decent workaround.