Re:CSS Findings from the Threads App
by aidos on Monday July 17, 2023 @05:00PM
(#36764010)
Any chance you could show an example? In theory a block level element can only sit inside another block level element. And those expand to the width of their parent unless you constrain the width.
[ Parent
| on HN ]
Re:CSS Findings from the Threads App
by truckerbill on Tuesday July 18, 2023 @07:36AM
(#36770707)
https://jsfiddle.net/jcaysopd/75/
I have no doubt there is a 'logical reason' for the behaviour but it doesn't stop it being annoying to work with.
Gotcha. That’s because of the 100% vs auto thing. These days everyone just puts “box-sizing: border-box” on everything to make it go away.
This explains a bit more about what you’re seeing
http://stackoverflow.com/questions/28353625/why-does-percent...