Created
March 6, 2014 21:09
-
-
Save hbuchel/9399666 to your computer and use it in GitHub Desktop.
Using ng-animate with ng-show/ng-hide to transition the opacity of an element. (extendible sass class)
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
/************************************************* | |
* Structure for ng-show/ng-hide animations | |
* .animationName { | |
// CSS While ng-show is true | |
* &.ng-hide-add, &.ng-hide-remove { | |
* display: block !important; | |
* } | |
* &.ng-hide { | |
* // CSS while ng-hide is true | |
* } | |
* } | |
*************************************************/ | |
/* Transitioning the opacity of an ng-show-item */ | |
%opacityShowHide { | |
@include single-transition(opacity,.3s,ease-in-out); | |
opacity: 1; | |
&.ng-hide-add, &.ng-hide-remove { | |
display: block !important; | |
} | |
&.ng-hide { | |
opacity: 0; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment