ux icon indicating copy to clipboard operation
ux copied to clipboard

[Icons] HTML different with documentation

Open seb-jean opened this issue 1 year ago • 5 comments

Hi,

I run below command: symfony console ux:icons:import mdi:check

In assets/icons/mdi/check.svg, then I have:

<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="currentColor" d="M21 7L9 19l-5.5-5.5l1.41-1.41L9 16.17L19.59 5.59z"/></svg>

I used HTML Syntax for render icon:

<twig:UX:Icon name="mdi:check" class="w-4 h-4" />

{# renders as: #}

<svg width="1em" height="1em" viewBox="0 0 24 24" fill="currentColor" class="w-4 h-4"><path fill="currentColor" d="M21 7L9 19l-5.5-5.5l1.41-1.41L9 16.17L19.59 5.59z"></path></svg>

But in the documentation it says that it renders something else:

<svg viewBox="0 0 24 24" fill="currentColor" class="w-4 h-4"><path fill="currentColor" d="M21 7L9 19l-5.5-5.5l1.41-1.41L9 16.17L19.59 5.59z"/></svg>

Why did xmlns="http://www.w3.org/2000/svg disappeared between assets/icons/mdi/check.svg file and the render? Why do I have width="1em" height="1em" when in the documentation there is no such thing?

Thanks 😃

seb-jean avatar Mar 18 '24 18:03 seb-jean

We'll update the documentation when we finish the attributes configuration. And then you'll chose which ones you keep, which one you add, etc.

smnandre avatar Mar 18 '24 21:03 smnandre

Thanks @smnandre

seb-jean avatar Mar 18 '24 21:03 seb-jean