Skip to content

Instantly share code, notes, and snippets.

@Jeysef
Last active November 13, 2023 13:37
Show Gist options
  • Select an option

  • Save Jeysef/a1b02ee196b99df0cb326309661aad11 to your computer and use it in GitHub Desktop.

Select an option

Save Jeysef/a1b02ee196b99df0cb326309661aad11 to your computer and use it in GitHub Desktop.
mixins
@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