Skip to content

Commit 8374f54

Browse files
committed
Document .flex-fill class in flex utils
1 parent 2137d61 commit 8374f54

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/4.0/utilities/flex.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,23 @@ Responsive variations also exist for `align-self`.
213213
- `.align-self{{ bp.abbr }}-baseline`
214214
- `.align-self{{ bp.abbr }}-stretch`{% endfor %}
215215

216+
## Fill
217+
218+
Use the `.flex-fill` class on a series of sibling elements to force them into equal widths while taking up all available horizontal space. [Especially useful for equal-width, or justified, navigation.]({{ site.baseurl }}/docs/{{ site.docs_version }}/components/navs/#working-with-flex-utilities)
219+
220+
{% example html %}
221+
<div class="d-flex bd-highlight">
222+
<div class="p-2 flex-fill bd-highlight">Flex item</div>
223+
<div class="p-2 flex-fill bd-highlight">Flex item</div>
224+
<div class="p-2 flex-fill bd-highlight">Flex item</div>
225+
</div>
226+
{% endexample %}
227+
228+
Responsive variations also exist for `flex-fill`.
229+
230+
{% for bp in site.data.breakpoints %}
231+
- `.flex{{ bp.abbr }}-fill`{% endfor %}
232+
216233
## Auto margins
217234

218235
Flexbox can do some pretty awesome things when you mix flex alignments with auto margins. Shown below are three examples of controlling flex items via auto margins: default (no auto margin), pushing two items to the right (`.mr-auto`), and pushing two items to the left (`.ml-auto`).

0 commit comments

Comments
 (0)