aboutsummaryrefslogtreecommitdiff
path: root/docs/components
diff options
context:
space:
mode:
authorChris Rebert <[email protected]>2015-11-25 02:32:41 -0800
committerChris Rebert <[email protected]>2015-11-26 22:13:26 -0800
commita8dc4812a49d8467e8642abb510b523a9a51cd48 (patch)
tree7c683086aceec788e05b4e9c8825896a92a976a6 /docs/components
parent48fc3d9aa7b559934a5c6149b8a0bbbb17ea1167 (diff)
downloadbootstrap-a8dc4812a49d8467e8642abb510b523a9a51cd48.tar.xz
bootstrap-a8dc4812a49d8467e8642abb510b523a9a51cd48.zip
Add responsive float classes; fixes #13690
Diffstat (limited to 'docs/components')
-rw-r--r--docs/components/list-group.md6
-rw-r--r--docs/components/navbar.md10
-rw-r--r--docs/components/utilities.md26
3 files changed, 21 insertions, 21 deletions
diff --git a/docs/components/list-group.md b/docs/components/list-group.md
index 7a8f1d06f..5dbcca2d5 100644
--- a/docs/components/list-group.md
+++ b/docs/components/list-group.md
@@ -31,15 +31,15 @@ Add labels to any list group item to show unread counts, activity, etc.
{% example html %}
<ul class="list-group">
<li class="list-group-item">
- <span class="label label-default label-pill pull-right">14</span>
+ <span class="label label-default label-pill pull-xs-right">14</span>
Cras justo odio
</li>
<li class="list-group-item">
- <span class="label label-default label-pill pull-right">2</span>
+ <span class="label label-default label-pill pull-xs-right">2</span>
Dapibus ac facilisis in
</li>
<li class="list-group-item">
- <span class="label label-default label-pill pull-right">1</span>
+ <span class="label label-default label-pill pull-xs-right">1</span>
Morbi leo risus
</li>
</ul>
diff --git a/docs/components/navbar.md b/docs/components/navbar.md
index 4db9f788a..7cc75a952 100644
--- a/docs/components/navbar.md
+++ b/docs/components/navbar.md
@@ -17,7 +17,7 @@ Here's what you need to know before getting started with the navbar:
- Navbars require a wrapping `.navbar` and a [color scheme](#color-schemes).
- Navbars and their contents are fluid by default. Use [optional containers](#containers) to limit their horizontal width.
-- Use `.pull-left` and `.pull-right` to quickly align sub-components.
+- Use `.pull-*-left` and `.pull-*-right` to quickly align sub-components.
- Ensure accessibility by using a `<nav>` element or, if using a more generic element such as a `<div>`, add a `role="navigation"` to every navbar to explicitly identify it as a landmark region for users of assistive technologies.
## Supported content
@@ -48,7 +48,7 @@ Here's an example of all the sub-components included in a default, light navbar:
<a class="nav-link" href="#">About</a>
</li>
</ul>
- <form class="form-inline navbar-form pull-right">
+ <form class="form-inline navbar-form pull-xs-right">
<input class="form-control" type="text" placeholder="Search">
<button class="btn btn-success-outline" type="submit">Search</button>
</form>
@@ -78,7 +78,7 @@ Here are some examples to show what we mean.
<a class="nav-link" href="#">About</a>
</li>
</ul>
- <form class="form-inline navbar-form pull-right">
+ <form class="form-inline navbar-form pull-xs-right">
<input class="form-control" type="text" placeholder="Search">
<button class="btn btn-info-outline" type="submit">Search</button>
</form>
@@ -99,7 +99,7 @@ Here are some examples to show what we mean.
<a class="nav-link" href="#">About</a>
</li>
</ul>
- <form class="form-inline navbar-form pull-right">
+ <form class="form-inline navbar-form pull-xs-right">
<input class="form-control" type="text" placeholder="Search">
<button class="btn btn-secondary-outline" type="submit">Search</button>
</form>
@@ -120,7 +120,7 @@ Here are some examples to show what we mean.
<a class="nav-link" href="#">About</a>
</li>
</ul>
- <form class="form-inline navbar-form pull-right">
+ <form class="form-inline navbar-form pull-xs-right">
<input class="form-control" type="text" placeholder="Search">
<button class="btn btn-primary-outline" type="submit">Search</button>
</form>
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
</button>
{% 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 %}
-<div class="pull-left">Float left</div>
-<div class="pull-right">Float right</div>
+<div class="pull-xs-left">Float left on all viewport sizes</div>
+<div class="pull-xs-right">Float right on all viewport sizes</div>
+<div class="pull-xs-none">Don't float on all viewport sizes</div>
+
+<div class="pull-sm-left">Float left on viewports sized SM (small) or wider</div>
+<div class="pull-md-left">Float left on viewports sized MD (medium) or wider</div>
+<div class="pull-lg-left">Float left on viewports sized LG (large) or wider</div>
+<div class="pull-xl-left">Float left on viewports sized XL (extra-large) or wider</div>
{% 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;
}