Re: [csswg-drafts] [css-selectors-4] ::text / ::text-node pseudoelement

I'm definitely supportive of the idea in general.

A more detailed proposal with examples would probably be helpful in gaining more supporters, so if you're already working on something @js-choi, please don't stop just because this has now been formally raised as a working group issues. 

Some things to think of:

- An anonymous block is different from a text node, since it can include inline elements. (In your code snippet, the text nodes that are direct children of the body would be "This is the" and "block in this example.") If there are use-cases for both, then maybe there needs to be more than one selector.
- Woule a pseudoelement selector only select direct-child text nodes for the element it is attached to, or any descendent text nodes?
- Whitespace-only text nodes are treated differently than content nodes in CSS layout, so would probably need to be distinguished.

Which are all probably good prompts for a WICG discussion if you want to start one.

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

Received on Friday, 19 January 2018 17:47:20 UTC