Skip to content

[css-anchor-position] Drawing irregular shapes between two items #10361

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
JacobDB opened this issue May 23, 2024 · 1 comment
Open

[css-anchor-position] Drawing irregular shapes between two items #10361

JacobDB opened this issue May 23, 2024 · 1 comment

Comments

@JacobDB
Copy link

JacobDB commented May 23, 2024

When anchoring between two items, it would be very useful to be able to draw irregular shapes. For example, when drawing an invisible triangle to improve hover area, such as in the mockup below.

image

https://www.mayank.co/blog/hover-triangles

https://www.w3.org/TR/css-anchor-position-1/

@kizu
Copy link
Member

kizu commented Jun 3, 2024

This could be a good use case for #8586, where allowing us to use anchor() and anchor-size() in all properties could allow us to calculate the polygon() necessary for the clip-path().

With some hacks, I'm pretty sure the hover triangles could be possible with what we have already in anchor positioning, but having an easier way of doing it could be very useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants