How to apply padding size on a GridLayout using CSS

Dear colleagues,

I am trying to figure out how to increase the padding size around some components that I have added on a GridLayout component in my application. I have finally suceed in finding the following CSS class which seems to be related to vaadin GridLayout component.

padding-left: 10px;
padding-right: 10px;
padding-top: 10px;
padding-bottom: 10px;

This works fine, but here the problem comes… I would like to apply this rule for a specific component in my application by using the setStyleName method.

Could anyone tell me what I must change on the above CSS and how I can call the setStyleName on my gridlayout component?

GridLayout grid = new GridLayout(3,3);


Thanks in advance

.my-amazing-style.v-gridlayout-spacing-on {
should do it.

Hi,Can you tell me how to make the border of each cell darker through the same setStyle command?