Skip to content

Commit dbb7042

Browse files
committed
Apply diff, per resolution. Fixes #1118.
1 parent ecb1969 commit dbb7042

File tree

4 files changed

+47
-25
lines changed

4 files changed

+47
-25
lines changed

css-cascade/Overview.bs

+10-2
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,22 @@ Introduction</h2>
4545
<h3 id="placement">
4646
Module Interactions</h3>
4747

48-
<p>This module replaces and extends
48+
<em>This section is normative.</em>
49+
50+
This module replaces and extends
4951
the rules for assigning property values, cascading, and inheritance defined in [[!CSS21]] chapter 6.
5052

51-
<p>Other CSS modules may expand the definitions of some of the syntax and features defined here.
53+
Other CSS modules may expand the definitions of some of the syntax and features defined here.
5254
For example, the Media Queries Level 4 specification,
5355
when combined with this module, expands the definition of
5456
the <<media-query>> value type as used in this specification.
5557

58+
For the purpose of this specification,
59+
<a>text nodes</a> are treated as <a>element</a> children of their associated element,
60+
and possess the full set of properties;
61+
since they cannot be targetted by selectors
62+
all of their computed values are assigned by <a href="#defaulting">defaulting</a>.
63+
5664
<h2 id="at-import">
5765
Importing Style Sheets: the ''@import'' rule</h2>
5866

css-display/Overview.bs

+23-10
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,25 @@ Introduction</h2>
3434

3535
<p><em>This section is normative.</em>
3636

37-
CSS takes a source document, organized as a tree of <dfn lt="element|element tree">elements</dfn>,
37+
CSS takes a source document, organized as a <dfn lt="element tree">tree</dfn> of <dfn>elements</dfn> and <dfn>text nodes</dfn>,
3838
and renders it onto a <a href="https://www.w3.org/TR/CSS2/intro.html#canvas">canvas</a> (such as your screen, a piece of paper, or an audio stream).
3939
To do this, it generates an intermediary structure,
4040
the <dfn export>box tree</dfn>,
4141
which represents the formatting structure of the rendered document.
42-
Each <dfn export>box</dfn> represents its corresponding <a>element</a> (or <a>pseudo-element</a>)
43-
in space and/or time on the canvas.
42+
Each <dfn export>box</dfn> in the <a>box tree</a>
43+
represents its corresponding <a>element</a> (or <a>pseudo-element</a>)
44+
in space and/or time on the canvas,
45+
while each <dfn export>text run</dfn> in the <a>box tree</a>
46+
likewise represents the contents of its corresponding <a>text nodes</a>.
4447

4548
To create the <a>box tree</a>,
4649
CSS first uses <a href="https://www.w3.org/TR/css-cascade/">cascading and inheritance</a>,
4750
to assign a <a>computed value</a> for each CSS property
48-
to each element in the source tree.
51+
to each <a>element</a> and <a>text node</a> in the source tree.
4952
(See [[!CSS3-CASCADE]].)
5053

51-
Then, for each element, it generates zero or more boxes
54+
Then, for each <a>element</a>,
55+
CSS generates zero or more <a>boxes</a>
5256
as specified by that element's 'display' property.
5357
Typically, an element generates a single <a>box</a>.
5458
However, some 'display' values
@@ -62,6 +66,9 @@ Introduction</h2>
6266
They're often referred to by their 'display' type--
6367
e.g. a <a>box</a> generated by an element with ''display: block'' is called a “block box” or just a “block”.
6468

69+
Similarly, each contiguous sequence of sibling <a>text nodes</a> generates a <a>text run</a>,
70+
which is assigned the same styles as the generating <a>text nodes</a>.
71+
6572
An <dfn lt="anonymous|anonymous box" export>anonymous box</dfn> is is a box that is not associated with any element.
6673
<a>Anonymous boxes</a> are generated in certain circumstances
6774
to fix up the <a>box tree</a> when it requires a particular nested structure
@@ -76,10 +83,11 @@ Introduction</h2>
7683
<a href="https://www.w3.org/TR/css-cascade/#inheriting">inherit</a> through their <a>box tree</a> parentage.
7784

7885
In the course of layout,
79-
a <a>box</a> may be broken into multiple <a>fragments</a>.
80-
This happens, for example, when an inline box is broken across lines,
86+
<a>boxes</a> and <a>text runs</a> can be broken into multiple <a>fragments</a>.
87+
This happens, for example, when an inline box and/or text run is broken across lines,
8188
or when a block box is broken across pages or columns.
82-
A <a>box</a> therefore consists of one or more <a>box fragments</a>.
89+
A <a>box</a> therefore consists of one or more <a>box fragments</a>,
90+
and a <a>text run</a> consists of one or more <a>text fragments</a>.
8391
See [[CSS3-BREAK]] for more information on <a>fragmentation</a>.
8492

