tailwindlabs / heroicons

A set of free MIT-licensed high-quality SVG icons for UI development.
https://heroicons.com
MIT License
21.45k stars 1.28k forks source link

vue: Safari Version 15.5 (17613.2.7.1.8) won't show svgs due to no width or height #707

Closed NorseGaud closed 2 years ago

NorseGaud commented 2 years ago

Hi, so we import the icons with the traditional approach:

{
  SearchIcon,
} from '@heroicons/vue/outline'

We then see the icon showing up in the HTML, but not on the UI.

Screen Shot 2022-06-17 at 3 31 04 PM

When I manually add an attribute on the SVG like width="21", it shows properly in the UI.

I realize that setting a width and height is probably hard to do by default, but I also don't see any documentation that shows how to set this. What can be done?

adamwathan commented 2 years ago

Hey! You are expected to write the necessary CSS or assign a class to the icons to give them the size you want, same way you set the color:

B0D997E2-6721-401B-BE11-A8C662CCCCD1

Hope that helps!