Stacking Context
スタッキングコンテキスト
スタッキングコンテキストは、CSSレイヤーのローカルグループです。アイテムはまずグループ内で順序付けされ、その後グループ全体が他のグループの間に配置されます。
もう一つの例
モーダルは、変形されたカード内にあり、別のページヘッダーの隣にあります。たとえ z-index: 9999 であっても、モーダルをカードのスタッキングコンテキストの外に移動することはできません。Z-indexの値は、それが属するコンテキスト内でのみ比較されます。
主な部分
- 01コンテキストルート
- 02ローカル描画順
- 03原子の兄弟順序
以下の場合に使用します
1つの重なった子要素が別のレイヤーグループのアイテムの上に上がれない理由を説明する際に、この用語を使用してください。
以下の場合は使用しないでください
ページ全体を一つの z-index スケールとして扱ったり、コンテクストルートを見つける前に巨大な値を追加したりしないでください。
コードで使用する名前
context root → local paint order → atomic sibling 出荷前に
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 スタッキングコンテキスト (Stacking Context)。 User context:モーダルは、変形されたカード内にあり、別のページヘッダーの隣にあります。たとえ z-index: 9999 であっても、モーダルをカードのスタッキングコンテキストの外に移動することはできません。Z-indexの値は、それが属するコンテキスト内でのみ比較されます。 Design concept to apply:スタッキングコンテキスト (Stacking Context)。 Why it fits:1つの重なった子要素が別のレイヤーグループのアイテムの上に上がれない理由を説明する際に、この用語を使用してください。 Do not use it when:ページ全体を一つの z-index スケールとして扱ったり、コンテクストルートを見つける前に巨大な値を追加したりしないでください。 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 スタッキングコンテキスト (Stacking Context) is used now. Definition: スタッキングコンテキストは、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.