Skip to content

Commit cfc2865

Browse files
committed
[css-break][css-background] Define better handling of backgrounds whose height is derived from the box's width when applied to boxes fragmented across varying-size fragmentainers.
1 parent e539307 commit cfc2865

2 files changed

Lines changed: 18 additions & 15 deletions

File tree

css-break/Overview.html

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1469,13 +1469,13 @@ <h4 id=joining-boxes><span class=secno>5.4.1. </span> Joining Boxes for
14691469
<p>If the box fragments have different widths (heights, if the fragments
14701470
are joined horizontally), then each piece draws its portion of the
14711471
background assuming that the whole element has the same width (height) as
1472-
this piece. This ensures that right-aligned images stay aligned to the
1473-
right edge, left-aligned images stay aligned to the left edge, and
1474-
centered images stay centered. <!-- ISSUE
1475-
In order to preserve continuity in the other dimension,
1476-
heights (widths) and horizontal (vertical) positions of the images
1477-
are not recalculated despite any intrinsic aspect ratio relations.
1478-
-->
1472+
this piece. However, if the used height (width) of an image is derived
1473+
from the width (height) of the box, then it is calculated using the widest
1474+
fragment's width and maintained as a fixed size. This ensures that
1475+
right-aligned images stay aligned to the right edge, left-aligned images
1476+
stay aligned to the left edge, centered images stay centered, and
1477+
stretched images cover the background area as intended while preserving
1478+
continuity across fragments.
14791479

14801480
<h3 id=transforms><span class=secno>5.5. </span> Transforms, Positioning,
14811481
and Pagination</h3>
@@ -1681,7 +1681,9 @@ <h2 class=no-num id=changes> Changes</h2>
16811681
<ul>
16821682
<li>Added definition of ‘<a href="#box-decoration-break"><code
16831683
class=property>box-decoration-break</code></a>’ (moved from <a
1684-
href="#ref-CSS3BG" rel=biblioentry>[CSS3BG]<!--{{CSS3BG}}--></a>).
1684+
href="#ref-CSS3BG" rel=biblioentry>[CSS3BG]<!--{{CSS3BG}}--></a>) and
1685+
defined better handling of aspect-ratio-sized images in variable-sized
1686+
fragments.
16851687

16861688
<li>Added ‘<code class=css>any</code>’ value to ‘<a
16871689
href="#break-before"><code class=property>break-before</code></a>’ and

css-break/Overview.src.html

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,14 +1170,14 @@ <h4 id="joining-boxes">
11701170
(heights, if the fragments are joined horizontally),
11711171
then each piece draws its portion of the background
11721172
assuming that the whole element has the same width (height) as this piece.
1173+
However, if the used height (width) of an image is derived from the width (height) of the box,
1174+
then it is calculated using the widest fragment's width
1175+
and maintained as a fixed size.
11731176
This ensures that right-aligned images stay aligned to the right edge,
11741177
left-aligned images stay aligned to the left edge,
1175-
and centered images stay centered.
1176-
<!-- ISSUE
1177-
In order to preserve continuity in the other dimension,
1178-
heights (widths) and horizontal (vertical) positions of the images
1179-
are not recalculated despite any intrinsic aspect ratio relations.
1180-
-->
1178+
centered images stay centered,
1179+
and stretched images cover the background area as intended
1180+
while preserving continuity across fragments.
11811181

11821182
<h3 id="transforms">
11831183
Transforms, Positioning, and Pagination</h3>
@@ -1372,7 +1372,8 @@ <h2 class="no-num" id="changes">
13721372
<a href="http://www.w3.org/TR/2012/WD-css3-break-20120823/">29 August 2012 Working Draft</a>:
13731373

13741374
<ul>
1375-
<li>Added definition of 'box-decoration-break' (moved from [[CSS3BG]]).
1375+
<li>Added definition of 'box-decoration-break' (moved from [[CSS3BG]])
1376+
and defined better handling of aspect-ratio-sized images in variable-sized fragments.
13761377
<li>Added ''any'' value to 'break-before' and 'break-after'.
13771378
<li>Defined that boxes <a href="#box-splitting">extend to the bottom of the page</a> when broken.
13781379
<li>Defined breaking of <a href="#transforms">transformed/positioned content</a>.

0 commit comments

Comments
 (0)