-
Notifications
You must be signed in to change notification settings - Fork 9
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
Minification Problem with CSS Pseudo-Classes #66
Comments
The issue description currently reads like the space is always required, which it isn't. |
I'm considering the use of this library to help us achieve a better-er-er, more standards-compliant compression for CSS. cc @raamdev ~ http://leafo.github.io/scssphp/ |
@jaswsinc That looks like an SCSS compiler, not specifically a CSS compressor. Does it support straight CSS compression? I looked through the docs but everything seems to indicate starting with SCSS and then outputting compressed CSS. |
Yes. Sure does! It's an SCSS library, and Sass (SCSS) is the most modern way of dealing with CSS compression. The SCSS syntax itself is such that any valid CSS file (i.e., something that we would be compressing), is also a valid SCSS file.
Over the past year or so I have been using SCSS almost exclusively in new projects, and I just finished converting ZenCache to SCSS also. The |
Fascinating! Thanks! I'll have to dig into SCSS a bit more. |
Closing. Resolved by: wpsharks/css-minifier#1 |
Next Release Changelog:
|
A copy of: wpsharks/comet-cache#544
Reference: https://webshark.zendesk.com/agent/tickets/7790
CSS pseudo-classes require a space between the class-name and pseudo-class-name. When minifying CSS with ZenCache, that space is removed, breaking the code.
For example:
.test :first-child { color: green; }
would be changed to.test:first-child{color:green;}
Work-Around to Avoid This Issue
To avoid this issue, choose "No, do not compress the code in any unified CSS files" from the panel at WordPress Dashboard → ZenCache → Plugin Options → HTML Compression.
The text was updated successfully, but these errors were encountered: