diff options
Diffstat (limited to 'web/css/_src/_mixins.scss')
-rw-r--r-- | web/css/_src/_mixins.scss | 39 |
1 files changed, 23 insertions, 16 deletions
diff --git a/web/css/_src/_mixins.scss b/web/css/_src/_mixins.scss index d547306..450bf76 100644 --- a/web/css/_src/_mixins.scss +++ b/web/css/_src/_mixins.scss @@ -15,22 +15,29 @@ } } -@mixin letterpress($opacity) { - text-shadow: rgba(255, 255, 255, $opacity) 0 1px 0; -} +@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)); -@mixin hide-text { - font: 0/0 a; - text-shadow: none; - color: transparent; -} + @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)); -@mixin link-colors($normal, $hover: $normal, $visited: $normal) { - color: $normal; - &:hover, &:focus { - color: $hover; + @if $get == null { + @return map-get-deep-warning($warn, $get); + } + } + @else { + @return map-get-deep-warning($warn, $get); + } + } } - &:visited { - color: $visited; - } -} + + @return $get; +}
\ No newline at end of file |