less/less-docs

Mixin Issue!

mastermehdi opened this issue · 3 comments

Hi
At the moment when we write this in less
.test() { color: white; } .test() { color: red; } body { .test() }

Compiled to:
a { color: white; color: red; }

But desired compile is:
a { color: red; }

This is expected behavior. Properties cannot be reduced because different values may be valid in different browsers. As in:

a {
  display: inline-block;
  display: grid;
}

This will result in a display of inline-block in browsers that don't understand display: grid.
(Also wrong repo.)

Closing as expected behavior.

Can we add a new feature to mixin for supporting both of them?