Flex item dissapears when adding flex to container

5 Replies
argbet
argbet3y ago
Try un-commenting this and the card disappears, why tho?
Jochem
Jochem3y ago
iirc flex items shrink as much as they can. Because it has no minimum width, it shrinks to 0 and disappears
Mannix
Mannix3y ago
flex child is always want to be as small as possible so no content inside means it will be 0
Jochem
Jochem3y ago
if you set flex-grow: 1; on the .card it appears again because then it tries to take up as much as possible it'll balance with other children of the flex parent with flex-grow: 1; though
argbet
argbet3y ago
Ohhh, I see Thanks a lot guys, that was good to know!
Want results from more Discord servers?
Add your server