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

V2.0.0 + 2.0.1 break [concatenated] some CSS files, older V1.1.3 - V1.1.7 is fine @ CLI Use #177

Closed
peterbowey opened this issue Nov 17, 2013 · 8 comments
Assignees
Milestone

Comments

@peterbowey
Copy link

I updated to the latest 'clean-css' V2.0.1 (from my older 'clean-css' V1.1.3).

Testing the results found that certain CSS style were concatenated with a resulting incorrect presentation in the client view.

Rolled back to 'clean-css' V1.1.7 and the results were fine.

Tried the 'clean-css' V2.0.0 and the same client side issue occurred [concatenation of some styles] - with incorrect client side presentation.

This is about a CLI use of 'clean-css', and not any 'node.js' use.

I notice that some CLI options have changed in the newer V2.0.+, however I have not yet determined what causes this 'error', as there are not logs, just an abrupt concatenation on some style CSS?

Comparing the older 'clean-css' CLI commands to the new 2.0.x, I note these changes:

[-e, --remove-empty] does not exist in the new
[--skip-advanced] has been added to the new
[--selectr-merge-mode |ie8[*]] has been added to the new

The only CLI command I have been using for all these versions has been [-o, --output [output-file]], as in "cleancss -o public.css public.css"

For now, my working solution is to the use the 'clean-css' V1.1.7

@GoalSmashers
Copy link
Contributor

@peterbowey We changed quite a lot of things in 2.0.x (thus major version change) which may result in this incorrect behaviour. Could you please share your CSS via gist or email it to dev(at)goalsmashers.com so we can track down the bug?

@XhmikosR
Copy link
Contributor

Also, if you skip advanced processing the output files should be like with v1.x. But as @GoalSmashers says please share your CSS.

@GoalSmashers
Copy link
Contributor

@peterbowey thanks for the files! Here are two quick questions regarding them:

  • Can you point me to a demo how a layout fails if clean-css 2.0 is used and/or give any tips regarding CSS files, like which one may cause trouble?
  • Does it happen in all browsers or some particular ones, like IE 7 and/or 8?

@peterbowey
Copy link
Author

@GoalSmashers
A) [per the clean-css 2.0.x CSS Error]: It happens in all client browsers [IE8/9/10/11, Google Chrome, Firefox, Opera].

B) I suspect it is the 2nd or 3rd [in order] CSS file I sent, as I remember opening this CSS asset in Firefox source [direct] to see just one CSS style 'invocation , rather than the normal 100+ it has.
I will do some more live tests on the new day via 'clean-css 2.0.x'.
Peter Bowey
Web Design & Developer
Peter Bowey Computer Solutions
69 Sutherland Ave, Victor Harbor, South Australia, Australia
Tel.: 08 8552 8630
Fax: 08 8552 9185
Email: support@pbcomp.com.au
Web: http://www.pbcomp.com.au/

  Making Windows, Macintosh & Linux work for you! 
  http://www.pbcomp.com.au/ 
  This email and any attachment is intended only for the exclusive and confidential use of the addressee(s).
  If you are not the intended recipient, any use, interference with, disclosure or copying of this material
  is unauthorised and prohibited.

  If you have received this message in error, please notify the sender by return email immediately
  and delete the message from your computer without making any copies and publishing the contents therein.

  Consider the environment before printing this e-mail. 

----- Original Message -----
From: Goal Smashers Dev Team
To: GoalSmashers/clean-css
Cc: Peter Bowey
Sent: Tuesday, November 19, 2013 1:22 AM
Subject: Re: [clean-css] V2.0.0 + 2.0.1 break [concatenated] some CSS files, older V1.1.3 - V1.1.7 is fine @ CLI Use (#177)

@peterbowey thanks for the files! Here are two quick questions regarding them:

a.. Can you point me to a demo how a layout fails if clean-css 2.0 is used and/or give any tips regarding CSS files, like which one may cause trouble? 
b.. Does it happen in all browsers or some particular ones, like IE 7 and/or 8? 


Reply to this email directly or view it on GitHub.

@GoalSmashers
Copy link
Contributor

That helps a lot - all the feedback is much appreciated!
It seems to be a more generic error.

Will update you as soon as we find out why it fails.

@ghost ghost assigned GoalSmashers Nov 18, 2013
GoalSmashers pushed a commit that referenced this issue Nov 18, 2013
* Adds a warning on an incorrect content or a closing parenthesis.
@GoalSmashers
Copy link
Contributor

@peterbowey clean-css 2.0.2 is out with a fix to your case. The fact is that your CSS has an invalid part at the end of line 54 - color:#535353;} - with 2.0.2 you will see a warning about it.

Minified CSS seems to be OK however it would be better to fix the warning.

GoalSmashers pushed a commit that referenced this issue Nov 18, 2013
* Adds a warning on an incorrect content or a closing parenthesis.
@peterbowey
Copy link
Author

@GoalSmashers many thanks; and a great tool with the 'warning' info..

@GoalSmashers
Copy link
Contributor

@peterbowey Great, enjoy!

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

3 participants