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:
[url=https://vaadin.com/api/valo/]
https://vaadin.com/api/valo/

For instance:

https://vaadin.com/api/valo/#variable-v-layout-margin-right
[/url]

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();
v.setMargin(2,2,2,2);

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

And i try this:

$v-layout-margin-right:“1px”;

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.