I have a problem with this mixin in my project where I'm using gulp-sass:
$base-font-stack: (
sfprodisplay: (
regular: (
family: (SFProDisplay, sans-serif),
weight: 400,
style: normal
),
bold: (
family: (SFProDisplay, sans-serif),
weight: 700,
style: normal
),
),
ubuntu: (
light: (
family: (Ubuntu, sans-serif),
weight: 300,
style: normal
),
regular: (
family: (Ubuntu, sans-serif),
weight: 400,
style: normal
),
)
);
@mixin font($group, $variant: regular, $properties: family weight style, $font-stack: $base-font-stack) {
$font-properties: map-deep-get($font-stack, $group, $variant);
@if $font-properties {
@each $property, $values in $font-properties {
@if contains($properties, $property) {
font-#{$property}: map-get($font-properties, $property);
}
}
}
}
It's not a duplicate question, the problem is:
I checked this in sassmeister and got errors on this lines:
$font-properties: map-deep-get($font-stack, $group, $variant);
font-#{$property}: map-get($font-properties, $property);
and gulp-sass throw error when trying to compile this last line.