Skip to content

Commit 32fa483

Browse files
committed
[css-overflow] Introduce the 'continue' property
All sections that previously refered to the 'fragments' and 'paged-*' values of overflow are also patched up to use the 'continue' property instead.
1 parent 6f23af9 commit 32fa483

File tree

2 files changed

+304
-183
lines changed

2 files changed

+304
-183
lines changed

css-overflow/Overview.bs

+101-63
Original file line numberDiff line numberDiff line change
@@ -464,76 +464,119 @@ Introduction</h2>
464464
'overflow-x' and 'overflow-y' instead?
465465
</p>
466466

467-
<h2 id="fragmentation-properties">Fragmentation properties</h2>
467+
<h2 id="fragmentation">Fragmentation of overflow</h2>
468468

469-
Issue: This section is a WIP, and currently just holds bits of information that need to be massaged into proper form.
469+
<pre class=propdef>
470+
Name: continue
471+
Value: ''auto'' | ''overflow'' | ''paginate'' | ''fragments'' | ''discard'' | ''next''
472+
Initial: ''auto''
473+
Applies to: block containers [[!CSS21]], flex containers [[!CSS3-FLEXBOX]], and grid containers [[!CSS3-GRID-LAYOUT]]
474+
Inherited: no
475+
Percentages: N/A
476+
Media: visual
477+
Computed value: see below
478+
Animatable: no
479+
Canonical order: <abbr title="follows order of property value definition">per grammar</abbr>
480+
</pre>
470481

471-
| ''paged-x'' | ''paged-y'' | ''paged-x-controls'' | ''paged-y-controls'' | ''fragments''
482+
Issue: Naming is preliminary.
483+
This was initially proposed as
484+
"fragmentation: auto | none | break | clone | page"
485+
in <a href="https://lists.w3.org/Archives/Public/www-style/2015Jan/0357.html">https://lists.w3.org/Archives/Public/www-style/2015Jan/0357.html</a>
472486

473-
<p class="issue">
474-
Are all 4 of the ''paged-*'' values really needed?
475-
</p>
487+
Note: ''continue: fragments'' replaces "overflow:fragments"
488+
from earlier versions of this specification,
489+
while ''continue: paginate'' replaces "overflow: paged-x | paged-y | paged-x-controls | paged-y-controls"
476490

477-
<dl>
478-
<dt><dfn>paged-x</dfn>
479-
<dt><dfn>paged-y</dfn>
480-
<dt><dfn>paged-x-controls</dfn>
481-
<dt><dfn>paged-y-controls</dfn>
491+
Issue: The definitions below are vaguely worded, and need to be more specific.
492+
493+
<dl dfn-for="continue" dfn-type="value">
494+
<dt><dfn>auto</dfn>
495+
<dd>Behavior varies between the other values, depending on contex.
496+
See the section below on computed values for details.
497+
498+
<dt><dfn>overflow</dfn>
499+
<dd>Content that doesn't fit overflows, according to the 'overflow' property
500+
501+
<dt><dfn>discard</dfn>
502+
<dd>Content that doesn't fit is discarded at a fragmentation break
503+
504+
Note: generalized from region-fragment: break; on the last region of a region chain
505+
<dt><dfn>next</dfn>
506+
<dd>Content that doesn't fit is pushed to the next region
507+
if the element is part of a region chain,
508+
or to the next page if the element is part of a page chain. If
509+
there isn't a next region or page, it overflows.
510+
511+
Note: Behavior could have been to discard
512+
but discarding anything should be a very explicit behavior
513+
514+
<dt><dfn>paginate</dfn>
515+
<dd>Content that doesn't fit paginates.
516+
This creates a paginated view inside the element
517+
similar to the way that 'overflow: scroll' creates a scrollable view.
518+
519+
Pages can be styled with @page rules.
520+
521+
Note: Print is effectively "continue: paginate" on the root.
522+
523+
See <a href="#paginated-overflow">paginated overflow</a>
482524
<dt><dfn>fragments</dfn>
483-
<dd>
484-
These values are collectively the <dfn dfn>fragmenting values</dfn>;
485-
they are defined in the sections on
486-
<a href="#paginated-overflow">paginated overflow</a> and
487-
<a href="#fragment-overflow">fragment overflow</a>.
488-
</dd>
525+
<dd>content that doesn't fit causes the element to copy itself and continue laying out.
526+
See <a href="#fragment-overflow">fragment overflow</a>.
489527
</dl>
490528

