Block Formatting Context
ブロックフォーマッティングコンテキスト
ブロックフォーマットコンテキスト(BFC)は、ブロックレイアウト用の独立した領域です。フロートを内部に保持し、一部のマージンやフロートが外部のコンテンツに影響を与えるのを防ぎます。
もう一つの例
古い記事カードでは、浮動画像により背景が崩れ、テキストが近くのフロートを回り込む。`display: flow-root` を追加すると、画像を含むBFCが作成され、望ましい子のマージンを維持できる。`overflow: hidden` とは異なり、フォーカスリングを切り落とすことはない。
主な部分
- 01BFCルート
- 02含まれる浮動小数点
- 03分離ブロックフロー
以下の場合に使用します
コンポーネントが浮動要素を保持する必要がある場合、またはブロックレイアウトの効果を内部に保持してコンテンツを切り取らないようにする場合は `flow-root` を使用してください。
以下の場合は使用しないでください
自動フロート修正として `overflow: hidden` を使用しないでください。コンテンツ、影、ポップオーバー、またはフォーカスマークが切り取られる可能性があります。
コードで使用する名前
display: flow-root (or another BFC-establishing condition) 出荷前に
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 ブロックフォーマッティングコンテキスト (Block Formatting Context)。 User context:古い記事カードでは、浮動画像により背景が崩れ、テキストが近くのフロートを回り込む。`display: flow-root` を追加すると、画像を含むBFCが作成され、望ましい子のマージンを維持できる。`overflow: hidden` とは異なり、フォーカスリングを切り落とすことはない。 Design concept to apply:ブロックフォーマッティングコンテキスト (Block Formatting Context)。 Why it fits:コンポーネントが浮動要素を保持する必要がある場合、またはブロックレイアウトの効果を内部に保持してコンテンツを切り取らないようにする場合は `flow-root` を使用してください。 Do not use it when:自動フロート修正として `overflow: hidden` を使用しないでください。コンテンツ、影、ポップオーバー、またはフォーカスマークが切り取られる可能性があります。 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 ブロックフォーマッティングコンテキスト (Block Formatting Context) is used now. Definition: ブロックフォーマットコンテキスト(BFC)は、ブロックレイアウト用の独立した領域です。フロートを内部に保持し、一部のマージンやフロートが外部のコンテンツに影響を与えるのを防ぎます。 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.