Skip to content

Commit 0145276

Browse files
ritsthJosh-Cenaestelle
authored
align-items: stretch will also shrink (mdn#39937)
* clarity(css): clarify the align-items: stretch will also shrink * Oops * Update files/en-us/web/css/align-items/index.md * Update files/en-us/web/css/align-items/index.md * Fix --------- Co-authored-by: Joshua Chen <sidachen2003@gmail.com> Co-authored-by: Estelle Weyl <estelle@weyl.org>
1 parent 48a1966 commit 0145276

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

files/en-us/web/css/align-items/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ align-items: unset;
120120
- : All flex items are aligned such that their [flex container baselines](https://drafts.csswg.org/css-flexbox-1/#flex-baselines) align. The item with the largest distance between its cross-start margin edge and its baseline is flushed with the cross-start edge of the line.
121121

122122
- `stretch`
123-
- : If the items are smaller than the alignment container, auto-sized items will be equally enlarged to fill the container, respecting the items' width and height limits.
123+
- : If the item's cross-size is `auto`, the used size is set to the length necessary to be as close to filling the container as possible, respecting the item's width and height limits. If the item is not auto-sized, this value falls back to `flex-start`, and to `self-start` or `self-end` if the container's {{cssxref("align-content")}} is `first baseline` (or `baseline`) or `last baseline`.
124124

125125
- `anchor-center`
126126
- : In the case of [anchor-positioned](/en-US/docs/Web/CSS/CSS_anchor_positioning) elements, aligns the items to the center of the associated anchor element in the block direction. See [Centering on the anchor using `anchor-center`](/en-US/docs/Web/CSS/CSS_anchor_positioning/Using#centering_on_the_anchor_using_anchor-center).

files/en-us/web/css/align-self/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ align-self: unset;
116116
- : Specifies participation in first- or last-baseline alignment: aligns the alignment baseline of the box's first or last baseline set with the corresponding baseline in the shared first or last baseline set of all the boxes in its baseline-sharing group.
117117
The fallback alignment for `first baseline` is `start`, the one for `last baseline` is `end`.
118118
- `stretch`
119-
- : If the combined size of the items along the cross axis is less than the size of the alignment container and the item is `auto`-sized, its size is increased equally (not proportionally), while still respecting the constraints imposed by {{cssxref("max-height")}}/{{cssxref("max-width")}} (or equivalent functionality), so that the combined size of all `auto`-sized items exactly fills the alignment container along the cross axis.
119+
- : If the item's cross-size is `auto`, the used size is set to the length necessary to be as close to filling the container as possible, respecting the item's width and height limits. If the item is not auto-sized, this value falls back to `flex-start`, and to `self-start` or `self-end` if the container's {{cssxref("align-content")}} is `first baseline` (or `baseline`) or `last baseline`.
120120
- `anchor-center`
121121
- : In the case of [anchor-positioned](/en-US/docs/Web/CSS/CSS_anchor_positioning) elements, aligns the item to the center of the associated anchor element in the block direction. See [Centering on the anchor using `anchor-center`](/en-US/docs/Web/CSS/CSS_anchor_positioning/Using#centering_on_the_anchor_using_anchor-center).
122122
- `safe`

0 commit comments

Comments
 (0)