Skip to content

Commit fb0eeac

Browse files
committed
Define fragment indices so that fragments can be split across columns or pages, which means that paginating content is much less likely to cause unexpected breakage in the styling, as discussed at face-to-face meeting afternoon of 2012-08-13.
1 parent fec2915 commit fb0eeac

2 files changed

Lines changed: 57 additions & 62 deletions

File tree

css3-overflow/Overview.html

Lines changed: 29 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -364,38 +364,36 @@ <h2 id=fragment-overflow><span class=secno>4. </span>Fragment overflow</h2>
364364
<p> When the computed value of ‘<code class=property>overflow</code>
365365
for an element is ‘<code class=css>fragments</code>’, and
366366
implementations would otherwise have created a box for the element, then
367-
implementations must create at least one box for that element. Each box
368-
created for the element is called a <dfn id=fragment-box>fragment
369-
box</dfn> for that element. (If an element with ‘<code
370-
class=css>overflow: fragments</code>’ generates only one box, that box
371-
is a <a href="#fragment-box"><i>fragment box</i></a>. However, if an
372-
element's computed ‘<code class=property>overflow</code>’ is not
373-
<code class=css>fragments</code>’, then its box is not a <a
367+
implementations must create a sequence of <dfn id=fragment-box>fragment
368+
box</dfn>es for that element. (It is possible for an element with ‘<code
369+
class=css>overflow: fragments</code>’ to generate only one <a
370+
href="#fragment-box"><i>fragment box</i></a>. However, if an element's
371+
computed ‘<code class=property>overflow</code>’ is not ‘<code
372+
class=css>fragments</code>’, then its box is not a <a
374373
href="#fragment-box"><i>fragment box</i></a>.) Every <a
375374
href="#fragment-box"><i>fragment box</i></a> is a fragmentation container,
376-
and for each <a href="#fragment-box"><i>fragment box</i></a> which ends
377-
with a fragmentation break, (which could happen because breakable content
378-
overflows in the block dimension or because of a forced break), there must
379-
be another <a href="#fragment-box"><i>fragment box</i></a> created as a
380-
next sibling of the previous one. <span class=issue>Or is it as though
375+
and any overflow that would cause that fragmentation container to fragment
376+
causes another <a href="#fragment-box"><i>fragment box</i></a> created as
377+
a next sibling of the previous one. <span class=issue>Or is it as though
381378
it's a next sibling of the element? Need to figure out exactly how this
382-
interacts with other box-level fixup.</span> (Breakable content might
383-
overflow in the box dimension either because of a specified size on the <a
384-
href="#fragment-box"><i>fragment box</i></a> or because the <a
385-
href="#fragment-box"><i>fragment box</i></a> is within a fragmentation
386-
context in which it is being broken. In other words, a single <a
387-
href="#fragment-box"><i>fragment box</i></a> is never broken across
388-
columns or pages; the pieces that are in separate columns or pages are
389-
always distinct <a href="#fragment-box"><i>fragment box</i></a>es.)
390-
391-
<p class=issue> We also want ‘<code class=css>::nth-fragment()</code>
392-
pseudo-elements to be able to apply to the pieces of an element split
393-
within a fragmentation context. Should we require that authors who want to
394-
use ‘<code class=css>::nth-fragment()</code>’ in this way specify
395-
<code class=css>overflow:fragments</code>’ (even if they don't
396-
specify a constrained height), or should it work automatically for all
397-
elements even if they don't have ‘<code class=css>overflow:
398-
fragments</code>’?
379+
interacts with other box-level fixup.</span> However, fragment boxes may
380+
themselves be broken (due to fragmentation in a fragmentation context
381+
outside of them, such as pages, columns, or other fragment boxes); such
382+
breaking leads to fragments of the same fragment box rather than multiple
383+
fragment boxes. (This matters because fragment boxes may be styled by
384+
their index; such breaking leads to multiple fragments of a fragment box
385+
with a single index. This design choice is so that breaking a fragment box
386+
across pages does not break the association of indices to particular
387+
pieces of content.) <span class=issue>Should a forced break that breaks to
388+
an outer fragmentation context cause a new fragment of a single fragment
389+
box or a new fragment box?</span> <span class=issue>Should we find a term
390+
other than <a href="#fragment-box"><i>fragment box</i></a> here to make
391+
this a little less confusing?</span>
392+
393+
<p class=issue> What if we want to be able to style the pieces of an
394+
element split within another type of fragmentation context? These rules
395+
prevent ever using ‘<code class=css>::nth-fragment()</code>’ for that,
396+
despite that the name seems the most logical name for such a feature.
399397

400398
<div class=example>
401399
<table class=source-demo-pair>
@@ -631,8 +629,7 @@ <h4 id=style-of-fragments><span class=secno>4.1.2. </span>Styling of
631629
margin-bottom: 1em;
632630
height: 4em;
633631
}
634-
.article::nth-fragment(n+2) {
635-
/* 2 and up */
632+
.article::nth-fragment(2) {
636633
margin-left: 5em;
637634
margin-right: 2em;
638635
}
@@ -866,8 +863,7 @@ <h3 id=max-lines><span class=secno>4.2. </span>The ‘<a
866863
font-size: 1.5em;
867864
max-lines: 3;
868865
}
869-
.article::nth-fragment(n+2) {
870-
/* 2 and up */
866+
.article::nth-fragment(2) {
871867
column-count: 2;
872868
}
873869
&lt;/style&gt;

css3-overflow/Overview.src.html

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -259,42 +259,43 @@ <h2 id="fragment-overflow">Fragment overflow</h2>
259259
<p>
260260
When the computed value of 'overflow' for an element is ''fragments'',
261261
and implementations would otherwise have created a box for the element,
262-
then implementations must create at least one box for that element.
263-
Each box created for the element is called a <dfn>fragment box</dfn>
262+
then implementations must create a sequence of <dfn>fragment box</dfn>es
264263
for that element.
265-
(If an element with ''overflow: fragments'' generates only one box,
266-
that box is a <i>fragment box</i>.
264+
(It is possible for an element with ''overflow: fragments''
265+
to generate only one <i>fragment box</i>.
267266
However, if an element's computed 'overflow' is not ''fragments'',
268267
then its box is not a <i>fragment box</i>.)
269268
Every <i>fragment box</i> is a fragmentation container,
270-
and for each <i>fragment box</i> which ends with a fragmentation break,
271-
(which could happen
272-
because breakable content overflows in the block dimension
273-
or because of a forced break),
274-
there must be another <i>fragment box</i> created as a next sibling
269+
and any overflow
270+
that would cause that fragmentation container to fragment
271+
causes another <i>fragment box</i> created as a next sibling
275272
of the previous one.
276273
<span class="issue">Or is it as though it's a next sibling of
277274
the element? Need to figure out exactly how this interacts with
278275
other box-level fixup.</span>
279-
(Breakable content might overflow in the box dimension either
280-
because of a specified size on the <i>fragment box</i>
281-
or because the <i>fragment box</i> is within a fragmentation context
282-
in which it is being broken.
283-
In other words, a single <i>fragment box</i> is never broken
284-
across columns or pages;
285-
the pieces that are in separate columns or pages
286-
are always distinct <i>fragment box</i>es.)
276+
However, fragment boxes may themselves be broken
277+
(due to fragmentation in a fragmentation context outside of them,
278+
such as pages, columns, or other fragment boxes);
279+
such breaking leads to fragments of the same fragment box
280+
rather than multiple fragment boxes.
281+
(This matters because fragment boxes may be styled by their index;
282+
such breaking leads to multiple fragments of a fragment box
283+
with a single index.
284+
This design choice is so that
285+
breaking a fragment box across pages does not break
286+
the association of indices to particular pieces of content.)
287+
<span class="issue">Should a forced break that breaks to
288+
an outer fragmentation context cause a new fragment of a single
289+
fragment box or a new fragment box?</span>
290+
<span class="issue">Should we find a term other than
291+
<i>fragment box</i> here to make this a little less confusing?</span>
287292
</p>
288293

289294
<p class="issue">
290-
We also want ''::nth-fragment()'' pseudo-elements
291-
to be able to apply to the pieces of an element
292-
split within a fragmentation context.
293-
Should we require that authors who want to use
294-
''::nth-fragment()'' in this way specify ''overflow:fragments''
295-
(even if they don't specify a constrained height),
296-
or should it work automatically for all elements
297-
even if they don't have ''overflow: fragments''?
295+
What if we want to be able to style the pieces of an element
296+
split within another type of fragmentation context?
297+
These rules prevent ever using ''::nth-fragment()'' for that,
298+
despite that the name seems the most logical name for such a feature.
298299
</p>
299300

300301
<div class="example">
@@ -516,8 +517,7 @@ <h4 id="style-of-fragments">Styling of fragments</h4>
516517
margin-bottom: 1em;
517518
height: 4em;
518519
}
519-
.article::nth-fragment(n+2) {
520-
/* 2 and up */
520+
.article::nth-fragment(2) {
521521
margin-left: 5em;
522522
margin-right: 2em;
523523
}
@@ -722,8 +722,7 @@ <h3 id="max-lines">The 'max-lines' property</h3>
722722
font-size: 1.5em;
723723
max-lines: 3;
724724
}
725-
.article::nth-fragment(n+2) {
726-
/* 2 and up */
725+
.article::nth-fragment(2) {
727726
column-count: 2;
728727
}
729728
&lt;/style&gt;

0 commit comments

Comments
 (0)