Skip to content

Bug when using the plus symbol on calc calls inside from expressions for colors #4316

Open
@filipesabella

Description

@filipesabella

To reproduce:

div {
  background: rgb(from blue calc(r + 100) g b);
}

Current behavior:

Less throws a Could not parse call arguments or missing ')' error.

Expected behavior:

Should generate:

div {
  background: rgb(from blue calc(r + 100) g b);
}

Environment information:

Running on the official playground is enough to reproduce it:
https://lesscss.org/less-preview

Subtraction works just fine:

div {
  background: rgb(from blue calc(r - 100) g b);
}

I also found another bug that might be related. Notice the inversion from r - 100 to 100 - r:

div {
  background: rgb(from blue calc(100 - r) g b);
}

Drops the math operator:

div {
  background: rgb(from blue calc(100  r) g b);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions