Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Subtraction not working in compass scss

While ive been loving compass, I just ran to a confusing issue. I'm trying to subtract one from a value like this:

padding-left:($top-bar-padding*4)-1;
padding-left:($top-bar-padding*4-1);
padding-left:($top-bar-padding*4)-1px;
padding-left:($top-bar-padding*4-1px);

I've tried all of those and they all give me:

padding-left: 20px -1px;

It really puzzling me because I have this earlier in the .scss file and it is working fine:

padding:$top-bar-padding*2+2 $top-bar-padding*4;

Any insights on why this is happening?

like image 604
locrizak Avatar asked Nov 03 '11 21:11

locrizak


1 Answers

You need to have a space before and after the subtraction symbol like this:

($top-bar-padding*4 - 1)
like image 130
locrizak Avatar answered Oct 17 '22 02:10

locrizak