Skip to content

Instantly share code, notes, and snippets.

@airen
Last active August 29, 2015 14:18
Show Gist options
  • Save airen/732df72c36352f56c30e to your computer and use it in GitHub Desktop.
Save airen/732df72c36352f56c30e to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
@function to-list($value, $keep: 'both') {
$keep: if(index('keys' 'values', $keep), $keep, 'both');
@if type-of($value) == map {
$keys: ();
$values: ();
@each $key, $val in $value {
$keys: append($keys, $key);
$values: append($values, $val);
}
@if $keep == 'keys' {
@return $keys;
}
@else if $keep == 'values' {
@return $values;
}
@else {
@return zip($keys, $values);
}
}
@return if(type-of($value) != list, ($value,), $value);
}
$transitions: (
width: .5s,
height: 1s,
margin: 1.5
);
//$transition: to-list($transitions, 'both');
.box{
transition: to-list($transitions, 'both');;
}
.box {
transition: width 0.5s, height 1s, margin 1.5;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment