]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
improves documentation for close-button and callout components, specifying how to...
authorChris Oyler <chris@zurb.com>
Thu, 14 Jan 2016 21:32:33 +0000 (13:32 -0800)
committerChris Oyler <chris@zurb.com>
Thu, 14 Jan 2016 21:32:33 +0000 (13:32 -0800)
docs/pages/callout.md
docs/pages/close-button.md

index 5d0a3db2c3e0ec875722495f790a6ff7fcc0f1cc..233230b8fa391fa6f723314e451b761d43c89944 100644 (file)
@@ -67,7 +67,7 @@ Callouts can be colored using the `.secondary`, `.primary`, `.success`, `.warnin
 
 ## Sizing
 
-Callouts can be sized using the `.small` and `.large` classes. These will affect the padding around content to be smaller and larger respectivly. 
+Callouts can be sized using the `.small` and `.large` classes. These will affect the padding around content to be smaller and larger respectivly.
 
 ```html_example
 <div class="callout small">
@@ -91,12 +91,21 @@ Pair the callout with the [close button](close-button.html) component and `data-
 
 <div class="primary callout">
   <p>Any element can be used as a close trigger, not just close button. Adding the attribute <code>data-close</code> to any element within the callout will turn it into a close trigger.</p>
+  <p>When using the <code>data-closable</code> attribute, you can optionally add <a href="http://foundation.zurb.com/sites/docs/motion-ui.html">Motion UI</a> classes to the attribute to change the closing animation. If no class is added, the plugin defaults to jQuery's <code>.fadeOut()</code> function.</p>
 </div>
 
 ```html_example
 <div class="alert callout" data-closable>
   <h5>This is Important!</h5>
   <p>But when you're done reading it, click the close button in the corner to dismiss this alert.</p>
+  <p>I'm using the default <code>data-closable</code> parameters, and simply fade out.</p>
+  <button class="close-button" aria-label="Dismiss alert" type="button" data-close>
+    <span aria-hidden="true">&times;</span>
+  </button>
+</div>
+<div class="success callout" data-closable="slide-out-right">
+  <h5>This a friendly message.</h5>
+  <p>And when you're done with me, I close using a Motion UI animation.</p>
   <button class="close-button" aria-label="Dismiss alert" type="button" data-close>
     <span aria-hidden="true">&times;</span>
   </button>
index 7ae63a46c01a09b8d1d1227fce419bd8e2d61e75..c7fcd4f8c4bfcdcdad9de13ef5dacc034f25f37d 100644 (file)
@@ -25,7 +25,7 @@ The button is also labeled with `aria-label` to clarify what the button's purpos
   <p>The close button on its own doesn't close elements, but you can use it with <a href="toggler.html">Toggler</a>, <a href="reveal.html">Reveal</a>, <a href="off-canvas.html">Off-canvas</a>, and other plugins that have open and close behaviors.</p>
 </div>
 
-For example, pair the callout with the close button component and `data-closable` attribute to create a dismissable alert box.
+For example, pair the callout with the close button component and `data-closable` attribute to create a dismissible alert box.
 
 <div class="primary callout">
   <p>Any element can be used as a close trigger, not just close button. Adding the attribute <code>data-close</code> to any element within the callout will turn it into a close trigger.</p>
@@ -38,4 +38,11 @@ For example, pair the callout with the close button component and `data-closable
     <span aria-hidden="true">&times;</span>
   </button>
 </div>
-```
\ No newline at end of file
+<div class="success callout" data-closable="slide-out-right">
+  <p>You can close me too, and I close using a Motion UI animation.</p>
+  <button class="close-button" aria-label="Dismiss alert" type="button" data-close>
+    <span aria-hidden="true">&times;</span>
+  </button>
+</div>
+
+```