jensimmons/cssremedy

Image causes unexpected if used inside intrinsic parent

Opened this issue · 0 comments

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:

  1. imgs with percentaged width is considered as extrinsic child when calculating its intrinsic parent
  2. there is a bug (or technically, undefined behaviour) where percentaged max-width are treated as percentaged width (i.e. turning elements to extrinsic child)