Posted 25 days ago. Visible to the public. Linked content. Auto-destruct in 35 days
Updated: The Difference Between Width and Flex Basis | Geddski
- Within a Flexbox layout, there are multiple CSS attributes that may affect a child's basis (the initial width before flexing). You might be confused how `flex-basis`, `width`, `min-width` and the intrinsic width of your content play together.
- The [attached article](https://gedd.ski/post/the-difference-between-width-and-flex-basis/) explains the differences. In summary:
- - If a `flex-basis` is set, that is used as the basis
- - If no `flex-basis` is set, the `width` is used as the basis
- - If neither `flex-basis` nor `width` is set, the content's computed width is used as the basis
-In **all** cases `min-width` and `max-width` define a lower and upper bound for the effective width chosen within the Flexbox.