Does anyone know if this is fixed in vaadin 7?


http://dev.vaadin.com/ticket/3255


http://dev.vaadin.com/ticket/5077

related thread:


https://vaadin.com/forum/-/message_boards/view_message/744973

book of vaadin manual about this:


https://vaadin.com/book/-/page/layout.settings.html

The issue is if you follow the book, all your child vertical or horizontal layouts inherit these settings. The workaround in the thread works great, but the ticket has a proposed solution that makes a lot more sense.

Any comments on this?

  • Steve

I got a reply on the ticket on this:

Hi,

The new layouts that are currently being finalized in a separate branch
(“layoutgraph”) will fix this issue. I think the current layouts (introduced in alpha2) also fixed this.

So from now on, you can set the margin directly to the actual DOM element using the style name, no need for a separate shadow/measure element. The margins are still applied using CSS padding, but you can use CSS margin as well if you’re not setting the layouts size in percentages.

{{{
// Java
VerticalLayout layout = new VerticalLayout(); layout.addStyleName(“foo”);

// CSS
.foo {
padding-top: 10px;
padding-bottom: 20px;
}
}}}

This is great!