NuxtUI icons forced to width and height 1em!
NuxtUI icons forced to width and height 1em! by head style! thats prevent
size
prob of any icon buton to get correct size!

5 Replies
Hi @CorrM. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
I'm sorry, but the knowledge sources do not explicitly mention any issue with Nuxt UI icons being forced to width and height of 1em by a head style, nor do they discuss this affecting the
size
prop of icon components or buttons.
The documentation shows that you can set the icon size using the size
prop or by applying a class (e.g., class="size-5"
) to the <UIcon>
component, and there is no mention of a global style overriding these settings. For example:
Icon component usage
If you are experiencing this issue, it may be due to a custom style or a specific configuration in your project, but the official documentation does not address or confirm this behavior. If you need to override a global style, you might consider using a more specific CSS selector, but again, this is not covered in the provided sources.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@219412205752287232> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
@kapa.aiworkaround by add:
to app config
Let me check the knowledge base for you again. One moment! :books:
----------------------
I'm sorry, but the knowledge sources do not contain any information about fixing Nuxt UI icon sizing issues by adding the following to your app config:
There is no mention of the
mode
or cssLayer
options for the icon configuration in the official documentation or examples provided. The sources only describe using the size
prop or CSS classes to control icon size, and do not discuss this specific workaround or configuration option. If you have found this solution elsewhere, it is not documented in the official Nuxt UI resources included here, so I cannot confirm its validity or recommend it based on the available information.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@219412205752287232> Kapa.ai is still learning and improving, please let me know how I did by reacting below.