Re: [csswg-drafts] [css-contain-2] Proposal: content-visibility: hidden-matchable (#5595)

> Searchability belongs in CSS

Responding to this particular point: I do now thing that searchability belongs in HTML. Until yesterday I couldn't see a good
reason to put it in HTML, but now I do see a reason. It's that searchability is about informing UA-implemented semantic features, and by the design of CSS the UA cannot "override" CSS in some way to indicate its desire to search - there is no place in the cascade to define that. So if the feature was in CSS, then there would have to be an event sent to script to ask it to reveal the content.

Stated in a more practical way: if it's an attribute, the UA can then modify that attribute to signal to the page it wants to display the searched-for element to the user, and the page can respond by changing visual display via a CSS attribute selector. (And the page will also fire an event for situations that are beyond the abilities of CSS to express.)


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


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

Received on Friday, 12 February 2021 16:34:58 UTC