Skip to content

Calls to Less mixins are removed  #44

@jonegard

Description

@jonegard

Hi, thank you for putting the time into building this excellent tool! I unfortunately ran into an issue shortly after installing it where calls to Less mixins are removed when I run Prettier on a file with this plugin enabled. I couldn't find any instructions in regards to whether PostCSS configuration is needed to run this tool so I assume it should work out of the box.

Here's an example of the code that breaks.

.figtree(@style, @size, @weight) {
  font-style: @style;
  font-weight: @weight;
  font-size: @size;
  font-family: "Figtree", sans-serif;
  font-optical-sizing: auto;
}

.figtree-normal(@size: 1rem) {
  .figtree(normal, @size, 400);
}

Which results in:

.figtree(@style, @size, @weight) {
  font-style: @style;
  font-weight: @weight;
  font-size: @size;
  font-family: "Figtree", sans-serif;
  font-optical-sizing: auto;
}

.figtree-normal(@size: 1rem) {
  ;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions