Containing Block
含むブロック
コンテインブロックは、要素が位置やパーセンテージサイズを計算するために使用する矩形です。
もう一つの例
セールバッジをブロックの開始から8px、インラインの終了から8pxの位置に配置します。カードに `position: relative` を設定すると、それが正しい包含ブロックになります。変形されたカルーセルの先祖要素は、バッジを遠くの角に引っ張ることができなくなります。
主な部分
- 01祖先の確立
- 02参照矩形
- 03解決された図版またはパーセンテージ
以下の場合に使用します
パーセントサイズ、絶対またはスティッキー位置、または変換された親を修正する前に、真の包含ブロックを見つけてください。
以下の場合は使用しないでください
常に最も近いDOM親またはビューポートであるとは想定しないでください。位置と包含のルールによって変わることがあります。
コードで使用する名前
positioning scheme + containing-block-establishing ancestor 出荷前に
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 含むブロック (Containing Block)。 User context:セールバッジをブロックの開始から8px、インラインの終了から8pxの位置に配置します。カードに `position: relative` を設定すると、それが正しい包含ブロックになります。変形されたカルーセルの先祖要素は、バッジを遠くの角に引っ張ることができなくなります。 Design concept to apply:含むブロック (Containing Block)。 Why it fits:パーセントサイズ、絶対またはスティッキー位置、または変換された親を修正する前に、真の包含ブロックを見つけてください。 Do not use it when:常に最も近いDOM親またはビューポートであるとは想定しないでください。位置と包含のルールによって変わることがあります。 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 含むブロック (Containing Block) is used now. Definition: コンテインブロックは、要素が位置やパーセンテージサイズを計算するために使用する矩形です。 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.