Change padding of cells in data grid 2

1
Hi all, I try to change the padding of a cell in a grid 2 from 16px to 2px. To that end, I am trying to update the scss file (custom-variables.scss) in the theme/web folder. I have set all grid/padding related variables to 2px. And the variable $spacing-medium also to 2px. Yet, it still renders with 16px. What do I miss to make it work?  
asked
2 answers
1

Hi Chris,

 

Old question but I always hate finding a question that pertains exactly to my problem, without an answer.

 

It appears the datagrid is pulling the padding directly from the datagrid.scss file located in \themesource\datawidgets\web\. You’d need to either apply a custom class to this datagrid, using an edited version of the exact code from from the datagrid.scss file, or change the datagrid file itself – which will apply the change to every grid in your application.

answered
0

Datagrid2 has the option to get set to ‘Compact’. Will this do:

answered