- From: Emilio Cobos Álvarez via GitHub <sysbot+gh@w3.org>
- Date: Tue, 19 Dec 2023 16:23:00 +0000
- To: public-css-archive@w3.org
emilio has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-ui?] Add control over findability of text == Some rendering techniques like GitHub's code view rely on a `color: transparent` textarea with all the content overlaid on top of the actual rendered content. In order to avoid find in browsers from returning each result twice, they go through hoops to prevent finding the actual rendered text, see: * https://github.blog/2023-06-21-crafting-a-better-faster-code-view/#hiding-text-from-ctrlf Firefox allows you to find pseudo-elements, they end up working around it _harder_ by adding a per-node pseudo-element, which ends up causing performance issues as described in here: * https://github.com/orgs/community/discussions/77953 Doing the maybe obvious solution of "don't find transparent text just like you don't find text with `visibility: hidden`" is not really possible, because: * That same transparent text approach is used elsewhere to make stuff findable (a concrete example of this is pdf.js). * Transparent text might still be visible IIRC, with something like `background-clip: text`. A reasonable solution could be to offer authors control over find-ability of text, just like we do for selection via e.g. `user-select`. So a strawman proposal to get discussion started could be a property with a syntax like: ```css user-find: auto | none ``` Does that seem reasonable? It should be extensible in the future if we want to, but that seems like a consistent starting point to me. Another question is: Should this property be inherited? `user-select` isn't, but `user-select` is really weird. I think it'd be simpler if this one was inherited, but open to other ideas. cc @josepharhar @mfreed7 @rniwa @fantasai @frivoal Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9726 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 19 December 2023 16:23:02 UTC