Answer the question
In order to leave comments, you need to log in
Is it possible to substitute different values of variables in less in media queries?
There is this code:
@buttonsWidth: 50px;
.buttonWrapper {
margin: 0 @buttonsWidth / 2;
.button {
width: @buttonsWidth;
}
}
@media (max-width: 500px) {...}
), the width of the button is different, for example 10vw. Is it possible to somehow define a variable in less so that media queries are automatically written in this case. Something like:@buttonsWidth: 50px;
@media (max-width: 500px) {
@buttonsWidth: 10vw;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question