V
V
Vitaly Yakovenko2015-01-17 20:52:00
Less
Vitaly Yakovenko, 2015-01-17 20:52:00

LESS doesn't calculate length when substituting in media-query?

There is this piece of code:

@side-blocks-max-width: 300px;
@middle-wider-side-mult: 3;
@middle-max-width: @middle-wider-side-mult * @side-blocks-max-width;
@mobile-width: @middle-max-width;
@media all and (max-width: @mobile-width) { //что-то там }

When compiled, the latter becomes @media all and (max-width: 3 * 300px) ...instead of the expected 900px.
In another place, where it @middle-max-widthsets the block size, 900px is displayed correctly.
Tell me how to fix the situation?

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