Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
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: <value>; } and .v-margin-right { padding-right: <value>; } 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:
https://vaadin.com/api/valo/
For instance:
https://vaadin.com/api/valo/#variable-v-layout-margin-right
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.