The upcoming first-class calc()
feature adds the ability to refer to variables and call functions directly within calc()
, clamp()
, min()
, and max()
expressions.
This rule forbids interpolation in calc()
, clamp()
, min()
, and max()
functions.
.a { .b: calc(#{$c} + 1); }
/** ↑
* This argument */
The following patterns are considered warnings:
$c: 1;
.a { .b: calc(#{$c + 1}); }
$c: 1;
.a { .b: calc(max(#{$c})); }
$c: 1;
.a { .b: min(#{$c}); }
$c: 1;
.a { .b: clamp(#{$c} + 2px); }
The following patterns are not considered warnings:
.a { .b: calc(1 + 1); }
$c: 1;
.a { .b: abc(#{$c} + 1px); }
$c: 1;
.a { .b: calc(abc(#{$c})); }