Change magin/padding on buttons?

Hiya

When I add buttons to the content of a UDGrid, the space between the lines becomes twice as big, enough to fit 2 mouse cursors.
Can the size/Padding of a button be changes?

image

You could alter the theme:

$theme = New-UDTheme -Name "Custom" -Definition @{
    '.ud-button' = @{
      'margin' = '0px'
    }
} -Parent default
$dashboard = New-UDDashboard -Theme $theme

You can also reduce the padding between the text and the edge of the button using “‘padding’ = ‘0px’”

Obviously this will apply to all buttons on your Dashboard.

ref: https://docs.universaldashboard.io/themes#using-raw-css

1 Like

Thanks, and sorry for the late reply.

Margin had no effect,
Padding only reduced the width,
Height had no effect either.

Guess I’m outta luck :slight_smile:

Yes. The Padding only seems to effect the horizontal free space in the UDButton.
Someone with more experience in the CSS tricks might be able to help. Reducing the padding in the UDGrid might also be a route to investigate.