Closed ghost closed 2 years ago
Hi @jpogeant, thanks for your issue. I think it is not a bug from Vitamin side, but let's check together. Can you please apply the advice from this answer and let me know if it's better? https://stackoverflow.com/a/39062462 Thanks in advance :)
Hi @jpogeant, is it okay for you? @thibault-mahe feel free to check if my answer is correct in your opinion. Thanks!
This is a stale issue. I close it, feel free to reopen if needed.
Hi,
I tested using the advice from the StackOverflow answer, without success. The sprite seems to have a mismatching between viewBox
et symbol sizes.
Using dynamic imports and SVGs directly this seems to be better.
Hi @jpogeant , I tried locally with the config you gave (except that I use the Asset Modules webpack config with Nextjs) and it seems to work well:
There's been some change recently on the icons assets, with a PR removing the height/width of the svg. Maybe this is linked to your issue. Do you have the last release of the @vtmn/assets ?
Hi @thibault-mahe
Everything is working know 🙌
I think removing height/width was the thing!
Describe the bug
The display of the flags (maybe other icons) is greater than the SVG parent element.
Here is an example with SVG element with height/width sizes to
16px
Steps to reproduce
Here is the steps to reproduce (Vanilla React with Webpack)
@vtmn/assets
Expected behavior
The icon element MUST have the same size as the SVG element have.
Browsers affected
Version affected
@vtmn/assets: v0.1.3