benflap / tabler-icons-svelte

A library of SVG Svelte components for Tabler Icons.
MIT License
62 stars 7 forks source link

Support vector-effect="non-scaling-stroke" #9

Open timohausmann opened 2 years ago

timohausmann commented 2 years ago

Sometimes it's wanted to exactly define the strokeWidth and prevent it from upscaling, for example large chevrons for navigation.

Currently, the larger the size, the bolder the stroke. Currently to get a 1px stroke for a 48 size I have to calculate the stroke width based on the 24 size:

<ChevronDown size={64} strokeWidth={1/(64/24)} />

What would be nice:

<ChevronDown size={64} strokeWidth={1} nonScalingStroke />