0

I just noticed a css rule that looked like this

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

Now I know -moz-calc, but why is this a string and what is the meaning of the '~'?

dippas
  • 58,591
  • 15
  • 114
  • 126
Jeanluca Scaljeri
  • 26,343
  • 56
  • 205
  • 333

1 Answers1

1

That's actually LESS, a CSS preprocessor.

The ~"" syntax creates a literal value which doesn't process its contents as LESS.
Otherwise, it would try to compile -moz-calc() as a LESS function.

SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964