NO BUG: Problem of applying padding on svg icon

Browser: Chrome 129.0.6668.90
OS: Windows

Hi bricks team,

As you are surely aware, if we use SVG icon in icon element, we cannot use padding. Because it causes the svg icon to shrink and eventually hide. So the solution is to wrap the icon in a div and apply padding to the div.

But is it possible to solve this method so that if we select the svg icon, it will automatically wrap inside the div and padding will be applied on the div? I’m not sure this is a logical solution. Just for suggestion. Because it doesn’t make it easy.

thanks

Hi Hosein,
Sorry, but this is clearly not a bug :smiley:

The SVG renders as pure as it can be without any wrapper—the same way as the SVG element does. If you need an icon wrapper, wrap the icon with a div.

Right-click » Wrap Div » Done

Best,
timmse

1 Like