0

I am aware of that you can declare a class :

.someclass { ... } 

And then extend it

.otherclass { &:extend(.someclass all) } 

But does the .someclass really has to be declared ?

In my case only callers will apply the logic and there is no need for someclass to have the logic declared as well, as it is only a placeholder for similar css.

It would be nice if there was a &:extend(groupingFunction all) .

But maybe there is already?

1 Answer 1

1

Currently Less don't support this "placeholder-equivalent".

Checkout this issue: :extend mixins.

You can use the "@import (reference)" feature to somewhat "simulate" this behavior but it can cause unexpected problems in some cases (there are quite a few issues about the import reference feature).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.