Useful CSSgrass

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


https://github.com/vyfor/rattles

Web UI 実装勉強会 4

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… gridlanes.webkit.org
.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-linear display-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/