sass/susy/math/su/_maps.scss in susy-2.1.1 vs sass/susy/math/su/_maps.scss in susy-2.1.2
- old
+ new
@@ -61,9 +61,30 @@
@return $_return;
}
+// Deep Merge
+// ----------
+// Return 2 objects of any depth, merged
+@function _susy-deep-merge(
+ $map1,
+ $map2
+) {
+
+ @if type-of($map1) != map or type-of($map2) != map {
+ $map1: $map2;
+ } @else {
+ @each $key, $value in $map2 {
+ $_new: ($key: _susy_deep-merge(map-get($map1, $key), $value));
+ $map1: map-merge($map1, $_new);
+ }
+ }
+
+ @return $map1;
+}
+
+
// Deep Has-Key
// ------------
// - Return true if a deep key exists
@function _susy-deep-has-key(
$map,