Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

px fallback for rem units should not be removed in compatibility mode #333

Closed
ademarre opened this issue Aug 1, 2014 · 1 comment
Closed

Comments

@ademarre
Copy link

ademarre commented Aug 1, 2014

When using rem, a common way to add support for IE8 is with a px fallback:

.example {
  font-size: 24px;    /* Fallback for IE8 */
  font-size: 1.5rem;
  padding: 32px 16px; /* Fallback for IE8 */
  padding: 2rem 1rem;
}

The clean-css advanced optimizations are removing the fallback, even when compatibility is on. It would be great if compatibility mode could detect and preserve px fallbacks.

My current automated solution is to run robwierzbowski/node-pixrem after clean-css in my build. (See gruntjs/grunt-contrib-cssmin#112 (comment))
#186 addressed a related edge case.

@GoalSmashers
Copy link
Contributor

@ademarre this is due to a fact not all properties have advanced optimisations implemented. This is due in version 2.4 with #290. So far please use your workaround or a --skip-aggressive-merging switch.

PS) #186 addressed basic optimisations not advanced ones so not such easy fix this time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants