JarekToro / responsive-layout

The layout to beat them all!
https://vaadin.com/directory#!addon/responsive-layout
57 stars 24 forks source link

Add possibility to only use horizontal or vertical margin #22

Closed bassmartin closed 7 years ago

bassmartin commented 7 years ago

In the current API, for a specific row, we can enable only horizontal or vertical spacing.

Could we add the possibility to do that with a row margin (so only set top/ bottom margin or left/right margin)?

I would like this so I can "ident" a list of element under its parent.

Thanks.

JarekToro commented 7 years ago

You could try offsetting a Column with setOffset. To get the Indent feel. Or add a empty label directly to the row. and set its width to be exactly the margin you want.

Im not sure if adding horizontal and vertical margins will be the best. As this is trying to be closely tied to the Vertical and Horizontal layout Apis. Im a bit on the fence about it.

bassmartin commented 7 years ago

You are probably right. I think other UI libraries do not allow this kind of behaviour too. I'll try something else

Thanks.