Re: [csswg-drafts] [css-highlight-api][css-anchor-position] Allow `anchor-name` on `::highlight(...)` (#11100)

My team and I are also looking at ways to further reduce our reliance on user land tools like Floating UI in exchange for platform primitives like CSS Anchor Positioning. In our case, our application can sometime provide explanations of its work to a user like:

<img width="317" alt="Image" src="https://github.com/user-attachments/assets/b2e20967-d903-4542-92e5-a17db65d0f72" />

Say a user doesn't understand some of this, they can highlight the text they want to know more about about are provided an "Explore this" button to dig deeper into the concept:

<img width="307" alt="Image" src="https://github.com/user-attachments/assets/d3a55f60-13fa-4a6d-a772-d83fb760c037" />

This is quite similar to some of the newer output from a Google search:

<img width="654" alt="Image" src="https://github.com/user-attachments/assets/06a84198-48f9-450c-8e18-02754da7bd1a" />

Here too you can highlight parts of the explanation to act on that content in various way:

<img width="654" alt="Image" src="https://github.com/user-attachments/assets/c7005f2a-39a0-4251-8744-e0d6a7d77cf5" />

For these types of experiences, the ability to leverage things like `position-try-fallbacks` and the like are highly important to ensure the smoothest consumption of the interaction.

Here's hoping we can leverage CSS Anchor Positioning via `::highlight(...)` in the (near 😉) future. 🤞🏼 

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


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

Received on Wednesday, 2 July 2025 12:26:52 UTC