Skip to content
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

Support nested <svg> elements #2239

Open
JSUYA opened this issue May 2, 2024 · 0 comments
Open

Support nested <svg> elements #2239

JSUYA opened this issue May 2, 2024 · 0 comments
Labels
enhancement Improve features svg SVG features

Comments

@JSUYA
Copy link
Member

JSUYA commented May 2, 2024

[Example]

<svg width="64" height="64" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="none">
    <rect rx="8" fill="#80ff45" width="64" height="64"/>
    
    <svg x="12.5%" y="37.5%" width="50%" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
        <rect rx="4" fill="#ff4596" width="32" height="50%"/>
    </svg>

</svg>

Our SVG loader parses the <svg> element at the check of validation(header()) and skips any <svg> elements it encounters thereafter.
We can make loader->doc an array type and make the first doc node the main doc node.
And every node can store and reference its parent <svg> element node.
This work should be process in conjunction with valid check function. it may require more time or may not proceed according to our policy.

@JSUYA JSUYA added feature New feature additions svg SVG features labels May 2, 2024
@hermet hermet added enhancement Improve features and removed feature New feature additions labels May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve features svg SVG features
Projects
Status: No status
Development

No branches or pull requests

2 participants