[csswg-drafts] [css-content] `content` property on elements

upsuper has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-content] `content` property on elements ==
The spec seems to be conflicting with itself at the moment for what should happen with `content` property on elements (rather than pseudo-elements).

The description of `content` property states
> For elements, it has only one purpose: specifying that the element renders as normal, or replacing the element with an image (and possibly some associated "alt text").

which indicates that only `normal` and `<content-replacement>` value are meaningful for elements, and all other values are for pseudo-elements.

However, the description of `none` value mentions elements apart from pseudo-elements, which indicates that it should have meaning on elements (while it isn't clear what it should really do either, see w3c/csswg-drafts#2637). The description of `<content-list>` solely uses "the element" to refer, which is same as the wording in `<content-replacement>`, so it sounds like they should apply to the same set of stuff (i.e. both elements and pseudo-elements)?

WebKit and Blink currently implement `<content-replacement>` for `content` on elements, and nothing else, which kinda matches the first statement quoted above.

Maybe we should change the text and have values other than `<content-replacement>` compute to `normal` for element (which seems to be what WebKit and Blink currently do), and delay other stuff into probably the next level.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2656 using your GitHub account

Received on Tuesday, 8 May 2018 01:44:06 UTC