Sha256: e917b610cdb78bbaa531a403ed841afe3b05e5e39b8439dbc8d6eec52af5e6d2
Contents?: true
Size: 591 Bytes
Versions: 11
Compression:
Stored size: 591 Bytes
Contents
/// Creates a fading animation. /// @param {Number} $from [0] - Opacity to start at. /// @param {Number} $to [1] - Opacity to end at. /// @return {Map} A keyframes map that can be used with the `generate-keyframes()` mixin. @function fade( $from: 0, $to: 1 ) { $type: type-of($from); $keyframes: (); @if $type == 'string' { @if $from == in { $from: 0; $to: 1; } @else if $from == out { $from: 1; $to: 0; } } $keyframes: ( name: 'fade-#{$from}-to-#{$to}', 0: (opacity: $from), 100: (opacity: $to), ); @return $keyframes; }
Version data entries
11 entries across 11 versions & 2 rubygems