From: Mark Otto Date: Sun, 25 Dec 2016 02:11:57 +0000 (-0800) Subject: document it all, add align items examples X-Git-Tag: v4.0.0-alpha.6~186 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ca1a7f0773d1892723efc09e2ccb064dde309f5;p=thirdparty%2Fbootstrap.git document it all, add align items examples --- diff --git a/docs/utilities/flexbox.md b/docs/utilities/flexbox.md index eff4fb1903..6686b5d599 100644 --- a/docs/utilities/flexbox.md +++ b/docs/utilities/flexbox.md @@ -181,14 +181,42 @@ Use `align-self` utilities on flexbox items to individually change their alignme ## Auto margins -Flexbox can do some pretty awesome things when you mix `justify-content` with `margin-right: auto` or `margin-left: auto` on a particular flex item. For example, we can move all flex items to the right, but keep one on the left like so. +Flexbox can do some pretty awesome things when you mix flex alignments with auto margins. + +### With justify-content + +Easily move all flex items to one side, but keep another on the opposite end by mixing `justify-content` with `margin-right: auto` or `margin-left: auto`. {% example html %} -
+
Flex item
Flex item
Flex item
+ +
+
Flex item
+
Flex item
+
Flex item
+
+{% endexample %} + +### With align-items + +Similarly, move one flex item to the top or bottom of a container by mixing `align-items`, `flex-direction: column`, and `margin-top: auto` or `margin-bottom: auto`. + +{% example html %} +
+
Flex item
+
Flex item
+
Flex item
+
+ +
+
Flex item
+
Flex item
+
Flex item
+
{% endexample %} ## Wrap