Hi everyone,
I am starting my journey as a web developer and I have a question regarding Sass(scss).
How would you use the calc() function in a Sass stylesheet?
Thanks!
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (2)
Hey Pauline!! A good example of using the calc value is;
Pretend that you have 2 blocks in a row, and you want them both to be 50%, but you want a 20px gap in between. You could use the calc function as follows:
This means that each block with the class
.block
will be 50% of the container, minus (20px / 2). Therefore each.block
will be 50% - 10px. Hope that makes sense!Hi Tom,
Thanks for your answer, it helps a lot :)!!!