aboutsummaryrefslogtreecommitdiff
path: root/docs/utilities
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2016-12-23 12:54:01 -0800
committerMark Otto <[email protected]>2016-12-24 14:21:04 -0800
commit463e8bee76aa49cc443bf87120d2bee49b329146 (patch)
tree250621b536a1ca92c30427c651a916a40b3d0a3a /docs/utilities
parent4024dc7a5294e6bc37d31970de4f3a9718f4a728 (diff)
downloadbootstrap-463e8bee76aa49cc443bf87120d2bee49b329146.tar.xz
bootstrap-463e8bee76aa49cc443bf87120d2bee49b329146.zip
document justify-content and align-items utils
Diffstat (limited to 'docs/utilities')
-rw-r--r--docs/utilities/flexbox.md65
1 files changed, 65 insertions, 0 deletions
diff --git a/docs/utilities/flexbox.md b/docs/utilities/flexbox.md
index 2acd1fed4..bc2a9cdb0 100644
--- a/docs/utilities/flexbox.md
+++ b/docs/utilities/flexbox.md
@@ -108,3 +108,68 @@ Responsive variations also exist for `.flex-nowrap` and `.flex-wrap`.
{% for bp in site.data.breakpoints %}
- `.flex{{ bp.abbr }}-nowrap`
- `.flex{{ bp.abbr }}-wrap`{% endfor %}
+
+## Justify content
+
+Use `justify-content` utilities on flexbox containers to change the alignment of flex items on the main axis (the x-axis to start, y-axis if `flex-direction: column`). Choose from `start` (browser default), `end`, `center`, `between`, or `around`.
+
+{% example html %}
+<div class="d-flex justify-content-start bd-highlight mb-3">
+ <div class="p-2 bd-highlight">Flex item</div>
+ <div class="p-2 bd-highlight">Flex item</div>
+ <div class="p-2 bd-highlight">Flex item</div>
+</div>
+<div class="d-flex justify-content-end bd-highlight mb-3">
+ <div class="p-2 bd-highlight">Flex item</div>
+ <div class="p-2 bd-highlight">Flex item</div>
+ <div class="p-2 bd-highlight">Flex item</div>
+</div>
+<div class="d-flex justify-content-center bd-highlight mb-3">
+ <div class="p-2 bd-highlight">Flex item</div>
+ <div class="p-2 bd-highlight">Flex item</div>
+ <div class="p-2 bd-highlight">Flex item</div>
+</div>
+<div class="d-flex justify-content-between bd-highlight mb-3">
+ <div class="p-2 bd-highlight">Flex item</div>
+ <div class="p-2 bd-highlight">Flex item</div>
+ <div class="p-2 bd-highlight">Flex item</div>
+</div>
+<div class="d-flex justify-content-around bd-highlight">
+ <div class="p-2 bd-highlight">Flex item</div>
+ <div class="p-2 bd-highlight">Flex item</div>
+ <div class="p-2 bd-highlight">Flex item</div>
+</div>
+{% endexample %}
+
+
+## Align items
+
+Use `align-items` utilities on flexbox containers to change the alignment of flex items on the cross axis (the y-axis to start, x-axis if `flex-direction: column`). Choose from `start` (browser default), `end`, `center`, `baseline`, or `stretch`.
+
+{% example html %}
+<div class="d-flex align-items-start bd-highlight mb-3" style="height: 100px">
+ <div class="p-2 bd-highlight">Flex item</div>
+ <div class="p-2 bd-highlight">Flex item</div>
+ <div class="p-2 bd-highlight">Flex item</div>
+</div>
+<div class="d-flex align-items-end bd-highlight mb-3" style="height: 100px">
+ <div class="p-2 bd-highlight">Flex item</div>
+ <div class="p-2 bd-highlight">Flex item</div>
+ <div class="p-2 bd-highlight">Flex item</div>
+</div>
+<div class="d-flex align-items-center bd-highlight mb-3" style="height: 100px">
+ <div class="p-2 bd-highlight">Flex item</div>
+ <div class="p-2 bd-highlight">Flex item</div>
+ <div class="p-2 bd-highlight">Flex item</div>
+</div>
+<div class="d-flex align-items-baseline bd-highlight mb-3" style="height: 100px">
+ <div class="p-2 bd-highlight">Flex item</div>
+ <div class="p-2 bd-highlight">Flex item</div>
+ <div class="p-2 bd-highlight">Flex item</div>
+</div>
+<div class="d-flex align-items-stretch bd-highlight" style="height: 100px">
+ <div class="p-2 bd-highlight">Flex item</div>
+ <div class="p-2 bd-highlight">Flex item</div>
+ <div class="p-2 bd-highlight">Flex item</div>
+</div>
+{% endexample %}