Skip to content

Latest commit

 

History

History
61 lines (47 loc) · 1.07 KB

File metadata and controls

61 lines (47 loc) · 1.07 KB

function-no-interpolation

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 */

Options

true

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})); }