Skip to content

Commit b04dbb8

Browse files
committed
Add other option for float continuation handling.
1 parent 8e1259e commit b04dbb8

2 files changed

Lines changed: 140 additions & 32 deletions

File tree

css3-break/Overview.html

Lines changed: 82 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717

1818
<h1 id=css-fragmentation-module>CSS Fragmentation Controls Module Level 3</h1>
1919

20-
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 25 January
20+
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 26 January
2121
2012</h2>
2222

2323
<dl>
2424
<dt>This version:
2525

2626
<dd><a
27-
href="http://www.w3.org/TR/2012/ED-css3-break-20120125/">http://www.w3.org/csswg/css3-break/</a>
27+
href="http://www.w3.org/TR/2012/ED-css3-break-20120126/">http://www.w3.org/csswg/css3-break/</a>
2828

2929
<dt>Latest version:
3030

@@ -718,6 +718,14 @@ <h3 id=possible-breaks><span class=secno>4.1. </span> Possible Break Points</h3>
718718
the page, and not all the content fits, the UA may break anywhere in order
719719
to avoid losing content off the edge of the page.
720720

721+
<p> The UA is not required to fragment the scrollable contents of elements
722+
with &lsquo;<code class=property>overflow</code>&rsquo; set to
723+
&lsquo;<code class=css>auto</code>&rsquo; or &lsquo;<code
724+
class=css>scroll</code>&rsquo; and may instead graphically slice their
725+
contents as necessary to fragment the element. In such cases it must treat
726+
the element as having &lsquo;<code class=css>break-inside:
727+
avoid</code>&rsquo;.
728+
721729
<h3 id=break-types><span class=secno>4.2. </span> Types of Breaks</h3>
722730

723731
<p> There are different types of breaks in CSS, defined based on the type
@@ -905,6 +913,10 @@ <h3 id=breaking-boxes><span class=secno>4.6. </span> Box Model for Breaking</h3>
905913
<p> When a flow is fragmented into varying-size fragmenters, the following
906914
rules are observed for adapting layout:
907915

916+
<p class=note> The sizing terminology used in this section is defined in
917+
Appendix D of <a href="#CSS3-WRITING-MODES"
918+
rel=biblioentry>[CSS3-WRITING-MODES]<!--{{CSS3-WRITING-MODES}}--></a>.
919+
908920
<ul>
909921
<li> Intrinsic sizes are calculated and maintained across the entire
910922
element. Where an initial containing block size is needed, assume an
@@ -916,14 +928,27 @@ <h3 id=breaking-boxes><span class=secno>4.6. </span> Box Model for Breaking</h3>
916928
positions using its own size as if the entire element were fragmented
917929
across fragmenters of this size. Progress is measured in percentages (not
918930
absolute lengths) of used/available space and in amount of used/remaining
919-
content.
920-
921-
<li> Fragments of boxes that began on a previous fragmenter must start at
922-
the top of the new fragmenter. If this results in multiple floats
923-
side-by-side that would otherwise be staggered (if they were not
924-
continuations) in order to fit, the floats' widths are reduced (on that
925-
fragmenter only) in proportion to their original widths until they fit.
926-
However they are not reduced past their min-content width.
931+
content. However, when laying out scrollable elements and certain
932+
replaced elements the UA may instead maintain a consistent measure and
933+
resolved extent across fragmenters.
934+
935+
<li><strong class=issue>Option A:</strong> Fragments of boxes that began
936+
on a previous fragmenter must start at the top of the new fragmenter. If
937+
this results in multiple floats side-by-side that would otherwise be
938+
staggered (if they were not continuations) in order to fit, the floats'
939+
widths are reduced (on that fragmenter only) in proportion to their
940+
original widths until they fit. However they are not reduced past their
941+
min-content width.
942+
943+
<li><strong class=issue>Option B:</strong> Fragments of boxes that began
944+
on a previous fragmenter must obey placement rules with the additional
945+
constraint that fragments must not be positioned above the before edge of
946+
the fragmenter and must otherwise be placed as high as possible while not
947+
violating other constraints. If this results in a float's continuation
948+
fragment shifting away from the before edge of the fragmenter, then
949+
&lsquo;<code class=css>box-decoration-break: clone</code>&rsquo;, if
950+
specified, wraps the fragment with the box's margin in addition to its
951+
padding and border.
927952
</ul>
928953

929954
<p>Below are listed some implications of these rules:
@@ -937,16 +962,33 @@ <h3 id=breaking-boxes><span class=secno>4.6. </span> Box Model for Breaking</h3>
937962
<i>min-content</i>, <i>max-content</i>, or absolute-length size will
938963
maintain their measure across pages.
939964

