Re: [css3-background] background-attachment: local

Le Mer 22 mai 2013 12:53, fantasai a écrit :
> On 05/22/2013 12:27 PM, fantasai wrote:
>> We were looking implementing 'background-attachment: local' in Gecko,
>> and
>> ran across the following problem in its definition:
>>
>> The goal of 'background-attachment: local' is to allow authors to get
>> the behavior of 'background-attachment: scroll' on the canvas background
>> when setting the background of an element with 'overflow: scroll'. IMHO
>> this should have been the behavior of 'background-attachment: scroll'
>> in the first place, but the WG at the time decided it should behave like
>> 'fixed' on such elements; therefore we added a new keyword, 'local', in
>> level 3.
>>
>> The spec defines this for the background's "attachment", but it doesn't
>> for its positioning. Case to consider: a background image positioned to
>> the bottom right corner. In the case of 'background-attachment: scroll'
>> on the canvas, it is at the bottom of the scrollable area, not the
>> bottom
>> of the viewport. Similarly, 'background-attachment: local' should put
>> such an image at the bottom of the scrollable area, not the bottom of
>> the viewport. However, the spec doesn't specify this, so would need to
>> be amended to fix that.
>
> Here's a diagram:
>
> +------------------------------------+
> |+---------------------------------+A|
> ||                                 | |
> ||                                 | |
> ||                                 | |
> ||                                 | |
> ||                                 | |
> ||                                 | |
> ||                         +------+| |
> ||                         |+++++ || |  <-- bottom right of scrolling box
> ||                         |+image|| |
> ||                         +------+|V|
> +|---------------------------------|-+
>   |                                 |
>   |                                 |
>   |                                 |
>   |                                 |
>   |                                 |
>   |                                 |
>   |                                 |
>   |                                 |
>   |                                 |
>   |                                 |
>   |                         +------+|
>   |                         |+++++ ||
>   |                         |+image||  <-- bottom right of scrolled
> content
>   |                         +------+|
>   +---------------------------------+
>
> ~fantasai


Interactive test on 'background-attachment': 'local' versus 'scroll' values
http://www.gtalbot.org/BrowserBugsSection/CSS3Backgrounds/background-attachment-345.xht

Gérard
-- 
CSS 2.1 Test suite RC6, March 23rd 2011
http://test.csswg.org/suites/css2.1/20110323/html4/toc.html

Contributions to CSS 2.1 test suite
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/

Web authors' contributions to CSS 2.1 test suite
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/web-authors-contributions-css21-testsuite.html

Received on Wednesday, 22 May 2013 18:28:46 UTC