R
R
Roman-Tik2020-10-25 14:58:21
Sass
Roman-Tik, 2020-10-25 14:58:21

Is it possible to convert a number to a string in sass / scss or in another way add vw units to the number?

The bottom line is that there is a $temp variable that stores the result of some calculations, for example 0.01. You need to add vw units to it and use it to set the font size. Expected result in css
font-size: 0.01vw;
ps calc - not suitable for calculations.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey delphinpro, 2020-10-25
@Roman-Tik

$val: 0.01;

font-size: $val * 1vw;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question