M
M
mumus2017-01-25 18:10:01
css
mumus, 2017-01-25 18:10:01

Is it possible to call a mixin in LESS through a loop?

I have mixins

.screen-sm-min({
        max-width: @sm;
        flex-basis:@sm;
        text-align: left;
});

.screen-md-min({
        max-width: @md;
        flex-basis:@md;
});
 .screen-lg-min({
        max-width: @lg;
        flex-basis:@lg;
});

Is it possible to call these mixins through a loop?
For example, I have
@breakpoint_names: xs, sm, md, lg
Is it possible to call it somehow through a loop through the @breakpoint_names array
and change in the body
[email protected]{breakpoint_name}-min({
    max-width: @lg;
    flex-basis:@lg;
});

???

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question