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

It skips the first rule after a block of comments #192

Closed
jcayzac opened this issue Dec 16, 2013 · 4 comments
Closed

It skips the first rule after a block of comments #192

jcayzac opened this issue Dec 16, 2013 · 4 comments

Comments

@jcayzac
Copy link

jcayzac commented Dec 16, 2013

/*
@import url(//fonts.googleapis.com/css?family=PT+Sans+Caption:400italic,400,700italic,700);
@import url(//fonts.googleapis.com/css?family=Droid+Sans:400,700);
@import url(//fonts.googleapis.com/css?family=Open+Sans:400,700,800);
@import url(//fonts.googleapis.com/css?family=Inconsolata:400,700);
*/
.vrac {
  overflow: hidden;
  position: relative; }
  .vrac:before {
    content: "";
    display: block;
    height: 0;
    padding-top: 44.44444%; }
  .vrac > *:first-child {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%; }
$ ./node_modules/.bin/cleancss boo.css
.vrac:before{content:"";display:block;height:0;padding-top:44.44444%}.vrac>:first-child{position:absolute;left:0;top:0;width:100%;height:100%}

The .vrac rule is gone…

(I use version 2.0.2)

@GoalSmashers
Copy link
Contributor

Hi Julien,

That's an interesting issue we haven't seen before. Will update you as soon I get to dev machine and find out why it happens (Wednesday for sure).

By the way is it possible to workaround it by putting an empty declaration before .vrac ?

On 16 Dec 2013, at 05:45, Julien Cayzac notifications@github.com wrote:

/*
@import url(//fonts.googleapis.com/css?family=PT+Sans+Caption:400italic,400,700italic,700);
@import url(//fonts.googleapis.com/css?family=Droid+Sans:400,700);
@import url(//fonts.googleapis.com/css?family=Open+Sans:400,700,800);
@import url(//fonts.googleapis.com/css?family=Inconsolata:400,700);
*/
.vrac {
overflow: hidden;
position: relative; }
.vrac:before {
content: "";
display: block;
height: 0;
padding-top: 44.44444%; }
.vrac > *:first-child {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%; }
$ ./node_modules/.bin/cleancss boo.css
.vrac:before{content:"";display:block;height:0;padding-top:44.44444%}.vrac>:first-child{position:absolute;left:0;top:0;width:100%;height:100%}
The .vrac rule is gone…

(I use version 2.0.2)


Reply to this email directly or view it on GitHub.

@jcayzac
Copy link
Author

jcayzac commented Dec 17, 2013

@GoalSmashers I worked around it by removing the comment block :)

GoalSmashers pushed a commit that referenced this issue Dec 18, 2013
* Broken comments scanner when more than one import inside a comment.
@GoalSmashers
Copy link
Contributor

@jcayzac 2.0.3 is out with the fix - thanks for bringing it up!

@jcayzac
Copy link
Author

jcayzac commented Dec 19, 2013

thanks for the quick fix!

GoalSmashers pushed a commit that referenced this issue Jan 3, 2014
…nts.

This is a follow up to #192 which apparently fixed an edge case of processing
more than one @import inside a comment but introduced this issue.
GoalSmashers pushed a commit that referenced this issue Jan 4, 2014
…nts.

This is a follow up to #192 which apparently fixed an edge case of processing
more than one @import inside a comment but introduced this issue.
GoalSmashers pushed a commit that referenced this issue Jan 4, 2014
…nts.

This is a follow up to #192 which apparently fixed an edge case of processing
more than one @import inside a comment but introduced this issue.
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

2 participants