Re: [csswg-drafts] [css-pseudo-4] single highlight pseudo for find-in-page? (#10212)

I'm not really sure that having Find pseudos is going to work very well.

The current behavior in Safari is that when you do a Find and there are results, the current result is selected (using normal DOM selection), and the UA draws an overlay where the current find result gets a yellow bubble (which entirely obscures whatever the page renders). If the user dismisses the Find overlay, then the result remains selected, so that it can be copied, for example.

Now if the page author styles `::search-text`, the results are surprising. First, that style won't be visible in UAs that provide their own Find overlay, and second, when the Find overlay is dismissed, does the found word get both selection, and `::search-text` applied? Or does `::search-text` go away when the Find operation is canceled?

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


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

Received on Tuesday, 30 April 2024 18:46:06 UTC