491-
<div class="issue">
492-
Having split the overflow and fragmentation properties, this issue is no longer relevant, but there are
493-
useful bits of information in the thread, so I am leaving it here for now.
494-
495-
There are <a href="http://lists.w3.org/Archives/Public/www-style/2012May/1197.html">discussions</a>
496-
about how overflow, overflow-style, overflow-x and overflow-y
497-
should work and interact with each other.
498-
Until consensus on this topic is reached,
499-
it is not completely clear which of these
500-
should be used for
501-
paged-x | paged-y | paged-x-controls | paged-y-controls | fragments
502-
</div>
529+
Issue: There is some overlap between overflow, discard and next.
530+
Only 2 of the 3 ever make sense in any situation,
531+
even though it isn't always the same two.
532+
It may be possible to reduce this to 2 values.
533+
An earlier proposal combined discard and next into break,
534+
although this had the downside of making discard a non explicit behavior.
503535

536+
Note: For background discussions leading to this property, see these threads:
537+
<a href="http://lists.w3.org/Archives/Public/www-style/2012May/1197.html">discussion of overflow, overflow-x, overflow-y and overflow-style</a> and
538+
<a href="https://lists.w3.org/Archives/Public/www-style/2015Jan/0357.html">proposal for a fragmentation property</a>
504539

505540
<h2 id="paginated-overflow">Paginated overflow</h2>
506541

507-
<p class="issue">overflow:paginate or overflow:pages (or paged-x, paged-y, paged-x-controls, paged-y-controls as [[CSS3GCPM]] has?)</p>
542+
This section introduces and defines the meaning of the ''continue/paginate'' value of the 'continue' property.
543+
544+
Issue: Write this section
508545

509-
<p class="issue">Ability to display N pages at once
510-
rather than just one page at once?</p>
546+
Issue: The initial proposal in [[CSS3GCPM]] and implemantation from Opera
547+
used 4 values instead of ''continue/paginate'':
548+
"paged-x | paged-y | paged-x-controls | paged-y-controls".
549+
Should this property also include these values,
550+
or are they better handled as separate properties?
551+
(e.g.: "pagination-layout: auto | horizontal | vertical", "pagination-controls: auto | none")
552+
553+
Issue: Ability to display N pages at once
554+
rather than just one page at once?
555+
Could this be a value of "pagination-layout", such as:
556+
"pagination-layout: horizontal 2;"
511557

512558
<p class="issue">
513559
The current implementation of paginated overflow uses
514560
the 'overflow'/'overflow-x'/'overflow-y' properties
515561
rather than the 'overflow-style' property as proposed
516562
in the [[CSS3GCPM]] draft
517563
(which also matches the [[CSS3-MARQUEE]] proposal).
518-
We should probably switch away from 'overflow-style',
519-
but that's not 100% clear.
564+
or the 'continue' property as described here.
520565
</p>
521566

522567
<h2 id="fragment-overflow">Fragment overflow</h2>
523568

524-
<p>
525-
This section introduces and defines the meaning of
526-
the new ''fragments'' value of the 'overflow' property.
527-
</p>
569+
This section introduces and defines the meaning of
570+
the ''continue/fragments'' value of the 'continue' property.
528571

