W3C home > Mailing lists > Public > www-style@w3.org > August 2014

Re: [css-images][selectors][css21] ::before and ::after on replaced elements

From: Boris Zbarsky <bzbarsky@mit.edu>
Date: Mon, 25 Aug 2014 14:16:28 -0400
Message-ID: <53FB7D7C.6000802@mit.edu>
To: www-style@w3.org
On 8/25/14, 1:57 PM, Brad Kemper wrote:
> Can we just say that ::before and ::after do not apply to elements that cannot have children in the markup language?

The thing is, for non-replaced elements such children can in fact still 
be rendered.  You just can't add them via the parser.

> That would also include BR, HR, LINK, etc. that are not replaced elements.

<br> and <hr> are replaced elements in terms of their behavior in UAs.

For <link>, http://jsfiddle.net/c165xyyz/ shows that UAs will render its 
kids just fine, since as you say it's not replaced...  Special-casing it 
to render DOM kids but not :before/:after is pretty weird.

-Boris
Received on Monday, 25 August 2014 18:16:57 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:45 UTC