S
S
Sergey2017-07-12 16:32:28
css
Sergey, 2017-07-12 16:32:28

Is it possible in SCSS to put a percentage of another variable into a variable?

I haven't used preprocessors for a long time, I forgot. Whether it is possible for example in one variable to operate with values ​​of other variable? For example, in one variable, indicate the color, for example: # 000, and in the other, specify 80% or 0.8 transparency from this variable?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene Volf, 2017-07-12
@Hando

For example, in one variable, indicate the color, for example: # 000, and in the other, specify 80% or 0.8 transparency from this variable?

If you believe this , then you can. It will look something like this:
$color1: #000;
$color2: rgba($color1, 0.8);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question