Rails / SASS: Undefined

I convert parts of my stylesheet from pixels to percentages, but I keep getting this error if I try to use several operations:

height:$height/3 * 2; 

I also tried:

 height:($height/3) * 2; 

But keep getting this error message:

 Undefined operation: "85, 7142857%/2, 10526316/3 times 2". 

What's wrong? - I have bourbon set like a gem.

Variables:

 $inner_width:85,7142857%; /* 1200 / 1400 */ $height:$inner_width / 2,10526316; /* 1200 */ 
+4
source share
1 answer

Write decimal points with a period. :) (Sass, like CSS, uses . For numbers and , for lists.)

 $ sass --interactive >> $inner_width: 85.7142857% 85.71429% >> $height: $inner_width / 2.10526316 40.71429% >> $height/3 * 2 27.14286% 
+1
source

Source: https://habr.com/ru/post/1390057/


All Articles