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

Merging rem rules sometimes removes pixel fallback, even with compatibility/skip aggressive flags #558

Closed
kinglozzer opened this issue Apr 28, 2015 · 4 comments
Labels

Comments

@kinglozzer
Copy link

Take the following example:

.class {
  font-size: 11px;
  font-size: 1.1rem;
  margin: 0 0 1em; /* Note, merging works if this rule is removed */
}

.class strong {
  font-weight: bold;
}

.class {
  font-size: 14px;
  font-size: 1.4rem;
}

cleancss -o test.min.css test.css --compatibility ie8 --skip-agressive-merging

Output is:

.class{margin:0 0 1em;font-size:1.4rem}.class strong{font-weight:700}

Tested on v3.2.6.

@kinglozzer
Copy link
Author

Setting the --skip-advanced option works, so it’s something in the advanced merging. Possible duplicate of #363, although that was (incorrectly?) closed in 13e6752.

@jakubpawlowicz
Copy link
Collaborator

@kinglozzer thanks for reporting, I'll take a closer look in the evening - may be a regression from 3.1.x.

jakubpawlowicz added a commit that referenced this issue May 3, 2015
We apparently had a `joinAt` in wrong order so adjacent properties
were not merged correctly when in compatibility mode.
@jakubpawlowicz
Copy link
Collaborator

@kinglozzer It's fixed in 3.2.7.

@kinglozzer
Copy link
Author

👍 thanks @jakubpawlowicz

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

No branches or pull requests

2 participants