> ::before and ::after are basically *siblings* of the shadow host, That's not a correct sentence. ::before and ::after shouldn't be a siblings of the shadow host. I just wanted to say that #2 is the desired behavior.
On Wed, Jul 1, 2015 at 1:01 PM Hayato Ito <hay...@chromium.org> wrote: > The spec [1] also says: > > > ::before > > Represents a styleable child pseudo-element immediately before the > originating element’s actual content. > > ::after > > Represents a styleable child pseudo-element immediately before the > originating element’s actual content. > > It sounds to me that ::before and ::after are basically *siblings* of the > shadow host, instead of children. I think that should be the intended > behavior. > > [1] http://www.w3.org/TR/css-pseudo-4/#generated-content > > > > > On Wed, Jul 1, 2015 at 12:33 PM Erik Isaksen <nevra...@gmail.com> wrote: > >> #2 for sure >> >> On Tue, Jun 30, 2015, 4:52 PM Tab Atkins Jr. <jackalm...@gmail.com> >> 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 >>> >>>