Re: [csswg-drafts] Remove the "content" requirement for ::before and ::after? [css-pseudo] (#3419)

Hm, but wouldn't the fact that the CSS says there is a `::before` or `::after` allow whichever DOM engine is being used to just build one "as needed", in exactly the same way as they're doing right now when they see those properties in combination with `content`?

After all, with the `content` property currently required, there is a one-to-one mapping: whether the engine checks for "pseudo-selector + `content` property" or just "pseudo-selector", the result is the same: given that no pseudo-element gets built without `content` right now anyway, ignoring the property and just looking at `::before` and `::after` yields the same functionality with the same number of pseudo-elements created?

(I would be incredibly surprised if there is production CSS out there that uses `:before` and `:after` without a content property, and then doing something like using JS to toggle that property value by manipulating either the stylesheet's textContent, or by direcetly manipulating the associated CSSRule object, and not know full well that's a super bad hack)

-- 
GitHub Notification of comment by Pomax
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3419#issuecomment-446031204 using your GitHub account

Received on Tuesday, 11 December 2018 00:51:00 UTC