Re: [css-shapes][css-masking] <box>, <box+> and <box++>

On Dec 20, 2013, at 10:10 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:

> On Fri, Dec 20, 2013 at 11:13 AM, Alan Stearns <stearns@adobe.com> wrote:
>> The <box> value is defined in CSS Backgrounds and Borders [1] to have
>> three possible values (border-box, padding-box and content-box) for the
>> background-clip property.
>> 
>> I’m adding margin-box to the <box> values in CSS Shapes [2]. This value is
>> useful in shape-outside, but not useful for background-clip.
>> 
>> Dirk just added bounding-box (as a separate value) to clip-path [3]. That
>> value makes sense for that property, but isn’t terribly useful for
>> shape-outside or background-clip. Should bounding-box be added to <box> in
>> CSS Masking, or stay separate?
>> 
>> Is there any issue with my adding margin-box to the <box> production when
>> that value isn’t useful for background-clip? Is there anything special I
>> should be doing with the <box> definition in CSS Shapes to reference the
>> definition in CSS Backgrounds and Borders?
> 
> Hm, we can't just expand <box>.  margin-box doesn't work if the
> element has collapsible margins (which shape-outside prevents, I
> think?).  bounding-box does, but as you note, it's not really useful
> for shapes or background-clip.  Plus, box-sizing basically uses <box>,
> it just hasnt' been updated to actually use that grammar nonterminal
> and instead lists the values explicitly.
> 
> I think the best solution is to just use <box> and manually add the
> extra values you need in each situation.  If it's more convenient,
> define a subterm like "<shape-box> = <box> | margin-box;", etc.

For what it’s worth, I thought about supporting all boxes from shape-outside on clip-path as well (including margin-box). I think it would be good to define <shape-box>.

Greetings,
Dirk

> 
> ~TJ
> 

Received on Sunday, 22 December 2013 12:28:16 UTC