You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Abstract: This module describes how the CSS formatting box tree is generated from the document element tree and defines the 'display' and 'box-suppress' properties that control it.
15
-
Ignored Terms: display-model, display-role, table row group box, ruby container
16
-
Link Defaults: css-lists-3 (property) counter-increment
15
+
Ignored Terms: display-model, display-role, table row group box
17
16
</pre>
18
17
19
18
<h2 id="intro">
@@ -506,8 +505,64 @@ Run-In Layout</h2>
506
505
507
506
Note: This run-in model is slightly different from the one proposed in earlier revisions of [[!CSS21]].
508
507
508
+
<h2 id='element-box-fragment'>
509
+
Appendix A: Elements, Boxes, and Fragments</h2>
510
+
511
+
CSS operates on several different types of objects,
512
+
depending on the stage of processing and what is being done:
513
+
the <a>element</a>, the <a>box</a>, and the <a>fragment</a>.
514
+
515
+
Note: Many of the CSS specs were written before this terminology was ironed out,
516
+
or refer to things incorrectly,
517
+
so view older specs with caution when they're using these terms.
518
+
It should be possible to infer from context which term they really mean.
519
+
Please report errors in specs when you find them,
520
+
so they can be corrected.
521
+
522
+
An <dfn>element</dfn> is an object in the DOM tree returned by the host element.
523
+
The purpose of an <a>element</a> is to receive styling,
524
+
so the multiple declarations from the document's style sheets
525
+
are converted into values for each property on each element.
526
+
(The DOM tree also contains text,
527
+
which is identical to <a>elements</a>
528
+
except that it can't be styled directly,
529
+
only through inheritance.)
530
+
531
+
<a>Elements</a> generate <a>boxes</a>.
532
+
Typically, an <a>element</a> generates a single <a>box</a>.
533
+
Some properties (such as ''display:none'') cause an <a>element</a> and/or its descendants to not generate any <a>boxes</a> at all.
534
+
Some properties (such as ''columns: 2'') cause an <a>element</a> to generate multiple <a>boxes</a>s.
535
+
Some combinations of properties (such as an element with ''display:table-cell'' and a parent element with anything but ''display:table-row'')
536
+
trigger the creation of <a>anonymous boxes</a> to keep the <a>box tree</a> reasonable.
537
+
538
+
A <dfn>box</dfn> is an object generated from an <a>element</a> according to the 'display' property
539
+
and other layout-affecting properties,
540
+
organized into a <dfn>box tree</dfn>.
541
+
The purpose of a <a>box</a> is to organize the document into a structure that is suitable for layout.
542
+
<a>Boxes</a> have the same styles as their generating <a>element</a>, unless otherwise indicated.
543
+
They're referred by their type, typically determined by the 'display' value--
544
+
a <a>box</a> generated by an element with ''display: block'' is called a “block box” or just a “block”.
545
+
546
+
An <dfn>anonymous box</dfn> is generated in certain circumstances
547
+
where a type of <a>box</a> (such as a table cell box)
548
+
requires a particular type of parent box (such as a table row box)
549
+
but the document structure is not written to produce that--
550
+
<a>anonymous boxes</a> are then generated between the parent and child to provide the required structures.
551
+
Anonymous boxes are styled as if they inherited from their nearest non-anonymous parent <a>box</a>,
552
+
unless otherwise specified.
553
+
554
+
The process of layout generates <a>fragments</a> from <a>boxes</a>.
555
+
556
+
A <dfn>fragment</dfn> is an object representing the result of layout,
557
+
organized into a <dfn>fragment tree</dfn>.
558
+
<a>Fragments</a> have a size and position,
559
+
and the same styles as their generating <a>boxes</a>
560
+
unless otherwise specified.
561
+
562
+
563
+
509
564
<h2 id='glossary'>
510
-
Glossary</h2>
565
+
Appendix B: Glossary</h2>
511
566
512
567
The following terms are defined here for convenience:
0 commit comments