短评 · ·

X 归档 2023-02-20

1 条动态 · 图 1 · 视频 0
Each time I use flex-wrap in CSS, I wish there is a way to detect when a flex item is wrapped.

I wrote a post thinking about why that is useful with a few use-cases that came to my mind.

This could be the closest thing to content queries in CSS.

🔗 https://ishadeed.com/article/flex-wrap-detect/
每次在 CSS 里用 flex-wrap,我都希望有办法检测 flex 子项何时发生了换行。

我写了一篇文章,思考了这为什么有用,并列出了我能想到的几个用例。

这可能是 CSS 里最接近内容查询(content queries)的东西了。

🔗
@shadeed9 的配图 1/1