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

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 20 Dec 2013 13:10:32 -0800
Message-ID: <CAAWBYDDd8qw=LBvjO+KmAvB_niNdzyRKzjN6iPaKR4P_9QzrMw@mail.gmail.com>
To: Alan Stearns <stearns@adobe.com>
Cc: www-style list <www-style@w3.org>
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.

Received on Friday, 20 December 2013 21:11:24 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:17 UTC