Re: [csswg-drafts] [css-content] content: contents will not be compatible. (#4632)

We got the `content: contents` value working last week, and it wasn't immediately obvious what it was useful for, even as we were implementing it. The best I came up with was when either the ::before or ::after pseudo-element need to act as a _content-replacement_ rather than a _content-list_, but you still need to generate content around the element itself.

The distinction between `content-replacement` and `content-list` remains important, as discussed in

Here's a slightly contrived example of how the `contents` value might be useful, and so (in my opinion) worth keeping:

a.external {
    content: none;
a.external::before {
    content: "(" contents ")";
a.external::after {
    content: url(;
    height: 1em;

See <a class="external" href=""></a> for detail
See (![image](


I also think removing `content: contents` would make your proposed [::contents]( pseudo-element a bit less useful, @Loirooriol.

GitHub Notification of comment by faceless2
Please view or discuss this issue at using your GitHub account

Received on Friday, 27 December 2019 12:36:36 UTC