natemoo-re / astro-icon

Inline and sprite-based SVGs in Astro made easy!
https://astroicon.dev
Other
996 stars 57 forks source link

Fix W3C validation #90

Closed spokospace closed 1 year ago

spokospace commented 1 year ago

Currently generated code of each icon looks like this: <svg viewBox="0 0 24 24" class="w-5 h-5 hover:text-lightBlue-400" astro-icon="mdi:facebook"><path fill="currentColor" d="M12 2.04c-5.5 0-10 4.49-10 10.02 0 5 3.66 9.15 8.44 9.9v-7H7.9v-2.9h2.54V9.85c0-2.51 1.49-3.89 3.78-3.89 1.09 0 2.23.19 2.23.19v2.47h-1.26c-1.24 0-1.63.77-1.63 1.56v1.88h2.78l-.45 2.9h-2.33v7a10 10 0 0 0 8.44-9.9c0-5.53-4.5-10.02-10-10.02z" /></svg>

which is error in W3C validators: Error: Attribute astro-icon not allowed on element svg at this point image

it seems to me, this part with 'astro-icon' should be removed from svg code

stramel commented 1 year ago

This is a duplicate of #55