prettier-plugin-css-order icon indicating copy to clipboard operation
prettier-plugin-css-order copied to clipboard

Calls to Less mixins are removed

Open jonegard opened this issue 2 months ago • 0 comments

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) {
  ;
}

jonegard avatar May 08 '24 10:05 jonegard