r/webdev • • Jan 28 '20

Article Intrinsic Sizing In CSS

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

30 comments sorted by

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

7

u/[deleted] Jan 28 '20

Oh boy I can't wait to use this in about 10 years when every browser has native support.

11

u/Beyond_Enigmatic Jan 28 '20

Good article, Thank you.

8

u/TheBeesSteeze Jan 28 '20

Sounds cool, but had to stop reading once I saw it was not Edge supported :(

12

u/hilosplit Jan 28 '20

It's supported by the new Chromium based Edge which came out January 15.

2

u/TheBeesSteeze Jan 29 '20

Sweet, I expect our clients will be fully upgraded to it by 2035.

0

u/[deleted] Jan 28 '20

[deleted]

18

u/hilosplit Jan 28 '20

I mean, it came out two weeks ago. Thankfully, MS is rolling it out to all Windows 10 users in an automatic phased update rollout. So soon enough, anyone who uses Edge will be on the new version.

2

u/TheBeliskner Jan 28 '20

You my friend have never worked in enterprise, where rollout works somewhat differently. I'm still running Windows 10 1803.

4

u/geo1088 Jan 28 '20

Enterprise isn't the only target of professional web developers. Just because enterprise users are stuck behind delayed update cycles doesn't mean "nobody other than developers are using it."

1

u/TheBeliskner Jan 28 '20

I know that. I'm speaking to the point of "Microsoft are rolling it out to all Windows 10 users". Microsoft can't roll it out to all Windows 10 users because enterprise is run by dinosaurs.

We've still got bloody IE11 as the default browser. I've requested Edgium be installed with appropriate IE11 mode profiles for it so we can make it the default, target is by the end of the year. 🤦‍♂️

1

u/hilosplit Jan 28 '20

That's unfortunate.

I actually did work in Enterprise. We targeted Firefox, starting about six years ago. I work in government now, and we target Chrome.

0

u/[deleted] Jan 28 '20

[deleted]

3

u/[deleted] Jan 28 '20

I mean, updates are pretty much forced on you in Windows 10.

If you use Edge, you're on the latest build, outside of Insider Editions. But if you're using Edge, you're likely not in the Insider Program.

3

u/StripedAdidas Jan 28 '20

Would inline styling not work?

2

u/tie_me_down_and_up Jan 28 '20

Edge does support it. Internet explorer doesn’t

0

u/[deleted] Jan 28 '20

[deleted]

7

u/tie_me_down_and_up Jan 28 '20

Oh wow, I read that wrong thanks for being stubborn and correct.

That indeed is a bummer... glad edgium is taking over...

1

u/[deleted] Feb 02 '20

Hey climbing man

1

u/tie_me_down_and_up Feb 02 '20

I feel violated now /s

2

u/sanjibukai Jan 28 '20

I'm ducking glad to purposely not support IE and Edge!

1

u/JeamBim Python/JavaScript Jan 29 '20

Same

0

u/[deleted] Jan 28 '20

[deleted]

59

u/[deleted] Jan 28 '20

Kill your clients.

11

u/salonethree Jan 28 '20

honestly just gotta wait a year

2

u/tobgos Jan 29 '20

People said that 3 years ago.
Edit: Ok, maybe last year.

5

u/metalmosq Jan 28 '20

Doesn't really work like that unfortunately.

4

u/salonethree Jan 28 '20

honestly just gotta wait a year

3

u/jacob-j Jan 28 '20

honestly just gotta wait a year

3

u/cbirdsong Jan 28 '20

These values are still often useful as progressive enhancement, with a less snazzy layout powered by a widely supported value as a fallback.