0

I need to do a very specific equation using calc in less.

Namely this

padding: 0 calc((100% - 1280px)/2 + 30px);

It works perfectly when i try it in the editor in chrome but i'm not sure what parts of the equation need to be encapsulated in ~"".

Currently i'm doing the below but it doesn't yield the correct sum

padding: 0px ~"calc((100% - 1280px)/2 + 30px)";

1 Answers1

1

Less and calc

try:

padding: 0px calc(~"100% - 1280px)/2 + 30px");

Its a some what known issue with :
Less Aggressive Compilation with CSS3 calc

Community
  • 1
  • 1
Persijn
  • 14,624
  • 3
  • 43
  • 72