tabler / tabler-icons

A set of over 5500 free MIT-licensed high-quality SVG icons for you to use in your web projects.
https://tabler.io/icons
MIT License
17.91k stars 892 forks source link

Size dropdown at https://tabler-icons.io/ not changing width/height of SVG code #157

Closed tomgenoni closed 2 years ago

tomgenoni commented 2 years ago

First, thank you for creating this resource. Really nice set of icons.

The "Size" dropdown option at https://tabler-icons.io/ doesn't seem to affect the resulting SVG code. If the "Size" is set to 32px the SVG made available to download or copy is the following. Note the height/width are both 24.

<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-2fa" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
   <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
   <path d="M7 16h-4l3.47 -4.66a2 2 0 1 0 -3.47 -1.54"></path>
   <path d="M10 16v-8h4"></path>
   <line x1="10" y1="12" x2="13" y2="12"></line>
   <path d="M17 16v-6a2 2 0 0 1 4 0v6"></path>
   <line x1="17" y1="13" x2="21" y2="13"></line>
</svg>

The "Stroke" dropdown seems to works fine.

FreexD commented 2 years ago

@tomgenoni thanks for reporting that :) When manipulating the size we should set the height andwidth accordingly in the copied SVGs. The downloaded SVG and PNG files are static - we will not modify them on the fly.