Last active
August 29, 2015 14:18
-
-
Save airen/732df72c36352f56c30e to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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
// ---- | |
// 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');; | |
} |
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
.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