Sass-modules are imported with @use
, not included (@include
), unlike mixins.
When "removing" a variable from a map, the original map does not get altered, therefor the altered map has to be redeclared. For example:
Dart Sass:
@use "sass:map";
$map: (
'foo': bar,
'faz': foobar,
);
$nMap: map.remove($map, 'faz');
@debug $map; //("foo": bar, "faz": foobar)
@debug $nMap; //("foo": bar)
Node Sass & Dart Sass (currently):
$map: (
'foo': bar,
'faz': foobar,
);
$nMap: map-remove($map, 'faz');
@debug $map; //("foo": bar, "faz": foobar)
@debug $nMap; //("foo": bar)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…