W3C home > Mailing lists > Public > www-style@w3.org > April 2011

Re: The Unwanted Effect of XBL Shadow DOM Elements on Layout

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 7 Apr 2011 08:43:18 -0700
Message-ID: <BANLkTikNJmjZD2pd8+tHCx9=_xjnJBVcpQ@mail.gmail.com>
To: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Cc: www-style <www-style@w3.org>
On Thu, Apr 7, 2011 at 7:52 AM, Lachlan Hunt <lachlan.hunt@lachy.id.au> wrote:
> This extra line box interferes with the table layout algorithm, which makes
> the second cell end up with its own independent table and table-row layout
> boxes around it.  This is undesirable.
>
> It seems that with bindings, this is likely to be a common scenario, where
> it would be useful to eliminate the effect of unwanted layout boxes from a
> binding.
>
> For this, one solution we came up with was a new value for 'display' that
> means to not generate a layout box for the element, but to still render the
> child content within as if the element itself wasn't there.
>
>  display: transparent;
>
> Such a value would mean the shadow element could be toggled between 'none'
> and 'transparent', and thus not have any unwanted side effects on the
> layout.

+1.  We have also run into this problem in our discussion of
XBL2/Component use-cases, and in fact already use essentially this
concept in our Component implementation - the root of a shadow tree is
implemented as an element, but it doesn't appear in the box tree.

~TJ
Received on Thursday, 7 April 2011 15:44:05 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:39 GMT