Sha256: a13e7380cb14ef9fe7be9735ff12001d53336c72e892da19f151f076b01ae99d
Contents?: true
Size: 652 Bytes
Versions: 22
Compression:
Stored size: 652 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; } } $fromName: $from * 100; $toName: $to * 100; $keyframes: ( name: 'fade-#{$fromName}-to-#{$toName}', 0: (opacity: $from), 100: (opacity: $to), ); @return $keyframes; }
Version data entries
22 entries across 22 versions & 4 rubygems