How to change .setMargin(true)?

I need to change the default value to set .setMargin method , becouse is to spacing for my project… help me plz

You adjust margins by adjusting padding value of .v-margin-left { padding-left: ; } and .v-margin-right { padding-right: ; } and so on for .v-margin-top and .v-margin-bottom respectively.

You can also find all default Valo css values in th Valo API URL:

For instance:

Yes using the valo variables is absolutely better. You would use the v-margin-x selectors only if you have some very specific layout or custom composition you want to have different margins from the common settings.

Great, but if a need to refactos the method .setMargin for example :

VerticalLayout v=new VerticalLayout();

I can modify the original method?.. for my own work.

And i try this:


How i get the default .setMargin value default?..

It’s not possible to set margin values from server-side. They can be only set on/off. It’s no even feasible try to override/bypass it in client-side either because of complicated size calculations Vaadin is doing. Using CSS is the way.

ok, thank you Johannes and Francisco Serrano.