From a8dc4812a49d8467e8642abb510b523a9a51cd48 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Wed, 25 Nov 2015 02:32:41 -0800 Subject: Add responsive float classes; fixes #13690 --- docs/components/utilities.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'docs/components/utilities.md') diff --git a/docs/components/utilities.md b/docs/components/utilities.md index c2ac73bbc..728cd078d 100644 --- a/docs/components/utilities.md +++ b/docs/components/utilities.md @@ -168,25 +168,25 @@ Use a generic close icon for dismissing content like modals and alerts. **Be sur {% endexample %} -## Floats +## Responsive floats -Float an element to the left or right with a class. `!important` is included to avoid specificity issues. Classes can also be used as mixins. +These utility classes float an element to the left or right, or disable floating, based on the current viewport size using the [CSS `float` property](https://developer.mozilla.org/en-US/docs/Web/CSS/float). `!important` is included to avoid specificity issues. These use the same viewport width breakpoints as the grid system. + +Two similar non-responsive mixins (`pull-left` and `pull-right`) are also available. {% example html %} -
Float left
-
Float right
+
Float left on all viewport sizes
+
Float right on all viewport sizes
+
Don't float on all viewport sizes
+ +
Float left on viewports sized SM (small) or wider
+
Float left on viewports sized MD (medium) or wider
+
Float left on viewports sized LG (large) or wider
+
Float left on viewports sized XL (extra-large) or wider
{% endexample %} {% highlight scss %} -// Classes -.pull-left { - float: left !important; -} -.pull-right { - float: right !important; -} - -// Usage as mixins +// Related simple non-responsive mixins .element { @include pull-left; } -- cgit v1.2.3