W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2015

Re: [shadow-dom] ::before/after on shadow hosts

From: Olli Pettay <olli@pettay.fi>
Date: Wed, 1 Jul 2015 02:59:03 +0300
To: "Tab Atkins Jr." <jackalmage@gmail.com>, public-webapps <public-webapps@w3.org>
Message-ID: <55932D47.9040000@pettay.fi>
On 07/01/2015 02:48 AM, Tab Atkins Jr. wrote:
> I was recently pointed to this StackOverflow thread
> <http://stackoverflow.com/questions/31094454/does-the-shadow-dom-replace-before-and-after/>
> which asks what happens to ::before and ::after on shadow hosts, as
> it's not clear from the specs.  I had to admit that I hadn't thought
> of this corner-case, and it wasn't clear what the answer was!
>
> In particular, there seem to be two reasonable options:
>
> 1. ::before and ::after are *basically* children of the host element,
> so they get suppressed when the shadow contents are displayed
>
> 2. ::before and ::after aren't *really* children of the host element,
> so they still show up before/after the shadow contents.
>
> According to the SO thread (I haven't tested this myself), Firefox and
> Chrome both settled on #2.  I'm fine to spec this in the Scoping
> module, I just wanted to be sure this was the answer we wanted.
>
> ~TJ
>


Just after reading the first paragraph and without knowing what the implementations do
in this case I thought #2 would be the most obvious behavior to have.


-Olli
Received on Tuesday, 30 June 2015 23:59:38 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:27:32 UTC