Decathlon / vitamin-web

Decathlon Design System UI components for web applications
https://decathlon.github.io/vitamin-web
Apache License 2.0
282 stars 76 forks source link

bug(@vtmn/icons): icons are displayed outside of viewBox #1418

Closed thollander closed 1 year ago

thollander commented 1 year ago

Describe the bug

While bumping from 0.20.0 to 0.21.0, we have an issue on @vtmn/icons.

Before :

image

After :

image

Steps to reproduce Repro repo : https://github.com/thollander/repro-vtmn-sprite-svg

Expected behavior The SVG should not go outside of its viewbox.

Browsers affected

Version affected

@vtmn/icons > v0.20.0

lauthieb commented 1 year ago

Thanks @thollander.

After investigated with @thibault-mahe, we found that our SVGs from @vtmn/icons@0.20.1 switch to viewBox="0 0 24 24" but our sprite was still generated symbols with viewBox="0 0 16 16".

PR just made & merged: https://github.com/Decathlon/vitamin-design/pull/236 This will create an automated PR to vitamin-web in a few minutes.

thollander commented 1 year ago

Fixed with 1.2.1

image