Last active
November 13, 2023 13:37
-
-
Save Jeysef/a1b02ee196b99df0cb326309661aad11 to your computer and use it in GitHub Desktop.
mixins
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @mixin tr($props: all, $duration: $ss-tr-duration, $function: $ss-tr-function, $delay: null ) { | |
| $duration: _strip-unit($duration)*1ms; | |
| @if $delay { | |
| $delay: _strip-unit($delay)*1ms; | |
| } | |
| @if type-of($props) == list { | |
| $tr_values: (); | |
| @each $item in $props { | |
| @if $delay { | |
| $tr_values: append($tr_values, #{$item} $duration $function $delay, comma); | |
| } @else { | |
| $tr_values: append($tr_values, #{$item} $duration $function, comma); | |
| } | |
| } | |
| transition: $tr_values; | |
| } | |
| @else { | |
| @if $delay { | |
| transition: #{$props} $duration $function $delay; | |
| } @else { | |
| transition: #{$props} $duration $function; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment