Skip to content

Selector interpolation: Shouldn't variables be evaluated before the code parse? #2909

@cusspvz

Description

@cusspvz

I'm working with less for a while. I've used selector interpolation about 4 or 5 times, but I did not had the need to include nested classes over it until now.

So I've came across on what I think it could be a potential issue.
Here's a test case:

Input

@theGoodThings: ~".food, .beer, .sleep, .javascript";

@{theGoodThings} {
  &:after {
  font-weight: bold;
  }
}

Output

.food, .beer, .sleep, .javascript:after {
  font-weight: bold;
}

Output I was expecting:

.food:after, .beer:after, .sleep:after, .javascript:after {
  font-weight: bold;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions