cuth / postcss-pxtorem

Convert pixel units to rem (root em) units using PostCSS
MIT License
2.03k stars 174 forks source link

Add ability to black list selectors #5

Closed spacedawwwg closed 9 years ago

spacedawwwg commented 9 years ago

Would be nice to add the ability to black list selectors. A use case would be :before and :after in IE9, IE10 do not like using rem's in line-height

Being able to black list psuedo elements would allow a work around.

mars-abd commented 9 years ago

It will be good to have ability to ignore some properties locally (not all properties by name), may be by comments, I don't know how

cuth commented 9 years ago

Right now a good trick is to use an uppercase letter in the "px" since the match is case sensitive.

a {
  font-size: 12Px;
}

This would be ignored by pxtorem and still work in all browsers.

mars-abd commented 9 years ago

It's a little bit unobviously, but it is good! I think it should be added to readme docs.

cuth commented 9 years ago

You are correct. That needs to happen.

cuth commented 9 years ago

I've added a paragraph to the README about ignoring declarations with uppercase px.