8593
Note: Many of the CSS specs were written before this terminology was ironed out,
@@ -137,6 +145,8 @@ Box Layout Modes: the 'display' property</h2>
137145
* the <dfn export local-lt="outer">outer display type</dfn>,
138146
which dictates how the box participates in its parent formatting context.
139147

148+
<a>Text runs</a> have no <a>display type</a>.
149+
140150
Some 'display' values have additional side-effects:
141151
such as ''list-item'', which also generates a ''::marker'' pseudo-element,
142152
and ''display/none'', which causes the element's entire subtree to be left out of the box tree.
@@ -498,7 +508,7 @@ Box Generation: the ''display/none'' and ''display/contents'' keywords</h3>
498508
<dt><dfn>contents</dfn>
499509
<dd>
500510
The element itself does not generate any boxes,
501-
but its children and pseudo-elements still generate boxes as normal.
511+
but its children and pseudo-elements still generate <a>boxes</a> and <a>text runs</a> as normal.
502512
For the purposes of box generation and layout,
503513
the element must be treated as if it had been replaced in the [=element tree=]
504514
by its contents
@@ -525,7 +535,10 @@ Box Generation: the ''display/none'' and ''display/contents'' keywords</h3>
525535

526536
<dt><dfn>none</dfn>
527537
<dd>
528-
The element and its descendants generate no boxes.
538+
The <a>element</a> and its descendants generate no <a>boxes</a> or <a>text runs</a>.
539+
540+
Similarly, if a <a>text node</a> is defined to behave as ''display: none'',
541+
it generates no <a>text runs</a>.
529542
</dl>
530543

531544
Elements with either of these values do not have <a>inner</a> or <a>outer display types</a>,

css-flexbox/Overview.bs

+4-4
Original file line numberDiff line numberDiff line change
@@ -562,12 +562,12 @@ Flex Items</h2>
562562

563563
Each in-flow child of a <a>flex container</a>
564564
becomes a <a>flex item</a>,
565-
and each contiguous run of text that is directly contained inside a <a>flex container</a>
566-
is wrapped in an anonymous <a>flex item</a>.
567-
However, an anonymous flex item that contains only
565+
and each contiguous sequence of child <a>text runs</a>
566+
is wrapped in an <a>anonymous</a> <a>block container</a> <a>flex item</a>.
567+
However, if the entire sequence of child <a>text runs</a> contains only
568568
<a href="https://www.w3.org/TR/CSS2/text.html#white-space-prop">white space</a>
569569
(i.e. characters that can be affected by the 'white-space' property)
570-
is not rendered (just as if it were ''display:none'').
570+
it is instead not rendered (just as if its <a>text nodes</a> were ''display:none'').
571571

572572
<div class="example">
573573
<p>Examples of flex items:

css-grid/Overview.bs

+10-9
Original file line numberDiff line numberDiff line change
@@ -963,15 +963,16 @@ Clamping Overly Large Grids</h3>
963963
Grid Items</h2>
964964

965965
Loosely speaking, the <dfn export id="grid-item" lt="grid item">grid items</dfn> of a <a>grid container</a>
966-
are boxes representing its in-flow contents:
967-
each in-flow child of a <a>grid container</a>
968-
becomes a <a>grid item</a>.
969-
970-
Each contiguous run of text that is directly contained inside a <a>grid container</a>
971-
is wrapped in an anonymous <a>grid item</a>.
972-
However, an anonymous grid item that contains only
973-
<a href="https://www.w3.org/TR/css-text/#white-space-processing">white space</a>
974-
is not rendered, as if it were ''display: none''.
966+
are boxes representing its in-flow contents.
967+
968+
Each in-flow child of a <a>grid container</a>
969+
becomes a <a>grid item</a>,
970+
and each contiguous sequence of child <a>text runs</a>
971+
is wrapped in an <a>anonymous</a> <a>block container</a> <a>grid item</a>.
972+
However, if the entire sequence of child <a>text runs</a> contains only
973+
<a href="https://www.w3.org/TR/CSS2/text.html#white-space-prop">white space</a>
974+
(i.e. characters that can be affected by the 'white-space' property)
975+
it is instead not rendered (just as if its <a>text nodes</a> were ''display:none'').
975976

976977
<div class="example">
977978
<p>Examples of grid items:

0 commit comments

Comments
 (0)