W3C home > Mailing lists > Public > public-css-archive@w3.org > October 2016

Re: [csswg-drafts] [css-content][css-pseudo]::before and ::after a void element

From: SelenIT via GitHub <sysbot+gh@w3.org>
Date: Fri, 21 Oct 2016 06:24:24 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-255303762-1477031062-sysbot+gh@w3.org>
Wouldn't it be useful also to define the behavior of `::before` and 
`::after` for void and (especially) replaced elements more 
specifically, with regard to the current behavior of the browsers? 
E.g., all browsers currently support these pseudo-elements for `hr` 
(and `hr::before { content: "\2727\2003\2003\2727\2003\2003\2727"; }` 
is widely used in the new design of W3C specs themselves), although 
this element [is defined as 
void](https://www.w3.org/TR/html52/syntax.html#void-elements) in HTML.
 Also, almost all browsers don't apply them to regular `img` elements,
 but do apply for broken `img`s 
(https://bitsofco.de/styling-broken-images/). Since the difference 
between regular and broken differ in their browser Shadow DOM 
structure ([at least in Blink 
browsers](http://css-live.ru/Primer/pseudos/chrome-img-shadow-dom.png)),
 maybe  the behavior of pseudo elements also could be described in 
Shadow DOM terms?

-- 
GitHub Notification of comment by SelenIT
Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/625#issuecomment-255303762 
using your GitHub account
Received on Friday, 21 October 2016 06:24:31 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:04 UTC