sk_fems_ui commit
This commit is contained in:
21
assets/scss/functions.scss
Normal file
21
assets/scss/functions.scss
Normal file
@ -0,0 +1,21 @@
|
||||
@function setStyle($map, $object, $style) {
|
||||
@if map-has-key($map, $object) {
|
||||
@return map-get(map-get($map, $object), $style);
|
||||
}
|
||||
@warn "The key ´#{$object} is not available in the map.";
|
||||
@return null;
|
||||
}
|
||||
|
||||
/// Map deep get
|
||||
/// @author Kitty Giraudel
|
||||
/// @access public
|
||||
/// @param {Map} $map - Map
|
||||
/// @param {Arglist} $keys - Key chain
|
||||
/// @return {*} - Desired value
|
||||
|
||||
@function map-deep-get($map, $keys...) {
|
||||
@each $key in $keys {
|
||||
$map: map-get($map, $key);
|
||||
}
|
||||
@return $map;
|
||||
}
|
Reference in New Issue
Block a user