felixfbecker / svg-screenshots

📸🧩 Browser extension to take scalable, semantic, accessible screenshots of websites in SVG format.
809 stars 29 forks source link

Great extension, but a few quirks #103

Closed getify closed 9 months ago

getify commented 1 year ago
  1. When I selected the "minify" option, it basically just spun and spun forever and never produced an output. When I turn off the "minify" option, it produces the download in less than a second. What could cause it to get into some infinite loop while minifying?

    I'm using Chrome 108 on Windows 10, and just installed the extension with its latest version.

  2. I inspected the non-minified SVG and it has a bunch of attributes like this in my text elements:

text-decoration="none solid rgb(90, 212, 230)"

Notice the "none" there, which effectively means there's no text decoration. So it should just omit this attribute, right?

  1. There's a lot of other unnecessary attributes on my text elements, that set what would otherwise be default values, such as:
direction="ltr"
letter-spacing="normal"
font-style="normal"
text-rendering="auto"
unicode-bidi="normal"
font-variant="normal"
writing-mode="horizontal-tb"
user-select="auto"
text-anchor="start"

All those unnecessary attributes end up bloating the SVG a ton in size. I'm sure there's more in there too, those are just the ones I caught.