-
Notifications
You must be signed in to change notification settings - Fork 26
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
css minify script issue with removing empty {} #23
Comments
Hi soma, in my opinion, empty brackets should be removed. How did the empty brackets influence your code? If they were removed incompletely, this could be a serious bug. Did this happen again? Thank you in advance! |
I reviewed this and can't remember what exactly the case was... But I managed to get a faulty replacement like the "}" but only if there's a rule before it and in the media query a empty rule
This gives me
This
gives me
So it would be nice to have a fix for this cases |
This is related to our intension to switch to a third-party CSS compressor (#34). I think, the problem will be solved automatically. |
I just tested the two cases which somatonic reported and the new YUI CSS compressor handles those correctly. The first case results in
The second case results in no output as the resulting style is empty. |
Soma, can you please verify if the current version of AIOM (3.2) fixes this issue? |
Sorry - I read over the answer of @hwmaier. In this case, I think this issue is solved. @somatonic: If the problem still occurs, feel free to reopen this issue. |
In the CSSMin php
// ------------------------------------------------------------------------
// Remove empty blocks.
// ------------------------------------------------------------------------
// $_source = preg_replace('/}[^\/}]+{}/', '}', $_source);
I had to comment out because I like to have some media query in some css empty while developing. The removing of the empty brackets lead to unexpected results with "open" media queries.
The text was updated successfully, but these errors were encountered: