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

invalid attribute: fill should not be "undefined" #33

Open
chrisgarrity opened this issue May 12, 2020 · 3 comments
Open

invalid attribute: fill should not be "undefined" #33

chrisgarrity opened this issue May 12, 2020 · 3 comments

Comments

@chrisgarrity
Copy link

Some sprites' svgs get exported with fill="undefined". This is not a valid attribute and causes errors when the svg is imported to other systems (Android).

When this is fixed file an issue on scratch-android to remove the work-around.

@BryceLTaylor
Copy link

This is related to these issues:
#31
#32

There are workaround for Android that strip each of these properties out of svgs that are a processing burden. According to @chrisgarrity, "There are now 4 work-arounds that require reading every svg file 4 times and making substitutions as needed."

@adroitwhiz
Copy link

Any idea which sprites are being saved this way?

@adroitwhiz
Copy link

It looks like some Scratch 2.0-generated assets (e.g. the dove) in the asset library have fill="undefined", but when they pass through Paper, it (correctly) coerces that to fill="#000000".

If you change any part of the costume in the paint editor, the exported SVG will be fixed, but if you export it directly without changing anything, it'll use the Scratch 2.0 SVG structure.

The solution may be to go over the asset library with some sort of SVG validator to fix these invalid SVGs generated by 2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants