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

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:
> 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 

>     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.

Simon Sapin

Received on Wednesday, 19 June 2013 10:17:37 UTC