J
J
justifycontent2020-07-06 12:28:03
css
justifycontent, 2020-07-06 12:28:03

What's wrong with the mixin?

What's wrong with the mixin on less? For some reason, when adding this mixin, any changes in the entire code stop working, and the mixin does not work either.

@maxWidth: 1280;
    .adaptiv-font(@pcSize, @mobSize) {
    @addSize: @pcSize - @mobSize;
    @maxWidth: @maxWidth - 320;
    font-size: calc(~"@mobSize + px" + @{addSize} * ((100vw - 320px) / @{maxWidth}));
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Sharomet, 2020-07-06
@justifycontent

@maxWidth: 1280;
.adaptiv-font(@pcSize, @mobSize) {
  @addSize: @pcSize - @mobSize;
  @mWidth: @maxWidth - 320;
  font-size: calc((@mobSize) * 1px + @addSize * ((100vw - 320px) / @mWidth));
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question