Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ div {

{{EmbedLiveSample('Setting_flex_item_shrink_factor', 500, 100)}}

The flex items don't overflow their container because they are able to shrink: the `500px` of negative free space is distributed among the five items based on their `flex-shrink` values. The first three items have `flex-shrink: 1` set. D has `flex-shrink: 1.5` and E has `flex-shrink: 2` set. The final width of D and E is less than the others, with E smaller than D.
The flex items don't overflow their container because they are able to shrink: the `500px` of negative free space is distributed among the five items based on their `flex-shrink` values. Since a total of shrink values for the five items is `6.5`, width of items with `flex-shrink: 1` is reduced by `1/6.5 * 500px = 76.92px` and of item with `flex-shink: 2` by `2/6.5 * 500px = 153.85px`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The flex items don't overflow their container because they are able to shrink: the `500px` of negative free space is distributed among the five items based on their `flex-shrink` values. Since a total of shrink values for the five items is `6.5`, width of items with `flex-shrink: 1` is reduced by `1/6.5 * 500px = 76.92px` and of item with `flex-shink: 2` by `2/6.5 * 500px = 153.85px`.
The flex items don't overflow their container because they can shrink: the `500px` of negative free space is distributed among the five items based on their `flex-shrink` values. The total of all the shrink values for the five items is `1 + 1 + 1 + 1.5 + 2` = `6.5`. As a result, the width of items with `flex-shrink: 1` is reduced by `1/6.5 * 500px` = `76.92px`, the width of items with `flex-shrink: 1.5` is reduced by `1.5/6.5 * 500px` = `115.38px`, and the width of items with `flex-shink: 2` is reduced by `2/6.5 * 500px` = `153.85px`.


## Specifications

Expand Down