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

Re: [css-masking] reference boxes

From: Dirk Schulze <dschulze@adobe.com>
Date: Tue, 17 Dec 2013 12:24:12 +0000
To: fantasai <fantasai.lists@inkedblade.net>
CC: www-style list <www-style@w3.org>
Message-ID: <4E8BA873-9FC4-4758-8D6B-937BE2D04E7C@adobe.com>

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:


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

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:38 UTC