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

Named color parsing regression in 2.6.0 #2802

Closed
qkevinto opened this issue Feb 5, 2016 · 4 comments
Closed

Named color parsing regression in 2.6.0 #2802

qkevinto opened this issue Feb 5, 2016 · 4 comments

Comments

@qkevinto
Copy link

qkevinto commented Feb 5, 2016

.makeButton(@padding, @background) {
  padding: @padding;
  background: @background;
}

.button {
  .makeButton(
    @padding: 5px, /* Comment */
    @background: black /* Comment */
  );
}

The line 9, @background: black /* Comment */ will error with: expected ')' got '/'

However these are fine:

.button {
  .makeButton(
    @padding: 5px, /* Comment */
    @background: black); /* Comment */
}
.button {
  .makeButton(
    @padding: 5px, /* Comment */
    @background: black
  );
}
.button {
  .makeButton(
    @background: black, /* Comment */
    @padding: 5px /* Comment */
  );
}

This is using less.js 2.6.0 on node 4.2.6.

@diagramatics
Copy link

Could this be related to #2798?

@seven-phases-max
Copy link
Member

Could this be related to #2798?

No. It's a regression in #2775.

@seven-phases-max
Copy link
Member

Minimal example to reproduce:

x {
    x: red /* comment */;  
}

It seems to affect only comments after named colors, but other side-effects are possible too.

@seven-phases-max seven-phases-max changed the title CSS color strings with comments as Mixin arguments causes error in 2.6.0 Named color parsing regression in 2.6.0 Feb 5, 2016
@diagramatics
Copy link

Explains why we tested with random text and it doesn't produce this issue.

Regardless thanks for fixing this. Looking forward to the new version once you guys are ready to publish one 👍

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