To calculate percentage of width, SASS has a built-in function.
percentage(3/12);
Ex:
$width : pecentage(4/12); div { width: $width; }
Calculate a percent with SCSS/SASS
I want to set a width in percentage in scss via calculation, but it gives me errors..
Invalid CSS after "...-width: (4/12)%": expected expression (e.g. 1px,
...
コメント