Image causes unexpected if used inside intrinsic parent
Opened this issue · 0 comments
thien-do commented
Hi, I found a bug/interested behaviour when using Tailwind that caused by img { max-width: 100% }
. Reading their code, it points to this (marvelous) project so I think you'd be interested too :D
The bug: tailwindlabs/tailwindcss#4211
The playground: https://play.tailwindcss.com/YQ7Rdp8lvn
TL;DR:
- imgs with percentaged width is considered as extrinsic child when calculating its intrinsic parent
- there is a bug (or technically, undefined behaviour) where percentaged max-width are treated as percentaged width (i.e. turning elements to extrinsic child)