4 ms·
> For example, SVGs don't have z-index, and so it's done by the order of the children nodes. That isn’t correct. SVG is an XML island that composes into DOM no
by austincheney 6y ago
> For example, SVGs don't have z-index, and so it's done by the order of the children nodes.
That isn’t correct. SVG is an XML island that composes into DOM nodes with each receiving the benefits of CSS plus the visual rendering instructions SVG provides. You can even walk the interior of an SVG in your browser developer tools and experimentally add CSS as you wish.
- locallost 6y agoyou can't use css z-index to control how shapes (circle, rect, path...) inside an svg overlap. those later in the tree are the ones on top.
- austincheney 6y agoHere is the answer from the specification: https://www.w3.org/TR/SVG2/render.html#EstablishingStackingContex https://www.w3.org/TR/SVG2/render.html#EstablishingStackingC...