Here, I am using “-unity-background-scale-mode: scale-to-fit;”
The image is scaled in a way that it fills almost all the button.
If I want it slightly smaller, there are 2 workarounds: 1) redesign the image and 2) make a child element to the button
Here, I am using “-unity-background-scale-mode: scale-to-fit;”
The image is scaled in a way that it fills almost all the button.
If I want it slightly smaller, there are 2 workarounds: 1) redesign the image and 2) make a child element to the button
Background image fills the entire element, hence “background”. Child element with padding on the parent should do the trick. You can also use the Image element and apply padding.
Yes, I’m using that way. However, since there are --unity-background-scale-mode and -unity-background-image-tint-color, another parameter to scale the image would make things much simpler.

found a way to do it.
Icon Texture Import
Change your icon import settings to Type: Sprite, SpriteMode: Single > Open Sprite Editor > Change Borders to have some padding (i changed mine to LRTB 3,3,3,3) this is assuming your sprite has some blank space on the edges.
Go to UI Build window > Background > Slice = 1 > And then change Slice Scale to your liking
Did you checked background-size? Of course, if you’re not in 2021 LTS.