529572
<p>
530-
When the computed value of 'overflow' for an element is ''fragments'',
573+
When the computed value of 'continue' for an element is ''continue/fragments'',
531574
and implementations would otherwise have created a box for the element,
532575
then implementations must create a sequence of <dfn>fragment box</dfn>es
533576
for that element.
534-
(It is possible for an element with ''overflow: fragments''
577+
(It is possible for an element with ''continue: fragments''
535578
to generate only one <a>fragment box</a>.
536-
However, if an element's computed 'overflow' is not ''fragments'',
579+
However, if an element's computed 'continue' is not ''continue/fragments'',
537580
then its box is not a <a>fragment box</a>.)
538581
Every <a>fragment box</a> is a fragmentation container,
539582
and any overflow
@@ -579,7 +622,7 @@ rather than just one page at once?</p>
579622
equal-sized cards&lt;/title&gt;
580623
&lt;style&gt;
581624
.in-cards {
582-
overflow: fragments;
625+
continue: fragments;
583626

584627
width: 13em;
585628
height: 8em;
@@ -608,7 +651,7 @@ rather than just one page at once?</p>
608651
</div>
609652

610653
<p class="issue">
611-
We should specify that ''overflow: fragments'' does not apply
654+
We should specify that ''continue: fragments'' does not apply
612655
to at least some table parts,
613656
and perhaps other elements as well.
614657
We need to determine exactly which ones.
@@ -669,11 +712,11 @@ rather than just one page at once?</p>
669712
<h4 id="style-of-fragments">Styling of fragments</h4>
670713

671714
<p class="issue">
672-
Should this apply to fragment overflow only,
673-
or also to paginated overflow?
715+
Should this apply to continue:fragments only,
716+
or also to continue:paginate?
674717
(If it applies,
675718
then stricter property restrictions would be needed
676-
for paginated overflow.)
719+
for continue:paginate.)
677720
</p>
678721

679722
<p>
@@ -704,7 +747,7 @@ rather than just one page at once?</p>
704747
<table class="source-demo-pair"><tr><td><pre>&lt;!DOCTYPE HTML&gt;
705748
&lt;style&gt;
706749
.bouncy-columns {
707-
overflow: fragments;
750+
continue: fragments;
708751
width: 6em;
709752
height: 10em;
710753
float: left;
@@ -731,19 +774,15 @@ rather than just one page at once?</p>
731774
</div>
732775

733776
<p>
734-
Styling an ''::nth-fragment()'' pseudo-element with the 'overflow'
777+
Styling an ''::nth-fragment()'' pseudo-element with the 'continue'
735778
property does take effect;
736779
if a <a>fragment box</a> has a
737-
computed value of 'overflow' other than ''fragments''
780+
computed value of 'continue' other than ''fragments''
738781
then that fragment box is the last fragment.
739-
However, overriding 'overflow' on the first fragment
782+
However, overriding 'continue' on the first fragment
740783
does not cause the <a>fragment box</a> not to exist;
741784
whether there are fragment boxes at all is determined by
742785
the computed value of overflow for the element.
743-
<span class="issue">Need to reword this to refer to the
744-
appropriate choice of 'overflow-x' or 'overflow-y',
745-
and then point to rule about the handling of the other one
746-
of 'overflow-x' or 'overflow-y'.</span>
747786
</p>
748787

749788
<p>
@@ -767,8 +806,8 @@ rather than just one page at once?</p>
767806
Specifying other values of 'display', 'position',
768807
or 'float' is permitted, but is not allowed to change
769808
the computed value of 'display-inside'.
770-
(Since 'overflow', 'overflow-x', and 'overflow-y' only
771-
apply to block containers, flex containers, and grid containers
809+
(Since 'continue' only
810+
applies to block containers, flex containers, and grid containers
772811
the computed value of 'display-inside' is always
773812
''display-inside/block'', ''display-inside/flex'', or
774813
''display-inside/grid''.
@@ -811,7 +850,7 @@ rather than just one page at once?</p>
811850
<table class="source-demo-pair"><tr><td><pre>&lt;!DOCTYPE HTML&gt;
812851
&lt;style&gt;
813852
.article {
814-
overflow: fragments;
853+
continue: fragments;
815854
}
816855
.article::nth-fragment(1) {
817856
font-size: 1.5em;
@@ -834,9 +873,8 @@ rather than just one page at once?</p>
834873
<h4 id="style-in-fragments">Styling inside fragments</h4>
835874

836875
<p class="issue">
837-
Should this apply to fragment overflow only,
838-
or also to paginated overflow,
839-
or even to pagination across pages?
876+
Should this apply to continue:fragments only,
877+
or also to continue:paginate?
840878
</p>
841879

842880
<p>
@@ -886,7 +924,7 @@ rather than just one page at once?</p>
886924
<table class="source-demo-pair"><tr><td><pre>&lt;!DOCTYPE HTML&gt;
887925
&lt;style&gt;
888926
.dark-columns {
889-
overflow: fragments;
927+
continue: fragments;
890928
width: 6em;
891929
height: 10em;
892930
float: left;
@@ -993,7 +1031,7 @@ to pagination?</p>
9931031
<table class="source-demo-pair"><tr><td><pre>&lt;!DOCTYPE HTML&gt;
9941032
&lt;style&gt;
9951033
.article {
996-
overflow: fragments;
1034+
continue: fragments;
9971035
}
9981036
.article::first-letter {
9991037
font-size: 2em;
@@ -1020,7 +1058,7 @@ to pagination?</p>
10201058

10211059
<p class="issue">
10221060
This specification should define useful behavior
1023-
for all values of 'overflow'
1061+
for all values of 'overflow' and 'continue'
10241062
in static media (such as print).
10251063
Current implementation behavior is quite poor and
10261064
produces unexpected results when authors have not considered

0 commit comments

Comments
 (0)