Useful CSSgrass
このページは半公開の庭先公開ページです。CSS container queries - CSS | MDNContainer queries enable you to apply styles to an element based on certain attributes of its container:

https://github.com/vyfor/rattles
newly supported in 18.4
https://developer.mozilla.org/en-US/docs/Web/CSS/basic-shape/shape
p {
--half-leading: calc((1lh - 1em) / 2);
text-box-trim: trim-both;
}
:is(pre, figure) {
& + & {
...
}
}
Grid Lanes
CSS純正のメイソンリー。Safari 26.4〜。Chrome/Edgeはフラグ付き
The Field Guide to CSS Grid LanesLearn Grid Lanes to create masonry layouts in pure CSS. Absorb the possibilities with the Field Guide’s interactive playground. Return to t….container {
display: grid-lanes;
grid-template-columns: repeat(3, 1fr);
gap: 1rem;
}- 列を定義すると縦のウォーターフォール、行を定義すると横のブリック。もう片方の軸は自動で詰める
- トラック定義は普通のGridと同じ語彙(
fr、minmax()、repeat(auto-fit, …))。grid-column: span 2で跨ぎ、grid-column: 3で固定 flow-tolerance(既定1em): レーンの高さ差がこれ以下なら同点扱いにして書字方向順に流す。見た目の順序とタブ順を揃えるため- DOM順は保たれる。spanや固定配置を使うと読み順とズレるので、リンクを含むとWCAG 2.4.3に引っかかりやすい。
reading-flow/reading-orderで対処する流れ @supports (display: grid-lanes)でcolumns: 3などにフォールバック
https://webkit.org/blog/17660/introducing-css-grid-lanes/
Safari 27 (2026/9)
appearance: base-select—<select>を全部スタイリングできる。::picker-icon::checkmark<selectedcontent>width: stretch— margin込みで親を埋める。-webkit-fill-availableの代替:heading、revert-rule- transformに追従するanchor positioning
- scroll anchoring(
overflow-anchor)が既定でON text-autospaceのinsert<model src="x.usdz">がiOS/macOSでも。dynamic-range-limitでHDR制御- Canvas/WebGLで
srgb-lineardisplay-p3-linear ReadableStreamのfor await…of、ReadableStream.from()- Wasm JSPI
- 26.2〜
random()/random-item()
https://webkit.org/blog/17967/news-from-wwdc26-webkit-in-safari-27-beta/

