Skip to content

Conversation

@seb-jean
Copy link
Contributor

@seb-jean seb-jean commented Nov 6, 2024

I allow myself to add the xmlns="http://www.w3.org/2000/svg" attribute.

What do you think?

@carsonbot carsonbot added Site ux.symfony.com Status: Needs Review Needs to be reviewed labels Nov 6, 2024
@smnandre
Copy link
Member

smnandre commented Nov 6, 2024

As this would potentially change how icons are renders in existing apps... what about updating the recipe instead ?

Read too quickly sorry!

@seb-jean
Copy link
Contributor Author

seb-jean commented Nov 6, 2024

I made this addition because the icon has the xmlns attribute defined at the start but it is not rendered at the end.

@carsonbot carsonbot added Status: Reviewed Has been reviewed by a maintainer and removed Status: Needs Review Needs to be reviewed labels Nov 6, 2024
@norkunas
Copy link
Contributor

norkunas commented Nov 6, 2024

I made this addition because the icon has the xmlns attribute defined at the start but it is not rendered at the end.

But is it needed? 🙂

@seb-jean
Copy link
Contributor Author

seb-jean commented Nov 6, 2024

I made this addition because the icon has the xmlns attribute defined at the start but it is not rendered at the end.

But is it needed? 🙂

Do you think this is an attribute that is optional?

@norkunas
Copy link
Contributor

norkunas commented Nov 6, 2024

Yes, browsers renders svg's without it perfectly fine :)

@seb-jean
Copy link
Contributor Author

seb-jean commented Nov 6, 2024

Well then, I don't know if it's an optional or required attribute 😄.

@smnandre
Copy link
Member

smnandre commented Nov 7, 2024

It is "required" but in reality for this kind usage it makes no difference.

@kbond
Copy link
Member

kbond commented Nov 9, 2024

I think this clearly states it isn't required for ux-icons:

Note: The xmlns attribute is only required on the outermost svg element of SVG documents, or inside HTML documents with XML serialization. It is unnecessary for inner svg elements or inside HTML documents with HTML serialization.
-- https://developer.mozilla.org/en-US/docs/Web/SVG/Element/svg

@seb-jean seb-jean closed this Nov 9, 2024
@seb-jean
Copy link
Contributor Author

seb-jean commented Nov 9, 2024

I am closing this PR for the reasons given by @kbond.

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

Labels

Site ux.symfony.com Status: Reviewed Has been reviewed by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants