Skip to content

Commit 729f86a

Browse files
committed
docs(tabs): improve tab documentation for animations
1 parent c0f8669 commit 729f86a

File tree

1 file changed

+32
-7
lines changed

1 file changed

+32
-7
lines changed

src/tab/docs/tab.demo.html

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,14 @@ <h4>ngModel binding</h4>
3838
<p>Please use the helper attribute <code>bsActivePane</code> instead.</p>
3939
</div>
4040

41-
<div class="callout callout-info">
41+
<div class="callout callout-info row">
4242
<h4>Custom animations</h4>
43-
<p>Pane animation is done with the <code>active</code> class and requires custom CSS.</p>
44-
<pre class="bs-exemple-code">
45-
<code class="css" highlight-block>
43+
<p>Pane animation is done with the <code>active</code> class and requires custom CSS. You can change the default <code>am-fade</code> animation class by including the <code>animation</code> option.</p>
44+
<p>Here is a sample definition for the default <code>am-fade</code> animation class:</p>
45+
<div class="col-md-5">
46+
<p>SASS:</p>
47+
<pre class="bs-exemple-code">
48+
<code class="css" highlight-block>
4649
.tab-pane.am-fade {
4750
animation-duration: .3s;
4851
animation-timing-function: ease;
@@ -56,8 +59,30 @@ <h4>Custom animations</h4>
5659
animation-name: fadeIn;
5760
}
5861
}
59-
</code>
60-
</pre>
62+
</code>
63+
</pre>
64+
</div>
65+
<div class="col-md-5 col-md-offset-1">
66+
<p>CSS:</p>
67+
<pre class="bs-exemple-code">
68+
<code class="css" highlight-block>
69+
.tab-pane.am-fade {
70+
animation-duration: .3s;
71+
animation-timing-function: ease;
72+
animation-fill-mode: backwards;
73+
opacity: 1;
74+
}
75+
76+
.tab-pane.am-fade.active-remove {
77+
display: none !important;
78+
}
79+
80+
.tab-pane.am-fade.active-add {
81+
animation-name: fadeIn;
82+
}
83+
</code>
84+
</pre>
85+
</div>
6186
</div>
6287

6388
<h3>Options</h3>
@@ -78,7 +103,7 @@ <h3>Options</h3>
78103
<td>animation</td>
79104
<td>string</td>
80105
<td>am-fade</td>
81-
<td>apply a CSS animation to the popover with <code>ngAnimate</code></td>
106+
<td>apply a CSS animation to tab panes with <code>ngAnimate</code></td>
82107
</tr>
83108
<tr>
84109
<td>template</td>

0 commit comments

Comments
 (0)