CSS to change DataGrid row height

Data grid row height (or at least the top and bottom padding) appears to be fixed.

Is there a CSS padding option to alter this?

Hello. In case this helps:

1 Like

[campopianoa] Thank you.

.anvil-role-thin_row {
 margin-top: -10px !important;
 margin-bottom: -10px !important;
}

That’s just what I needed.

I know you showed the option of highlighting rows through code but is there anyway to combine the role you suggested with the following:

If you only wanted anvil-row-panels for some data grids gray - you could create an anvil role for the repeating panel called striped

Anvil Docs | Custom Styling

.anvil-role-striped .anvil-data-row-panel:nth-child(even) {
    background:  %color:Gray 200%;;
}