940-
<li> Opposite-side side-by-side floats might overlap if, e.g. both begin
941-
on a wide page, but their min-content measures taken together are too
942-
wide to fit on a later, narrower page. (Auto-sized floats will not
943-
overlap if only their max-content measures are too wide, since the
944-
shrink-wrap algorithm will give them narrower measures due to the
945-
narrower available measure.)
946-
947-
<li> Same-side side-by-side floats might overflow their containing block
948-
if, e.g. both begin on a wide page, but their min-content measures taken
949-
together are too wide to fit on a later, narrower page.
965+
<li><strong class=issue>Option A:</strong> Opposite-side side-by-side
966+
floats might overlap if, e.g. both begin on a wide page, but their
967+
min-content measures taken together are too wide to fit on a later,
968+
narrower page. (Auto-sized floats will not overlap if only their
969+
max-content measures are too wide, since the shrink-wrap algorithm will
970+
give them narrower measures due to the narrower available measure.)
971+
972+
<li><strong class=issue>Option A:</strong> Same-side side-by-side floats
973+
might overflow their containing block if, e.g. both begin on a wide page,
974+
but their min-content measures taken together are too wide to fit on a
975+
later, narrower page.
976+
977+
<li><strong class=issue>Option B:</strong> Float continuation fragments
978+
may be placed below the top of the page if, e.g. multiple floats continue
979+
onto a new page that is narrower than the previous page and their
980+
(recalculated) widths together are wider than their containing block.
981+
982+
<li><strong class=issue>Option B:</strong> A block-level continuation
983+
fragment may be placed below the top of the page if, e.g. it establishes
984+
a block formatting context root that is placed beside a float and both
985+
continue onto a narrower page that is too narrow to hold both of them
986+
side-by-side.
987+
988+
<li><strong class=issue>Option B:</strong> Content adjacent to a preceding
989+
float on one page may wind up above the float on the next page if, e.g.
990+
that float is pushed down because it no longer fits side-by-side with an
991+
earlier float that also continues to this narrower page.
950992
</ul>
951993

952994
<div class=example>
@@ -984,11 +1026,16 @@ <h3 id=breaking-boxes><span class=secno>4.6. </span> Box Model for Breaking</h3>
9841026
before the break are truncated, but margins after the break are preserved.
9851027

9861028

987-
<p> When a break splits a box, the box's bottom margins, borders, and
988-
padding have no visual effect where the split occurs; the box's background
989-
and left and right margins, border, and padding extend to the bottom of
990-
the page, through an ensuing blank page if one exists, and onto the top of
991-
the subsequent page.
1029+
<p> When a break splits a box, the &lsquo;<code
1030+
class=property>box-decoration-break</code>&rsquo; property controls
1031+
whether the box's margins, borders, and padding wrap the fragment effect
1032+
where the split occurs. If they do not (i.e. &lsquo;<code
1033+
class=css>slice</code>&rsquo; is specified), the box's background and side
1034+
margins, border, and padding extend from the effective break point to the
1035+
end of the fragmenter (and across the ensuing blank fragmenter if one is
1036+
generated due to &lsquo;<code class=css>left</code>&rsquo; or &lsquo;<code
1037+
class=css>right</code>&rsquo; breaking). <span class=issue>Does this use
1038+
up height?</span>
9921039

9931040
<h2 id=conformance><span class=secno>5. </span> Conformance</h2>
9941041

@@ -1237,6 +1284,16 @@ <h3 class=no-num id=other-references>Other references</h3>
12371284
<dt style="display: none"><!-- keeps the doc valid if the DL is empty -->
12381285
<!---->
12391286

1287+
<dt id=CSS3-WRITING-MODES>[CSS3-WRITING-MODES]
1288+
1289+
<dd>Elika J. Etemad; Koji Ishii; Shinyu Murakami. <a
1290+
href="http://www.w3.org/TR/2011/WD-css3-writing-modes-20110901/"><cite>CSS
1291+
Writing Modes Module Level 3.</cite></a> 1 September 2011. W3C Working
1292+
Draft. (Work in progress.) URL: <a
1293+
href="http://www.w3.org/TR/2011/WD-css3-writing-modes-20110901/">http://www.w3.org/TR/2011/WD-css3-writing-modes-20110901/</a>
1294+
</dd>
1295+
<!---->
1296+
12401297
<dt id=CSS3COLOR>[CSS3COLOR]
12411298

12421299
<dd>Tantek &#199;elik; Chris Lilley; L. David Baron. <a

css3-break/Overview.src.html

Lines changed: 58 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,12 @@ <h3 id="possible-breaks">
500500
of the page, and not all the content fits, the UA may break anywhere
501501
in order to avoid losing content off the edge of the page.
502502
</p>
503+
<p>
504+
The UA is not required to fragment the scrollable contents of elements
505+
with 'overflow' set to ''auto'' or ''scroll'' and may instead graphically
506+
slice their contents as necessary to fragment the element. In such cases
507+
it must treat the element as having ''break-inside: avoid''.
508+
</p>
503509

