Created
December 3, 2014 22:16
-
-
Save envoytravis/b867fe8d418b6e60b2f7 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains 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
// ---- | |
// libsass (v3.0.1) | |
// ---- | |
@mixin displayTransition($selector, $time, $hidden: '', $visible: '') { | |
$hidden: if($hidden != '', ', ' + $hidden, $hidden); | |
$visible: if($visible != '', ', ' + $visible, $visible); | |
visibility: hidden; | |
opacity: 0; | |
transition: visibility 0s linear $time, opacity $time linear#{$hidden}; | |
#{$selector} { | |
visibility: visible; | |
opacity: 1; | |
transition: visibility 0s linear 0s, opacity $time linear#{$visible}; | |
} | |
} | |
.block { | |
@include displayTransition('&.block--visible', 0.35s, 'height .35s ease-out'); | |
} |
This file contains 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
.block { | |
visibility: hidden; | |
opacity: 0; | |
transition: visibility 0s linear 0.35s, opacity 0.35s linear, height .35s ease-out; } | |
.block.block--visible { | |
visibility: visible; | |
opacity: 1; | |
transition: visibility 0s linear 0s, opacity 0.35s linear; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment