Sha256: 773176f1a476dfe7c8e0a74557c95667fc2986613b8d24cf91bd9cf326851011
Contents?: true
Size: 976 Bytes
Versions: 13
Compression:
Stored size: 976 Bytes
Contents
@mixin shadow { box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); } /// Computes a top-shadow for a card effect. /// @param {Number} $depth - depth level /// @return {List} @function top-shadow($depth) { $primary-offset: nth(1.5 3 10 14 19, $depth) * 1px; $blur: nth(1.5 3 10 14 19, $depth) * 4px; $color: rgba($grey-7, nth(0.12 0.16 0.19 0.25 0.30, $depth)); @return 0 $primary-offset $blur $color; } /// Computes a bottom-shadow for a card effect. /// @param {Number} $depth - depth level /// @return {List} @function bottom-shadow($depth) { $primary-offset: nth(1.5 3 6 10 15, $depth) * 1px; $blur: nth(1 3 3 5 6, $depth) * 4px; $color: rgba($grey-7, nth(0.24 0.23 0.23 0.22 0.22, $depth)); @return 0 $primary-offset $blur $color; } @mixin card($depth) { @if $depth < 1 { box-shadow: none; } @else if $depth > 5 { @warn "Invalid $depth `#{$depth}` for mixin `card`."; } @else { box-shadow: bottom-shadow($depth), top-shadow($depth); } }
Version data entries
13 entries across 13 versions & 1 rubygems