map-deep-get

Description

Returns item from nested map.

SCSS Usage

map-deep-get($map, $keys...)
Parameter Required? Value
$map Yes Base map to pick from
$keys Yes list of keys to traverse, can be singular, or multiple comma separated

And so, in SCSS:

_component.scss
$myMap: (
  foo: (
    bar: (
      baz: 'qux'
    )
  )
);

.foo::before {
  content: map-deep-get($myMap, 'foo', 'bar', 'baz');
}

Output

app.css
.foo::before {
  content: "qux";
}