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

beautify css adds bad space in less-css syntax: &:extend(.class) #31

Closed
guymguym opened this issue Oct 14, 2014 · 8 comments
Closed

beautify css adds bad space in less-css syntax: &:extend(.class) #31

guymguym opened this issue Oct 14, 2014 · 8 comments

Comments

@guymguym
Copy link

I saw it while using Atom with the Atom Beautify package, and then tested also in prettydiff.com.

Here is the input:

.animal {
    color: red;
}
.dog {
    &:extend(.animal);
    &:hover {
        color: green;
    }
}

And prettydiff generates a space in "&: extend(..." which makes the output an illegal less-css:

.animal {
    color: red;
}
.dog {
    &: extend(.animal);
    &:hover {
        color: green;
    }
}

Can I help to make a quick fix?
Thanks!

@guymguym guymguym changed the title bad space in less-css syntax: &:extend(.class) beautify css adds bad space in less-css syntax: &:extend(.class) Oct 14, 2014
@prettydiff prettydiff self-assigned this Oct 15, 2014
@prettydiff
Copy link
Owner

I am now preventing spaces following double colons "::" and colons following an ampersand. I will close out this issue, but please feel free to reopen this bug if I have failed to address the problem.

@guymguym
Copy link
Author

seems to work now, thanks for the quick fix!

@Glavin001
Copy link

I may be mistaken, however this does not appear to be resolved?
image

I am trying to update Atom Beautify, and the Node.js prettydiff package and at http://prettydiff.com/ both are still not working as described above. I may be missing something, any help would be greatly appreciated. Thank you!

Glavin001 added a commit to Glavin001/atom-beautify that referenced this issue Dec 28, 2014
@prettydiff prettydiff reopened this Dec 28, 2014
@prettydiff
Copy link
Owner

I believe this is fixed. Please test any additional code in the following location and let me know if defects are still outstanding:

http://prettydiff.com/ignore/testlocation/prettydiff.com.xhtml

@Glavin001
Copy link

Looks good now, thanks!

What was the problem, was the code not published?

@Glavin001
Copy link

I have already tried Node.js version 1.6.11 and it did not work. Could you publish a new release that works with these changes? Thanks!

@prettydiff
Copy link
Owner

Just published 1.6.12 with the fixes!

@Glavin001
Copy link

Thanks, works great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants