Re: [css-masking] reference boxes

On Dec 17, 2013, at 6:37 AM, fantasai <fantasai.lists@inkedblade.net> wrote:

> On 12/16/2013 09:23 PM, Rik Cabanier wrote:
>> fantasai wrote:
>> > I think the border-box should be the default here, and you use
>> > 120% etc. to get more than that.
>> 
>> 
>> Why not have the same as for backgrounds? Is there a reason to have a different one?
> 
> Yes. Usually for clipping, you think about the border area as part
> of the thing you're clipping. This also matches up to Shapes, which
> defaults to the border-box.

Short summary of the latest changes regarding reference boxes after the discussion on this thread.

* I removed the sentence stating that the mask painting area is limited to the bounding client rect on mask-clip: no-clip
* I added the keyword bounding-box to mask-origin. The keyword references the bounding client rect
* I changed the definition of bounding client rect to:
“”The object bounding box for elements in the http://www.w3.org/2000/svgnamespace and without an associated CSS layout box. The smallest rectangle that contains the border box of the element and the border boxes of all its descendants otherwise. (See getBoundingClientRect [CSSOM-VIEW].)”"
* I added an optional <box> value and bounding-box keyword to clip-path so that authors can choose the reference box. The syntax now looks like:
<clip-source> | [ <basic-shape> || <box> | bounding-box ] | none
* The default reference box for basic shapes on clip-path is border-box
* I defined how container breaks affect masking and clipping for each of the source referencing properties.

I believe these changes fix:
http://dev.w3.org/fxtf/masking/issues-lc-2013.html#issue-4
http://dev.w3.org/fxtf/masking/issues-lc-2013.html#issue-5
http://dev.w3.org/fxtf/masking/issues-lc-2013.html#issue-6
http://dev.w3.org/fxtf/masking/issues-lc-2013.html#issue-26

Greetings,
Dirk


> 
>> In my mind, clipping and masking have the same initial area as the background.
>> http://dev.w3.org/csswg/css-backgrounds/#background-clip
> 
> I would like clipping and masking to have the same initial area.
> I'm not really convinced it should match the initial background
> origin.
> 
>> CSS masking and clipping should follow how backgrounds are fragmented
>> when you use 'slice':
>> http://dev.w3.org/csswg/css-break/#box-splitting
>> I can't see any reason to ever allow 'clone'
> 
> Your logic here works for me.
> 
> ~fantasai
> 

Received on Tuesday, 17 December 2013 12:24:58 UTC