Skip to content

Commit

Permalink
Add space-evenly option for justify-content (twbs#30910)
Browse files Browse the repository at this point in the history
  • Loading branch information
ed1nh0 authored and olsza committed Oct 3, 2020
1 parent 9d2b027 commit 669c52a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions scss/_utilities.scss
Expand Up @@ -177,6 +177,7 @@ $utilities: map-merge(
center: center,
between: space-between,
around: space-around,
evenly: space-evenly,
)
),
"align-items": (
Expand Down
8 changes: 8 additions & 0 deletions site/content/docs/5.0/layout/columns.md
Expand Up @@ -122,6 +122,14 @@ Use flexbox alignment utilities to vertically and horizontally align columns.
One of two columns
</div>
</div>
<div class="row justify-content-evenly">
<div class="col-4">
One of two columns
</div>
<div class="col-4">
One of two columns
</div>
</div>
</div>
{{< /example >}}

Expand Down
9 changes: 8 additions & 1 deletion site/content/docs/5.0/utilities/flex.md
Expand Up @@ -78,7 +78,7 @@ Responsive variations also exist for `flex-direction`.

## 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`.
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`, `around`, or `evenly`.

<div class="bd-example">
<div class="d-flex justify-content-start bd-highlight mb-3">
Expand Down Expand Up @@ -106,6 +106,11 @@ Use `justify-content` utilities on flexbox containers to change the alignment of
<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-evenly 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>
</div>

{{< highlight html >}}
Expand All @@ -114,6 +119,7 @@ Use `justify-content` utilities on flexbox containers to change the alignment of
<div class="d-flex justify-content-center">...</div>
<div class="d-flex justify-content-between">...</div>
<div class="d-flex justify-content-around">...</div>
<div class="d-flex justify-content-evenly">...</div>
{{< /highlight >}}

Responsive variations also exist for `justify-content`.
Expand All @@ -126,6 +132,7 @@ Responsive variations also exist for `justify-content`.
- `.justify-content{{ .abbr }}-center`
- `.justify-content{{ .abbr }}-between`
- `.justify-content{{ .abbr }}-around`
- `.justify-content{{ .abbr }}-evenly`
{{- end -}}
{{< /flex.inline >}}
{{< /markdown >}}
Expand Down

0 comments on commit 669c52a

Please sign in to comment.