504510
<h3 id="break-types">
505511
Types of Breaks</h3>
@@ -681,26 +687,46 @@ <h3 id="breaking-boxes">
681687
When a flow is fragmented into varying-size fragmenters, the following
682688
rules are observed for adapting layout:
683689
</p>
690+
<p class="note">
691+
The sizing terminology used in this section is defined in Appendix D of
692+
[[CSS3-WRITING-MODES]].
693+
</p>
684694
<ul>
685695
<li>
686696
Intrinsic sizes are calculated and maintained across the entire element.
687697
Where an initial containing block size is needed, assume an initial
688698
containing block using the page's size of the first fragment's page.
699+
</li>
689700
<li>
690701
Layout is performed per-fragmenter, with each fragmenter continuing
691702
progress from the breakpoint on the previous, but recalculating sizes
692703
and positions using its own size as if the entire element were fragmented
693704
across fragmenters of this size. Progress is measured in percentages
694705
(not absolute lengths) of used/available space and in amount of
695706
used/remaining content.
696-
<li>
707+
However, when laying out scrollable elements and certain replaced
708+
elements the UA may instead maintain a consistent measure and resolved
709+
extent across fragmenters.
710+
</li>
711+
<li><strong class="issue">Option A:</strong>
697712
Fragments of boxes that began on a previous fragmenter must start at
698713
the top of the new fragmenter.
699714
If this results in multiple floats side-by-side that would otherwise
700715
be staggered (if they were not continuations) in order to fit, the
701716
floats' widths are reduced (on that fragmenter only) in proportion to
702717
their original widths until they fit. However they are not reduced
703718
past their min-content width.
719+
</li>
720+
<li><strong class="issue">Option B:</strong>
721+
Fragments of boxes that began on a previous fragmenter must obey
722+
placement rules with the additional constraint that fragments must
723+
not be positioned above the before edge of the fragmenter and must
724+
otherwise be placed as high as possible while not violating other
725+
constraints. If this results in a float's continuation fragment
726+
shifting away from the before edge of the fragmenter, then
727+
''box-decoration-break: clone'', if specified, wraps the fragment
728+
with the box's margin in addition to its padding and border.
729+
</li>
704730
</ul>
705731

706732
<p>Below are listed some implications of these rules:</p>
@@ -709,21 +735,43 @@ <h3 id="breaking-boxes">
709735
Boxes (including tables) fullfilling layout constraints at their
710736
<i>fill-available</i> or percentage-based size may change measure
711737
across pages.
738+
</li>
712739
<li>
713740
Boxes (including tables) fulfilling layout constraints at their
714741
<i>min-content</i>, <i>max-content</i>, or absolute-length size
715742
will maintain their measure across pages.
716-
<li>
743+
</li>
744+
<li><strong class="issue">Option A:</strong>
717745
Opposite-side side-by-side floats might overlap if, e.g. both begin
718746
on a wide page, but their min-content measures taken together are
719747
too wide to fit on a later, narrower page. (Auto-sized floats will
720748
not overlap if only their max-content measures are too wide, since
721749
the shrink-wrap algorithm will give them narrower measures due to the
722750
narrower available measure.)
723-
<li>
751+
</li>
752+
<li><strong class="issue">Option A:</strong>
724753
Same-side side-by-side floats might overflow their containing block
725754
if, e.g. both begin on a wide page, but their min-content measures
726755
taken together are too wide to fit on a later, narrower page.
756+
</li>
757+
<li><strong class="issue">Option B:</strong>
758+
Float continuation fragments may be placed below the top of the
759+
page if, e.g. multiple floats continue onto a new page that is
760+
narrower than the previous page and their (recalculated) widths
761+
together are wider than their containing block.
762+
</li>
763+
<li><strong class="issue">Option B:</strong>
764+
A block-level continuation fragment may be placed below the top of
765+
the page if, e.g. it establishes a block formatting context root
766+
that is placed beside a float and both continue onto a narrower page
767+
that is too narrow to hold both of them side-by-side.
768+
</li>
769+
<li><strong class="issue">Option B:</strong>
770+
Content adjacent to a preceding float on one page may wind up above
771+
the float on the next page if, e.g. that float is pushed down because
772+
it no longer fits side-by-side with an earlier float that also
773+
continues to this narrower page.
774+
</li>
727775
</ul>
728776

729777
<div class="example">
@@ -759,10 +807,13 @@ <h3 id="breaking-boxes">
759807
</p>
760808

761809
<p>
762-
When a break splits a box, the box's bottom margins, borders, and padding have
763-
no visual effect where the split occurs; the box's background and left and right
764-
margins, border, and padding extend to the bottom of the page, through an ensuing
765-
blank page if one exists, and onto the top of the subsequent page.
810+
When a break splits a box, the 'box-decoration-break' property controls
811+
whether the box's margins, borders, and padding wrap the fragment effect
812+
where the split occurs. If they do not (i.e. ''slice'' is specified),
813+
the box's background and side margins, border, and padding extend from
814+
the effective break point to the end of the fragmenter (and across the
815+
ensuing blank fragmenter if one is generated due to ''left'' or ''right''
816+
breaking). <span class="issue">Does this use up height?</span>
766817
</p>
767818

768819
<h2 id="conformance">

0 commit comments

Comments
 (0)