monitoring/web/css/_src/_mixins.scss

43 lines
954 B
SCSS

@mixin debug($color: red) {
border: 1px solid $color;
}
@mixin clearfix {
zoom:1;
&:before, &:after {
content: "\0020";
display: block;
height: 0;
overflow: hidden;
}
&:after {
clear: both;
}
}
@function map-get-deep($map, $keys...) {
@if length($keys) == 1 {
$keys: nth($keys, 1);
}
$warn: "#{nth($keys, 1)}";
$length: length($keys);
$get: map-get($map, nth($keys, 1));
@if $length > 1 {
@for $i from 2 through $length {
@if $get != null and type-of($get) == 'map' {
$warn: $warn + "->#{nth($keys, $i)}";
$get: map-get($get, nth($keys, $i));
@if $get == null {
@return map-get-deep-warning($warn, $get);
}
}
@else {
@return map-get-deep-warning($warn, $get);
}
}
}
@return $get;
}