@use 'sass:map'; @use 'sass:meta'; @use 'sass:list'; @function custom-map-get($map, $keys...) { $current-map: $map; $i: 1; @if meta.type-of($map) == map { @while $i <= length($keys) { $current-map: map.get($current-map, list.nth($keys, $i)); $i: $i + 1; } } @else { @error "The #{$current-map} provided is not an actual map."; } @return $current-map; }