|
40 | 40 | * restating the styles for the .ng-hide class in CSS:
|
41 | 41 | * ```css
|
42 | 42 | * .ng-hide {
|
43 |
| - * //!annotate CSS Specificity|Not to worry, this will override the AngularJS default... |
| 43 | + * /* Not to worry, this will override the AngularJS default... |
44 | 44 | * display:block!important;
|
45 | 45 | *
|
46 |
| - * //this is just another form of hiding an element |
| 46 | + * /* this is just another form of hiding an element */ |
47 | 47 | * position:absolute;
|
48 | 48 | * top:-9999px;
|
49 | 49 | * left:-9999px;
|
|
69 | 69 | * //a working example can be found at the bottom of this page
|
70 | 70 | * //
|
71 | 71 | * .my-element.ng-hide-add, .my-element.ng-hide-remove {
|
72 |
| - * transition:0.5s linear all; |
| 72 | + * /* this is required as of 1.3x to properly |
| 73 | + * apply all styling in a show/hide animation */ |
| 74 | + * transition:0s linear all; |
| 75 | + * |
| 76 | + * /* this must be set as block so the animation is visible */ |
73 | 77 | * display:block!important;
|
74 | 78 | * }
|
75 | 79 | *
|
| 80 | + * .my-element.ng-hide-add-active, |
| 81 | + * .my-element.ng-hide-remove-active { |
| 82 | + * /* the transition is defined in the active class */ |
| 83 | + * transition:1s linear all; |
| 84 | + * } |
| 85 | + * |
76 | 86 | * .my-element.ng-hide-add { ... }
|
77 | 87 | * .my-element.ng-hide-add.ng-hide-add-active { ... }
|
78 | 88 | * .my-element.ng-hide-remove { ... }
|
|
109 | 119 | </file>
|
110 | 120 | <file name="animations.css">
|
111 | 121 | .animate-show {
|
112 |
| - -webkit-transition:all linear 0.5s; |
113 |
| - transition:all linear 0.5s; |
114 | 122 | line-height:20px;
|
115 | 123 | opacity:1;
|
116 | 124 | padding:10px;
|
|
123 | 131 | display:block!important;
|
124 | 132 | }
|
125 | 133 |
|
| 134 | + .animate-show.ng-hide-add.ng-hide-add-active, |
| 135 | + .animate-show.ng-hide-remove.ng-hide-remove-active { |
| 136 | + -webkit-transition:all linear 0.5s; |
| 137 | + transition:all linear 0.5s; |
| 138 | + } |
| 139 | +
|
126 | 140 | .animate-show.ng-hide {
|
127 | 141 | line-height:0;
|
128 | 142 | opacity:0;
|
|
0 commit comments