Skip to content

Commit b2d484c

Browse files
committed
[css-display] Specify how styles reflect back from boxes to their generating elements. Fixes #1643.
1 parent 79da616 commit b2d484c

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

css-display-3/Overview.bs

+19-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Previous Version: https://www.w3.org/TR/2014/WD-css-display-3-20140911/
1515
Editor: Tab Atkins Jr., Google, http://xanthir.com/contact/, w3cid 42199
1616
Editor: Elika J. Etemad / fantasai, Invited Expert, http://fantasai.inkedblade.net/contact, w3cid 35400
1717
Abstract: This module describes how the CSS formatting box tree is generated from the document element tree and defines the 'display' property that controls it.
18-
Ignored Terms: display-model, display-role, table row group box, absolutely positioned, table formatting context
18+
Ignored Terms: display-model, display-role, table row group box, absolutely positioned, table formatting context, table grid box
1919
At Risk: Application of ''::first-letter'' in the presence of run-ins
2020
At Risk: ''display: run-in''
2121
At Risk: All multi-keyword values of 'display'
@@ -70,10 +70,26 @@ Introduction</h2>
7070
And some values
7171
(such as ''display/none'' or ''display/contents'')
7272
cause the [=CSS/element=] and/or its descendants to not generate any <a>boxes</a> at all.
73-
<a>Boxes</a> are assigned the same styles as their generating [=CSS/element=], unless otherwise indicated.
74-
They're often referred to by their 'display' type--
73+
<a>Boxes</a> are often referred to by their 'display' type--
7574
e.g. a <a>box</a> generated by an element with ''display: block'' is called a “block box” or just a “block”.
7675

76+
A <a>box</a> is assigned the same styles as its generating [=CSS/element=], unless otherwise indicated.
77+
In general, <a>inherited properties</a> are assigned to the <a>principal box</a>,
78+
and then inherit through the box tree
79+
to any other boxes generated by the same element.
80+
Non-inherited properties default to applying to the <a>principal box</a>,
81+
but when the element generates multiple boxes,
82+
are sometimes defined to apply to a different box:
83+
for example, the 'border' properties applied to a table element
84+
are applied to its <a>table grid box</a>,
85+
not to its <a lt="principal box">principal</a> <a>table wrapper box</a>.
86+
If the value computation process alters the styles of those boxes,
87+
and the element's style is requested
88+
(such as through {{getComputedStyle()}}),
89+
the element reflects,
90+
for each property,
91+
the value from the box to which that property was applied.
92+
7793
Similarly, each contiguous sequence of sibling <a>text nodes</a> generates a <a>text run</a>,
7894
which is assigned the same styles as the generating <a>text nodes</a>.
7995

0 commit comments

Comments
 (0)