W3C home > Mailing lists > Public > www-style@w3.org > December 2013

Re: [css-break][css-backgrounds] Sizing backgrounds across fragments

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 13 Dec 2013 10:46:17 -0800
Message-ID: <CAAWBYDAdA0ZS7q=WUM-d50ewaC-Rhva0g3qBPOuQDuU+eM_ipw@mail.gmail.com>
To: fantasai <fantasai.lists@inkedblade.net>
Cc: "www-style@w3.org" <www-style@w3.org>
On Thu, Dec 12, 2013 at 5:00 PM, fantasai <fantasai.lists@inkedblade.net> wrote:
> I just moved the definition of 'box-decoration-break' from CSS3
> Backgrounds and Borders to CSS3 Fragmentation. I made a few minor
> editorial tweaks and added some more structural markup, but more
> importantly, during this move, I noticed a problem with the
> definition we have for handling backgrounds across varying-size
> fragments:
>
>   # If the box fragments have different widths (heights, if the
>   # fragments are joined horizontally), then each piece draws its
>   # portion of the background assuming that the whole element has
>   # the same width (height) as this piece.
>   # This ensures that right-aligned images stay aligned to the
>   # right edge, left-aligned images stay aligned to the left edge,
>   # and centered images stay centered.
>
> This works fine until you have an image whose height depends on
> the box's width. Then the variation in width creates a variation
> in vertical progress.
>
> Rossen and I decided to add
>
>   | However, if the used height (width) of an image is derived
>   | from the width of the box, then it is calculated using the
>   | widest fragment's width and maintained as a fixed size.
>
> This preserves continuity of the background across fragments.
>
> Alternate definitions would use the narrowest fragment or
> the first fragment.

I think going with first is best.  Any choice seems fairly arbitrary
and can be argued for or against depending on the situation, so might
as well stick with the simplest and stream-friendliest version.

~TJ
Received on Friday, 13 December 2013 18:47:04 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:17 UTC