Re: [csswg-drafts] [css-pseudo-5] ::text / ::text-node pseudoelement (#2208)

While that may be possible, pseudo-elements are currently invalid inside `:has()`, so it would need special handling.

Also note that `::text` means `*::text`, so `:has(::text)` would match elements that have some descendant element that has a text node child. As I said in https://github.com/w3c/csswg-drafts/issues/7463#issuecomment-1351712543, you probably want `:has(:> text)`.

Also note that `::text` would presumably affect white space, so it may not work as desired if you have

```html
<button>
  <svg>...</svg>
</button>
```

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Sunday, 14 May 2023 15:33:26 UTC