Replies: 5 comments 2 replies
-
I agree. It cost me precious time to find out why SVGs inside a Button-Element are not changeable in size. And I can imagine many people will come across this issue and be annoyed with it in the future, since the property is so hidden on the right side aswell. |
Beta Was this translation helpful? Give feedback.
-
Second. It took me a while to figure out why icons in my buttons don't scale. |
Beta Was this translation helpful? Give feedback.
-
Too unsure if this is an oversight or intentional, but I'd suggest it not be the default. Or there be some manner of overriding this elegantly. Personally I just removed the class in the btn component. |
Beta Was this translation helpful? Give feedback.
-
It's a shame no one ever updated the debate, so I just wanted to. I just saw that a fresh install has this instead: [&_svg:not([class*='size-'])]:size-4 Well done. |
Beta Was this translation helpful? Give feedback.
-
I'm running into this same problem now and their update doesn't appear to solve other components attempting to change the svg size. e.g. I have a third-party component attempting to do: <Button>
<span className="[&_svg]:size-full">
<svg />
</span>
</Button> I don't have direct access to the SVG (since it's used dynamically) so I'll probably just remove the class from As an aside, and I suppose this is more of a css question, but can someone explain to me why the classes on |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I don't understand why we force-size a svg in this way, I delete it in all my installs, but I started wondering if its there by design, by decision or just a mistake that never really got handled. Because it stops sizing icons with text. Perhaps
size-fit
is more appropriate, or perhapssize-[1em]
?Beta Was this translation helpful? Give feedback.
All reactions