Re: [csswg-drafts] [css-pseudo] Add a ::contents pseudo-element

The old CSS 3 Content was killed with fire and allowed the creation of pseudo-elements *outside* the element, which is not consistent with `::before` and `::after` and is less useful.

I had seen the `::wrap` proposal in #588. Frankly, I believe it's completely unrealistic. It seems amazing at first glance, but it allows aberrations like

```css
#parent > :nth-child(1)::wrap(2), /* wrapper #1 */
#parent > :nth-child(2)::wrap(2)  /* wrapper #2 */
{border: thick solid lime}
```

```html
<div id="parent">
  <div>1</div> <!-- belongs to wrapper #1 -->
  <div>2</div> <!-- belongs to wrappers #1 and #2 -->
  <div>3</div> <!-- belongs to wrapper #2 -->
</div>
```

So the result is not really a tree! I prefer to avoid this can of worms.

But I believe my `::contents` is completely feasible.

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

Received on Wednesday, 7 March 2018 00:45:48 UTC