Re: [css-masking] new value for 'mask-clip'


On Oct 21, 2012, at 2:20 AM, Kenneth Rohde Christiansen <kenneth.christiansen@gmail.com> wrote:

> Sounds like a valid use-case to me, but what about naming it
> descendent-box ? Isn't that more clear.

I choose 'group-box', since it describes the mechanism that we use here. We group thinks. But 'descendent-box' would be fine for me as well. Would it reflect good enough that the border box of the actual element is included as well?

Greetings,
Dirk

> 
> Kenneth
> 
> On Sat, Oct 20, 2012 at 5:03 AM, Dirk Schulze <dschulze@adobe.com> wrote:
>> Hi,
>> 
>> The 'mask-clip' property[1] takes the three boxes defined for 'background-clip'[2]: content-box, padding-box and border-box. This means that the 'mask-image' property will always clip to at least the border box element. Overflowing content will always be clipped to the border box.
>> 
>> Authors may want masking to take overflowing content into account as well.
>> 
>> #parent {
>>        mask-image: url(image.svg);
>>        width: 200px;
>>        height: 200px;
>> }
>> 
>> #content {
>>        width: 500px;
>>        height: 500px;
>> }
>> 
>> <div id="parent">
>>        <img id="content" src="image.png" width="500">
>> </div>
>> 
>> Instead of having the image clipped to the border box of the div box, authors may want to have the whole group get masked.
>> 
>> I would suggest a new keyword 'group-box'. If that keyword is used, the union of border boxes of the current element and all descendant elements get computed and used to specify the clipping area.
>> 
>> The SVG WG asked for another keyword 'filter-box'. This keyword would use the calculated filter box of an applied 'filter' property. The filter box is the affected (painted) area of an filter. The current specification of Filter Effects[3] does not define such a term yet. It must be described by Filter Effects first.
>> 
>> Any comments or suggestions?
>> 
>> Greetings,
>> Dirk
>> 
>> [1] http://dvcs.w3.org/hg/FXTF/raw-file/tip/masking/index.html#the-mask-clip

>> [2] http://www.w3.org/TR/css3-background/#the-background-clip

>> [3] https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html

> 
> 
> 
> -- 
> Kenneth Rohde Christiansen
> Senior Engineer, WebKit, Qt, EFL
> Phone  +45 4093 0598 / E-mail kenneth at webkit.org
> 
> ﹆﹆﹆

Received on Sunday, 21 October 2012 16:54:06 UTC