Re: [csswg-drafts] [css-pseudo] Add a ::contents pseudo-element (#2406)

> I think it might be a lot easier if the descendants don't inherit from ::contents

It has happened multiple times that I wanted to style the contents of an element, but excluding ::before and ::after. I was trying to cover this usecase.

I guess what you are proposing is that children elements in the DOM would remain being children in the element tree, they would just generate boxes inside ::contents.

I agree this makes inheritance simpler, but seems less useful and it's not clear where ::contents would fit in the element tree. Between ::before and the first child? Between the last child and ::after?

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

Received on Saturday, 1 February 2020 12:28:19 UTC