Skip to main content
Version: 1.0.x

Map

Because the sass:map module already, the namespace is prefixed with an underscore to avoid conflict.

@use "@glsass/tools/tools.map" as _map;

deep-get()

Retrieves map keys from nested maps.

deep-get($map, $keys...);

deep-get(("primary": ("100": "red", "200": "green", "300": "blue" )) "primary", "300");
// Returns "blue";

negativify-map()

It turns maps into its negative variant. It prefixes the keys with n and makes the value negative.

negativify-map($map);

negativify-map((0: 5px, 1: 10px, 2: 30px));
// Return ("n0": -5px, "n1": -10px, "n2": -30px)