Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SCSS divide operator not compiling

Tags:

sass

I am using Sublime Text 2 and LiveReload to compile my .scss file. I also tried codekit with the same problem.

Using + and - work no problem, but * and / don't compile.

font-size: 30px / 2px; doesn't compile to font-size: 15px; 

but

font-size: 30px + 2px; does compile to font-size: 32px; 

Any ideas? The code hinting also doesn't seem to be working for the multiply and divide operators, could it be a package conflict? Seems unlikely.

like image 637
user3434295 Avatar asked Mar 18 '14 17:03

user3434295


1 Answers

Put it in parenthesis so SCSS understands you want it to do an arithmetic operation. Also, you do not want to divide px by another px number as this will result in a unitless number.

This is what you are looking for:

div {   font-size: (30px / 2) } 
like image 199
richardaday Avatar answered Sep 20 '22 20:09

richardaday