clamp()
clamp()
`clamp()` は好ましいCSS値を選択しますが、最小値と最大値の間に保持します。
もう一つの例
ヘッドラインは `clamp(2rem,1.2rem + 3vw,4.5rem)` を使用します。これは、スマホからデスクトップまで滑らかに拡大しますが、32px 未満にも 72px を超えることもありません。このルールは `rem` 単位を保持するため、ブラウザのズームも機能します。
主な部分
- 01最小
- 02推奨表現
- 03最大値
以下の場合に使用します
スムーズに変化させたいが、明確で読みやすい範囲内に留めたい値に使用してください。必要に応じて相対単位とビューポート単位を混ぜてください。
以下の場合は使用しないでください
テキストの場合、優先値としてビューポート単位のみを使用しないでください。ズーム、短い画面、非常に長い翻訳をテストしてください。
コードで使用する名前
clamp(minimum, preferred, maximum) 出荷前に
Check content order, shared design values, component consistency, contrast, zoom, and layout changes by screen size. Verify every theme, language, and state. If there is motion, offer an equal reduced-motion experience.
Outcome:Complete the task with clamp() (clamp())。 User context:ヘッドラインは `clamp(2rem,1.2rem + 3vw,4.5rem)` を使用します。これは、スマホからデスクトップまで滑らかに拡大しますが、32px 未満にも 72px を超えることもありません。このルールは `rem` 単位を保持するため、ブラウザのズームも機能します。 Design concept to apply:clamp() (clamp())。 Why it fits:スムーズに変化させたいが、明確で読みやすい範囲内に留めたい値に使用してください。必要に応じて相対単位とビューポート単位を混ぜてください。 Do not use it when:テキストの場合、優先値としてビューポート単位のみを使用しないでください。ズーム、短い画面、非常に長い翻訳をテストしてください。 Design requirements: Set the content order, shared design values, and reusable components. Define how the layout changes by screen size and state. Keep useful design choices separate from decoration. Inclusion and resilience: Check contrast, zoom, languages, themes, and reduced motion when needed. Do not use color or effects as the only way to show meaning. Acceptance criteria: The design stays clear on phones and desktops, at zoom, in every theme, and in all supported languages. Interactive states stay clear and consistent. Evidence and limits (evidence boundary):きちんとした書類でも、まだドラフトやリリース候補、あるいは最終版かもしれません。ステータスや、ブラウザやプラットフォームの対応状況を確認しましょう。 Unknowns to confirm: Brand limits, amount of content, supported themes and languages, target devices, and design-system rules.
このリクエストを確認する
Review how clamp() (clamp()) is used now. Definition: `clamp()` は好ましいCSS値を選択しますが、最小値と最大値の間に保持します。 Release checks: Check content order, shared design values, component consistency, contrast, zoom, and layout changes by screen size. Verify every theme, language, and state. If there is motion, offer an equal reduced-motion experience. Before changing code, list the evidence, gaps, severity, and the smallest safe fix.