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
Skip merging same properties while allowing same selectors to be merged? #730
Comments
You may want to use |
I already tried a {
color: blue;
}
a {
font-size: 16px;
font-size: 1rem;
} turns into a {
color: blue;
font-size: 1rem;
} when I'm looking for a {
color: blue;
font-size: 16px;
font-size: 1rem;
} |
Or is there a way to specify specific properties to ignore? |
Unfortunately, there's currently no way to do that. However it sounds like an interesting option to add. |
However in this very case you just need to specify a compatibility mode |
I am specifying ie8. Ah you're right! I was using cssnano which was obliterating it. Thanks! |
👍 |
On master (4.0 soon): cleancss -O2 --skip-aggressive-merging --compatibility ie8 ... Note |
@jakubpawlowicz so with your example, all the level 1 options are still active? On that note, given the recent proliferation of options at level 1, would it need something like the |
Fair point. The only two that are not boolean are |
The only useful case I can think of for |
Yes, that's the use case. Alternatively it could be Actually with the 2nd way you could still selectively turn on level 1 optimizations if needed too, e.g. |
@jakubpawlowicz indeed that would be very powerful. Perhaps with #853 you can invert some of those boolean options in level 1 and change |
You made a good point about inverting options, because saying |
The updated code on master should do the trick. Thanks @alexlamsl. |
👏 |
I want to merge same selectors, but want to keep same properties for fallback reasons.
The text was updated successfully, but these errors were encountered: