Re: [csswg-drafts] [css-anchor-position-?] SVG element or coordinate as anchor (#11301)

There is quite a lot that needs to be worked out here, and at a high level this breaks optimizations that browsers can do.

 - SVG today is completely opaque to the layout engine. No information is passed across the layout/svg boundary (and all sizing of the SVG can be done without content). This means that layout engines can do things like delaying layout of SVGs until a later point (typically right after layout occurs, but potentially later). This optimization is useful in the presence of multi-pass layouts, e.g. you don't know the final size of an SVG until its final layout.
 - Additionally SVG internals are typically placed with transforms, have potentially lots of effects place upon them. As an obviously  troublesome example is an element which has a displacement filter applied to it.
 - Finally the "what rectangle" issue would need to be sorted in sufficient detail for an interoperable implementation.

Also we shouldn't allow anchors to cross the foreignObject -> svg -> html boundary. That would _really_ break things :). 

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


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

Received on Monday, 31 March 2025 19:43:43 UTC