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

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