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

Re: [css-backgrounds] Painting area and 'background-attachment: local'

From: Simon Sapin <simon.sapin@exyr.org>
Date: Wed, 19 Jun 2013 11:17:16 +0100
Message-ID: <51C1852C.1080904@exyr.org>
To: www-style@w3.org
CC: fantasai <fantasai.lists@inkedblade.net>, Robert O'Callahan <robert@ocallahan.org>
Le 14/06/2013 16:57, Simon Sapin a écrit :
> So, we recently decided that with 'background-attachment: local', the
> background positioning area is based on the "inner" scrolled content,
> not the "outer" box:
>
> http://lists.w3.org/Archives/Public/www-style/2013May/0516.html
> http://lists.w3.org/Archives/Public/www-style/2013May/0783.html
>
> What about the background *painting*  area? I think it should be the
> same. Specifically:
>
>
>     When 'background-attachment' is 'local' for a given background layer:

To clarify, there are two things here.


>     1. Both the positioning and painting area are based on the scrolled
> content. (The difference between padding-box and border-box includes any
> non-overlay scrollbars in addition to borders.)

This is the part I find more important. In particular, the portion of 
the image that is clipped by 'background-clip: content-box' compared to 
'padding-box' can scroll out of view

As an example, these two document should behave roughly the same when 
scrolling:

http://lists.w3.org/Archives/Public/www-archive/2013Jun/att-0075/background-attachment-local-painting-area-test.html
http://lists.w3.org/Archives/Public/www-archive/2013Jun/att-0075/background-attachment-local-painting-area-ref.html


>     2. Values of 'overflow' other than 'visible' also affect the
> background layer: the background layer is only visible at the
> intersection of the painting area and the "outer" padding area.
>
>     Note: This means that 'background-clip: border-box' is
> indistinguishable from 'padding-box'.

This part I’m not too attached to.

'overflow' need to clip at least at the "outer" (w.r.t. scrolling) 
border-box, otherwise you get background images painted completely 
overflowing the box this is not supposed to overflow. I just think it 
makes more sense to clip at the outer padding-box, like the rest of the 
scrolled content.

Note that given the first part, this is *not* the same as replacing 
'background-clip: border-box' with 'padding-box', since the 
inner/scrolled padding-box can intersect with the border.

Cheers,
-- 
Simon Sapin
Received on Wednesday, 19 June 2013 10:17:37 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 19 June 2013 10:17:37 UTC