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

Issues Beautifying LESS when using @variable or &:hover syntax #52

Closed
mcdonnelldean opened this issue Jul 26, 2014 · 3 comments
Closed

Comments

@mcdonnelldean
Copy link

When using the beautify command on a less file, their seems to be issues with how items are restructured. I have no custom settings or overrides.

Note: The screenshots are missing the trailing } but it is included in the raw testing text.

Before Command

beforebeautifycommand

After Command

afterbeautifycommand

LESS for Testing

@import "syntax-variables";

.editor-colors {
  background-color: @syntax-background-color;
  color: @syntax-text-color;
}

.editor {
  background-color: @syntax-background-color;
  color: @syntax-text-color;

  .wrap-guide {
    background-color: @syntax-wrap-guide-color;
  }

  .indent-guide {
    color: @syntax-indent-guide-color;
  }

  .invisible-character {
    color: @syntax-invisible-character-color;
  }

  .gutter {
    background-color: @syntax-gutter-background-color;
    color: @syntax-gutter-text-color;

    .line-number {
      &.cursor-line {
        background-color: @syntax-gutter-background-color-selected;
        color: @syntax-gutter-text-color-selected;
      }

      &.cursor-line-no-selection {
        color: @syntax-gutter-text-color-selected;
      }
    }
  }
}
@Glavin001
Copy link
Owner

Currently LESS is being beautified by the CSS beautifier of js-beautify.

See

case 'Sass':
case 'SCSS':
case 'LESS':
case 'CSS':
text = beautifyCSS(text, self.getOptions('css', allOptions));
beautifyCompleted(text);
break;

You should forward this issue over to the js-beautify project, and see what they say. There may be problems handling LESS, or in a much more fortunate case, may be a setting that provides better LESS support and resolves your issue. If it is a setting and Atom Beautify is restricting this, let me know and I can make the necessary adjustments to optimize js-beautify for LESS.

Hope we can find a solution for you!

@Glavin001 Glavin001 added the bug label Jul 28, 2014
@mcdonnelldean
Copy link
Author

Hi @Glavin001 thanks for the update, I've had a look over the other repo and it seems there is a known issue on their end, I'll report back if there are any changes needed on this end, thanks for the help

@Glavin001
Copy link
Owner

Hope they can resolve it! If there are any changes needed from my end I can reopen this issue.

Glavin001 added a commit that referenced this issue Aug 2, 2014
@Glavin001 Glavin001 changed the title Issues Beautifying LESS Issues Beautifying LESS when using @variable or &:hover syntax Sep 7, 2014
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

2 participants