-
-
Notifications
You must be signed in to change notification settings - Fork 143
Open
Labels
Description
Tempest version
3.x
PHP version
8.5
Operating system
Linux
Description
Reference: https://iconify.design/docs/usage/svg/no-code/
By default the Iconify API returns a SVG with height and width attributes set to 1em.
The tempest/icon class doesn't currently expose a prop to override this.
The tempest/view x-icon component does add a $class prop, but does not override the width and height attributes.
I've found this to be incompatible with tailwind height and width utilities in the class string, instead defaulting to the width and height attributes. That could be a precedence or browser rendering issue, but nonetheless highlights the default behaviour is fixed and not developer-controllable.
Steps to reproduce
Use <x-icon to render any icon and you will see the returned HTML includes the width and height attributes
Possible fixes
- Add
?height=noneto the download url inicon.config.phpand allow the<x-icon classattribute defined by the developer to control height and width, with perhaps a default of 1em applied here for easy control. - Add the
widthandheightprops totempest/iconclass which in turn is filled from<x-icon height="" width=""attributes. More extensive changes totempest/iconand possibly not proportionate given the simplicity of option 1 and little added benefit.
Reactions are currently unavailable