webstudio-is / webstudio

Open source website builder and Webflow alternative. An advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.
https://webstudio.is
GNU Affero General Public License v3.0
4.59k stars 510 forks source link

Detect element size for outline even with display: contents #4003

Open kof opened 3 weeks ago

kof commented 3 weeks ago

When display is set to contents, outline and navigator highlight is jumping around because hovered instance detection doesn't see from mouse over the element, it only sees the next parent.

We should calculate the element based on children size and position just like we already do for the outline and set the hovered instance correctly.

https://github.com/user-attachments/assets/651f1b94-c553-46a0-ba93-dc5d58d6be1c

istarkov commented 3 weeks ago

Same with pointer-events: none