- From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
- Date: Mon, 14 Mar 2022 21:08:14 +0000
- To: public-css-archive@w3.org
This is, unfortunately, impossible. The ::highlight pseudos, like other non-tree-abiding pseudos, restrict what properties can be used for styling with them, limiting themselves to a small list whose effects do not accidentally expose the exact node structure created by the pseudo-element. In other words, if you have some text like `"<em>emphasized</em> text bar"`, and you highlight the text "emphasized", we don't expose whether the pseudo-element acts like it had generated the pseudo-tags *around* or *inside* the `em` element. The `background-image` property (or any other property that takes an `<image>` value) would allow an author to tell which node structure was used, so we don't allow it. And the Custom Paint API works by having the `paint()` function be a type of `<image>`, so it would have similar issues. -- GitHub Notification of comment by tabatkins Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7139#issuecomment-1067288956 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 14 March 2022 21:08:16 UTC