From c59dbe56fe07cadf4ad09659d65d7090a07f2fbb Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 6 Feb 2016 15:40:25 -0800 Subject: Drop .center-block for .m-x-auto - Both classes do about the same thing, but with different names - Clarifies docs for .m-x-auto requiring a fixed width block element for it to work - Add missing heading for clearfix section in docs (unrelated) --- docs/components/utilities.md | 35 +++++++++++++---------------------- 1 file changed, 13 insertions(+), 22 deletions(-) (limited to 'docs') diff --git a/docs/components/utilities.md b/docs/components/utilities.md index 00bc96721..e59869fcd 100644 --- a/docs/components/utilities.md +++ b/docs/components/utilities.md @@ -60,8 +60,19 @@ Here are some representative examples of these classes: } {% endhighlight %} -Additionally, Bootstrap also includes an `.m-x-auto` class which sets the horizontal margins to `auto`. +Additionally, Bootstrap also includes an `.m-x-auto` class for centering fixed-width block level content by setting the horizontal margins to `auto`. +
+
+ Centered element +
+
+ +{% highlight html %} +
+ Centered element +
+{% endhighlight %} ## Text alignment @@ -191,27 +202,7 @@ Two similar non-responsive mixins (`pull-left` and `pull-right`) are also availa } {% endhighlight %} -## Center content - -Set an element to `display: block;` and center via `margin`. Available as a mixin and class. - -{% example html %} -
Centered block
-{% endexample %} - -{% highlight scss %} -// Class -.center-block { - display: block; - margin-left: auto; - margin-right: auto; -} - -// Usage as a mixin -.element { - @include center-block; -} -{% endhighlight %} +## Clearfix Easily clear `float`s by adding `.clearfix` **to the parent element**. Utilizes [the micro clearfix](http://nicolasgallagher.com/micro-clearfix-hack/) as popularized by Nicolas Gallagher. Can also be used as a mixin. -- cgit v1.2.3 From b72e4ed8d675fe197d3ebdd69225eaecdd62e02e Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 6 Feb 2016 15:41:14 -0800 Subject: add note to migration docs --- docs/migration.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/migration.md b/docs/migration.md index acab25c02..05f15a28f 100644 --- a/docs/migration.md +++ b/docs/migration.md @@ -154,8 +154,9 @@ Dropped entirely for the new card component. ### Utilities -- Added `.pull-{xs,sm,md,lg,xl}-{left,right,none}` classes for responsive floats -- Removed `.pull-left` and `.pull-right` since they're redundant to `.pull-xs-left` and `.pull-xs-right` +- Added `.pull-{xs,sm,md,lg,xl}-{left,right,none}` classes for responsive floats. +- Removed `.pull-left` and `.pull-right` since they're redundant to `.pull-xs-left` and `.pull-xs-right`. +- Dropped `.center-block` for the new `.m-x-auto` class. ### Vendor prefix mixins Bootstrap 3's [vendor prefix](http://webdesign.about.com/od/css/a/css-vendor-prefixes.htm) mixins, which were deprecated in v3.2.0, have been removed in Bootstrap 4. Since we use [Autoprefixer](https://github.com/postcss/autoprefixer), they're no longer necessary. -- cgit v1.2.3