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
<p>A <dfndata-dfn-type=dfndata-noexport="" id=run-in-element>run-in element<aclass=self-linkhref=#run-in-element></a></dfn> is an element with <aclass=cssdata-link-type=propdeschref=#propdef-display-outsidetitle=display-outside>display-outside: run-in</a>.
510
-
A <adata-link-type=dfnhref=#run-in-elementtitle="run-in element">run-in element</a> acts differently based on whether its siblings are inlines or blocks;
511
-
if it precedes a block, it <em>merges into</em> the block.
511
+
<p>A <dfndata-dfn-type=dfndata-noexport="" id=run-in-box>run-in box<aclass=self-linkhref=#run-in-box></a></dfn> is a box that <em>merges into</em> a block that comes after it,
512
+
inserting itself at the beginning of that block’s inline-level content.
512
513
This is useful for formatting compact headlines, definitions, and other similar things,
513
514
where the appropriate DOM structure is to have a headline preceding the following prose,
514
515
but the desired display is an inline headline laying out with the text.</p>
<p>Whenever there is a sequence of one or more contiguous sibling <adata-link-type=dfnhref=#run-in-elementtitle="run-in elements">run-in elements</a>,
551
-
if the sequence is followed by an element with <aclass=cssdata-link-type=propdeschref=#propdef-display-insidetitle=display-inside>display-inside: block</a> and <aclass=cssdata-link-type=propdeschref=#propdef-display-outsidetitle=display-outside>display-outside: block-level</a>,
552
-
all of the elements in the sequence generate inline-level boxes inside the following block,
553
-
as if they were <aclass=cssdata-link-type=propdeschref=#propdef-display-outsidetitle=display-outside>display-outside: inline-level</a>,
554
-
after its <aclass=cssdata-link-type=maybehref=http://dev.w3.org/csswg/css-lists-3/#selectordef-markertitle=::marker>::marker</a> pseudo-element’s boxes (if any),
555
-
but preceding any other boxes generates by the contents of the block
556
-
(including the box generated by the <spanclass=css>::before</span> pseudo-element, if any).</p>
550
+
<p>A <adata-link-type=dfnhref=#run-in-boxtitle="run-in box">run-in box</a> behaves exactly as an <adata-link-type=dfntitle="inline-level box">inline-level box</a>, except:</p>
557
551
558
-
<p>Otherwise, the behavior depends on how many sibling <adata-link-type=dfnhref=#run-in-elementtitle="run-in elements">run-in elements</a> are in the sequence:</p>
552
+
<ul>
553
+
<li>
554
+
If a <adata-link-type=dfnhref=#run-in-sequencetitle="run-in sequence">run-in sequence</a> is immediately followed by a block box
555
+
that does not establish a new <adata-link-type=dfntitle="formatting context">formatting context</a>,
556
+
it is inserted as direct children of the block box
557
+
after its <aclass=cssdata-link-type=maybehref=http://dev.w3.org/csswg/css-lists-3/#selectordef-markertitle=::marker>::marker</a> pseudo-element’s boxes (if any),
558
+
but preceding any other boxes generates by the contents of the block
559
+
(including the box generated by the <spanclass=css>::before</span> pseudo-element, if any).
559
560
560
-
<dl>
561
-
<dt>only one
562
-
<dd>
563
-
The <adata-link-type=dfnhref=#run-in-elementtitle="run-in element">run-in element</a> generates a block-level box,
564
-
as if it were <aclass=cssdata-link-type=propdeschref=#propdef-display-outsidetitle=display-outside>display-outside: block-level</a>.
561
+
<p>The reparented content is then formatted as if originally parented there.
562
+
<spanclass=note>Note that only layout is affected, not inheritance,
563
+
because property inheritance for non-anonymous boxes is based only on the element tree.</span></p>
565
564
566
-
<dt>more than one
567
-
<dd>
568
-
Each <adata-link-type=dfnhref=#run-in-elementtitle="run-in element">run-in element</a> generates an inline-level box,
569
-
as if it were <aclass=cssdata-link-type=propdeschref=#propdef-display-outsidetitle=display-outside>display-outside: inline-level</a>.
570
-
An anonymous block box is generated around the entire sequence of boxes thus generated.
571
-
</dl>
565
+
<li>
566
+
Otherwise,
567
+
an anonymous block box is generated around the <adata-link-type=dfnhref=#run-in-sequencetitle="run-in sequence">run-in sequence</a>
568
+
and all immediately following inline-level content
569
+
(up to, but not including, the next <adata-link-type=dfnhref=#run-in-sequencetitle="run-in sequence">run-in sequence</a>, if any).
570
+
571
+
<li>
572
+
A <adata-link-type=dfnhref=#run-in-boxtitle="run-in box">run-in box</a> with <aclass=cssdata-link-type=propdeschref=#propdef-display-insidetitle=display-inside>display-inside: auto</a><adata-link-type=dfnhref=#inlinifytitle=inlinifies>inlinifies</a> its contents.
573
+
</ul>
574
+
575
+
<p>A <dfndata-dfn-type=dfndata-noexport="" id=run-in-sequence>run-in sequence<aclass=self-linkhref=#run-in-sequence></a></dfn> is a maximal sequence of consecutive sibling <adata-link-type=dfnhref=#run-in-boxtitle="run-in boxes">run-in boxes</a>
576
+
and intervening white space and/or out-of-flow boxes.</p>
572
577
573
-
<pclass=issueid=issue-803bbb08><aclass=self-linkhref=#issue-803bbb08></a>Define handling of whitespace containing out-of-flow elements between run-ins,
574
-
run-ins that contain block-level content (<adata-link-type=dfnhref=#inlinifytitle=inlinify>inlinify</a> the contents recursively?),
575
-
and anything else in bz’s feedback.</p>
578
+
<pclass=issueid=issue-0c2c54c6><aclass=self-linkhref=#issue-0c2c54c6></a>Should out-of-flow elements get reparented, left behind, or break apart the sequence?
<h2class="no-num heading settled" id=issues-index><spanclass=content>Issues Index</span><aclass=self-linkhref=#issues-index></a></h2><divstyle="counter-reset: issue"><divclass=issue><aclass=cssdata-link-for=display-outsidedata-link-type=maybehref=#valdef-display-outside-contentstitle=contents>contents</a> currently only has an effect on box generation and layout.
810
815
Other things that care about the document tree are unaffected, like counter scopes.
811
-
Is this what we want?<ahref=#issue-1cacf007> ↵ </a></div><divclass=issue>Define handling of whitespace containing out-of-flow elements between run-ins,
812
-
run-ins that contain block-level content (<adata-link-type=dfnhref=#inlinifytitle=inlinify>inlinify</a> the contents recursively?),
813
-
and anything else in bz’s feedback.<ahref=#issue-803bbb08> ↵ </a></div></div>
816
+
Is this what we want?<ahref=#issue-1cacf007> ↵ </a></div><divclass=issue>Should out-of-flow elements get reparented, left behind, or break apart the sequence?
0 commit comments