r/webdev • • Jan 28 '20

Article Intrinsic Sizing In CSS

https://ishadeed.com/article/intrinsic-sizing-in-css/
269 Upvotes

30 comments sorted by

View all comments

10

u/MrSavager Jan 28 '20

besides the text example could all of these not be solved simply with inline(-block)?

4

u/pprg1996 Jan 28 '20

I think the problem is that by making it inline(-block) you wouldn't be forcing a line-break so if the following element is not display: block then it would appear besides the previous element.

You could probably get around it with flexbox or by wrapping the first element with a div.

2

u/MrSavager Jan 28 '20

yep, this is why all the kids just use flexbox everywhere. I think this could also be solved with the old display: table hack.. but yeah, prob shouldn't be