width:100%とmarginを組み合わせたときに、親要素の幅を超えてしまうことがある。その場合、margin分を減算してwidthに設定する必要がある。そんなときにwidth:stretchを使うと、marginの計算なしで親要素の幅に合わせられる。ただし、執筆時点ではChrome 138/Edge 138のみサポートしている。Firefoxは-moz-available、Safariは-webkit-fill-availableのベンダープレフィックス付きのキーワードが必要。
Usage You can use min(), max(), and clamp() on the right side of any CSS expression where it would make sense. For min() and max(), you provide an argument list of values, and the browser determines which one is the smallest or largest. For example, in the case of width: min(1rem, 50%, 10vw), the browser calculates which of these relative units is the smallest and uses that value for the element's
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く