正在加载视频...

视频加载失败

🤯 How am I just finding out about display: contents; Suuuuper handy for CSS Flexbox + Grid where the children aren't direct descendants.

356,720 次观看 • 1 年前 •via X (Twitter)

10 条评论

Theo - t3.gg 的头像
Theo - t3.gg1 年前

Wait - I suck at CSS and I’ve been using this for like 7 years lol

Wes Bos 的头像
Wes Bos1 年前

lol 🍪

🦋@ericclemmons.com 的头像
🦋@ericclemmons.com1 年前

Wes, I gotta compliment you on your delivery and style here. All signal, no noise. Real-world problems and solutions.

Wes Bos 的头像
Wes Bos1 年前

thanks, Eric! I appreciate the feedbac 👍🏻

Travis Arnold 的头像
Travis Arnold1 年前

It also works really nice for Client Components that need access to Server Components

Wes Bos 的头像
Wes Bos1 年前

Damn that’s a great tip!

jhey ▲🐻🎈 的头像
jhey ▲🐻🎈1 年前

made me go back in time, remembered writing about this in 2018 my analogy then was "Who let the dogs out?" but realistically, it's like a lazy version of subgrid ⭐️

Wes Bos 的头像
Wes Bos1 年前

👌 always a few years ahead of us Mr Hey, J

Brandon Sara 的头像
Brandon Sara1 年前

I'm forced to use angular at work right now and display: contents comes in handy a lot since all components are also html elements.

Wes Bos 的头像
Wes Bos1 年前

Ahh Yah! Back before <>React fragments</>, this would have been a life saver

相关视频