aboutsummaryrefslogtreecommitdiff
path: root/docs/layout
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2017-03-26 12:37:28 -0700
committerMark Otto <[email protected]>2017-03-26 13:23:49 -0700
commit9010978c1a1b397a9622e9e9aafeab8de8951a04 (patch)
treead468a8a3e77d41808c057d2e820ca7fb88f2c7d /docs/layout
parent1ad0496724dfdd338614deb4cb4a1087bef1c26f (diff)
downloadbootstrap-9010978c1a1b397a9622e9e9aafeab8de8951a04.tar.xz
bootstrap-9010978c1a1b397a9622e9e9aafeab8de8951a04.zip
add example and document bug behavior to fix #21967
Diffstat (limited to 'docs/layout')
-rw-r--r--docs/layout/grid.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/layout/grid.md b/docs/layout/grid.md
index ca3537e84..2eb704550 100644
--- a/docs/layout/grid.md
+++ b/docs/layout/grid.md
@@ -162,6 +162,22 @@ For example, here are two grid layouts that apply to every device and viewport,
{% endexample %}
</div>
+Equal-width columns can be broken into multiple lines, but there is a [Safari flexbox bug](https://github.com/philipwalton/flexbugs#11-min-and-max-size-declarations-are-ignored-when-wrapping-flex-items) that prevents this from working without an explicit `flex-basis` or `border`. Our example works thanks to the `border` being set; you can do the same with `.col { border: 1px solid transparent; }`. Alternatively, you can set the flex-basis to the width of the column (e.g., `.col { flex: 1 0 50%; }`).
+
+<div class="bd-example-row">
+{% example html %}
+<div class="container">
+ <div class="row">
+ <div class="col">Column</div>
+ <div class="col">Column</div>
+ <div class="w-100"></div>
+ <div class="col">Column</div>
+ <div class="col">Column</div>
+ </div>
+</div>
+{% endexample %}
+</div>
+
### Setting one column width
Auto-layout for flexbox grid columns also means you can set the width of one column and have the sibling columns automatically resize around it. You may use predefined grid classes (as shown below), grid mixins, or inline widths. Note that the other columns will resize no matter the width of the center column.