Skip to content

Canvas as styled component flexbox item resizing width and increasing height but not decreasing height #1867

Answered by SmartKoolAid
SmartKoolAid asked this question in Q&A
Discussion options

You must be logged in to vote

https://stackoverflow.com/questions/36247140/why-dont-flex-items-shrink-past-content-size

This solved my problem

"You've applied min-width: 0 and the item still doesn't shrink?

Nested Flex Containers

If you're dealing with flex items on multiple levels of the HTML structure, it may be necessary to override the default min-width: auto / min-height: auto on items at higher levels.

Basically, a higher level flex item with min-width: auto can prevent shrinking on items nested below with min-width: 0"

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@larsjuvik
Comment options

Answer selected by SmartKoolAid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants