Skip to content

Commit 434765e

Browse files
committed
[css-display] More correctly define block container. Fixes #1185.
1 parent abb160c commit 434765e

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

css-display/Overview.bs

+25-3
Original file line numberDiff line numberDiff line change
@@ -805,9 +805,31 @@ Appendix A: Glossary</h2>
805805

806806
<dt><dfn lt="block container|block container box">block container</dfn>
807807
<dd>
808-
A box whose contents participate in a <a>block formatting context</a>.
809-
A block container does not necessarily establish a <em>new</em> <a>block formatting context</a>
810-
if its parent formatting context is also a <a>block formatting context</a>.
808+
A block container either contains only inline-level boxes
809+
participating in an <a>inline formatting context</a>,
810+
or contains only block-level boxes
811+
participating in a <a>block formatting context</a>
812+
(possibly generating anonymous block boxes to ensure this constraint,
813+
as defined in <a href="https://www.w3.org/TR/CSS2/visuren.html#anonymous-block-level">CSS2.1&sect;9.2.1.1</a>).
814+
815+
A block container that contains only inline-level content
816+
establishes a new <a>inline formatting context</a>.
817+
The element then also generates a <a>root inline box</a>
818+
which wraps all of its inline content.
819+
820+
A block container that contains only block-level boxes
821+
establishes a new <a>block formatting context</a>
822+
if its parent formatting context is <em>not</em> a <a>block formatting context</a>;
823+
otherwise, when participating in a <a>block formatting context</a> itself,
824+
it either establishes a new <a>block formatting context</a> for its contents
825+
or continues the one in which it participates,
826+
as determined by the constraints of other properties
827+
(such as 'overflow' or 'align-content').
828+
829+
Note: Not all block container boxes are block-level boxes:
830+
non-replaced inline blocks and non-replaced table cells are block containers
831+
but not block-level boxes.
832+
Block-level boxes that are also block containers are called <a>block boxes</a>.
811833

812834
<dt><dfn>block box</dfn>
813835
<dd>

0 commit comments

Comments
 (0)