Skip to content

Commit dfb7ff1

Browse files
committed
[css-contain-3] Tighten up normative definition of inline size containment. w3c#6426
1 parent 8574e93 commit dfb7ff1

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

css-contain-3/Overview.bs

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,12 @@ Strong Containment: the 'contain' property</h2>
8383
<dl dfn-type=value dfn-for=contain>
8484
<dt><dfn>inline-size</dfn>
8585
<dd>
86-
The value turns on <a>inline-size containment</a> for the element.
87-
This ensures that the inline [=size containment box|containment box=] can be laid out
88-
without needing to examine its descendants.
86+
This value turns on [=inline-size containment=] for the element.
87+
This prevents the [=inline-size=] of its [=principal box=]
88+
from directly depending on its contents.
89+
90+
Note: There can still be indirect dependencies,
91+
see [[#containment-inline-size]].
8992
</dl>
9093

9194

@@ -97,12 +100,20 @@ Types of Containment</h2>
97100
<h3 id='containment-inline-size'>
98101
Inline-Size Containment</h3>
99102

100-
Giving an element <dfn export>inline-size containment</dfn>
101-
applies [=size containment=] on the element’s [=inline axis=].
102-
That means the [=intrinsic size=] of the [=size containment box=]
103-
on the element’s [=inline axis=]
104-
is determined as if the element had no content.
105-
However, content continues to impact the element’s [=block axis=] [=intrinsic size=].
103+
If the element does not generate a <a>principal box</a>
104+
(as is the case with ''display: contents'' or ''display: none''),
105+
or its [=inner display type=] is ''display/table'',
106+
or its [=principal box=] is an <a spec="css-display-3">internal table box</a>,
107+
or an <a spec="css-display-3">internal ruby box</a>,
108+
or a <a spec="css-display-3" lt="atomic inline">non-atomic</a> <a spec="css-display-3">inline-level</a> box,
109+
[=inline-size containment=] has no effect.
110+
111+
Otherwise, giving an element <dfn export>inline-size containment</dfn>
112+
applies [=size containment=] to the [=inline-axis=] sizing of its [=principal box=].
113+
This means the [=inline-axis=] [=intrinsic sizes=] of the [=principal box=]
114+
are determined as if the element had no content.
115+
However, content continues to impact the box’s [=block-axis=] [=intrinsic sizes=] as usual,
116+
and the box is allowed to [=fragmentation|fragment=] normally in the [=block axis=].
106117

107118
<div class=note>
108119
In some cases,

0 commit comments

Comments
 (0)