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

some <rect> get trimmed in inline SVG #76

Closed
yw662 opened this issue Jul 1, 2019 · 3 comments
Closed

some <rect> get trimmed in inline SVG #76

yw662 opened this issue Jul 1, 2019 · 3 comments

Comments

@yw662
Copy link

yw662 commented Jul 1, 2019

The inline svg is:

        g(id="bg")
            rect(width="1000" height="1000")
            path(d="M400,0 L650,250 Q750,350,650,450 L0,1100 L0,0")
            path(d="M450,0 L630,180 Q715,265,800,180 L980,0")
            path(d="M1000,20 L700,320 Q600,420,700,520 L1000,820")

the in the first line is trimmed by htmlnano.

output:

<g id="bg_header"><path d="M0 0h1000v1000H0z"></path><path d="M400 0l250 250q100 100 0 200L0 1100V0M450 0l180 180q85 85 170 0L980 0"></path><path d="M1000 20L700 320q-100 100 0 200l300 300"></path></g>
@yw662 yw662 changed the title some <rect> and <path> trimmed in inline SVG some <rect> get trimmed in inline SVG Jul 1, 2019
@yw662
Copy link
Author

yw662 commented Jul 1, 2019

So it technically is not trimmed, but translated from <rect> into <path>.

However, this does break thing, like style sheets, querySelector, etc.

@maltsev
Copy link
Member

maltsev commented Jul 2, 2019

Thanks for posting this issue! I’ll look into it.

@maltsev
Copy link
Member

maltsev commented Jul 4, 2019

Fixed.

@maltsev maltsev closed this as completed Jul 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants