Skip to content

[resize-observer] Fragment-aware behavior for SVG? #7736

@Loirooriol

Description

@Loirooriol

https://drafts.csswg.org/resize-observer-1/#calculate-box-size defines the size of SVG elements to be the bounding box, as defined in https://www.w3.org/TR/SVG2/coords.html#BoundingBoxes

The bounding box (or "bbox") of an element is the tightest fitting rectangle aligned with the axes of that element's user coordinate system that entirely encloses it and its descendants.

What if the SVG is fragmented? I have not been able to fragment a monolithic element using multicol, but I guess it happens in printing.

In that case it's just some graphical slicing, and I don't think the SVG coordinate system is aware of that, so I guess the ResizeObserver should notify of a single size (the size before slicing)?

But does it make sense for <img> and <svg> to behave different in this regard?

Alternatively, if the bounding box is calculated after the slicing, does it make sense to include page margins or whatever that separates the fragments? And do the pages appear one next to the other vertically or horizontally?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions