]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Drop .center-block for .m-x-auto
authorMark Otto <markdotto@gmail.com>
Sat, 6 Feb 2016 23:40:25 +0000 (15:40 -0800)
committerMark Otto <markdotto@gmail.com>
Sat, 6 Feb 2016 23:40:25 +0000 (15:40 -0800)
- 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
scss/_mixins.scss
scss/_utilities.scss
scss/mixins/_center-block.scss [deleted file]
scss/utilities/_center-block.scss [deleted file]

index 00bc96721c91fda9cdfe10ababe3e1a52ed99ff2..e59869fcd575202a7a00181a66fe8db018d9ea52 100644 (file)
@@ -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`.
 
+<div class="bd-example">
+  <div class="m-x-auto" style="width: 200px; background-color: rgba(86,61,124,.15);">
+    Centered element
+  </div>
+</div>
+
+{% highlight html %}
+<div class="m-x-auto" style="width: 200px;"">
+  Centered element
+</div>
+{% 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 %}
-<div class="center-block">Centered block</div>
-{% 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.
 
index 934769fdcdd0279b327ba3492933e08cc9fb51d1..5c86512070b691f7cc590114e3c4cda79b6c3273 100644 (file)
@@ -48,7 +48,6 @@
 
 // // Layout
 @import "mixins/clearfix";
-@import "mixins/center-block";
 // @import "mixins/navbar-align";
 @import "mixins/grid-framework";
 @import "mixins/grid";
index ac703bc467afe3b64b9a04bf12d30d6f51ee5a07..3f9e81f125e75b090e8c9fce7921d26d6a86f9af 100644 (file)
@@ -1,5 +1,4 @@
 @import "utilities/background";
-@import "utilities/center-block";
 @import "utilities/clearfix";
 @import "utilities/pulls";
 @import "utilities/screenreaders";
diff --git a/scss/mixins/_center-block.scss b/scss/mixins/_center-block.scss
deleted file mode 100644 (file)
index e06fb5e..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-// Center-align a block level element
-
-@mixin center-block() {
-  display: block;
-  margin-left: auto;
-  margin-right: auto;
-}
diff --git a/scss/utilities/_center-block.scss b/scss/utilities/_center-block.scss
deleted file mode 100644 (file)
index 0c98666..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-.center-block {
-  @include center-block();
-}