0

I've a little trouble and don't find the anwser in the doc. So this is what less compilator is doing :

input : 5px - 2px

ouput : 3px

or

input : 10% - 2px

ouput : 8%

I've a case that I want to keep this calcul

width: calc(100% - 10px);

the output, after compilation, is

width: calc(90%);

How can I avoid this behavior ?

Dasrath
  • 366
  • 2
  • 11
H4mm3R
  • 245
  • 4
  • 15

1 Answers1

0

Use double quotes " and a leading ~:

width: calc(~"100% - 10px");

This will tell the compiler to use the string as is.

KittMedia
  • 7,368
  • 13
  • 34
  • 38