How to set vaadin-form-layout row spacing?

Thanks. Yeah, no shadow root between body and the vaadin-form-layout. In that case styles.css should work. I assume we are talking about something like frontend/themes/mytheme/styles.css

yes

FYI i tested both selectors using background-color: red

They both work

–vaadin-form-item-row-spacing seems to have no effect

Huh. Well, what do you know: with the Lumo theme, that is indeed the case. That property is overridden: https://github.com/vaadin/web-components/blob/master/packages/form-layout/theme/lumo/vaadin-form-item-styles.js#L10-L12

So, then you need to do target all vaadin-form-item elements directly:

styles.css

vaadin-form-item {
  --vaadin-form-item-row-spacing: 100px;
}

I’m not even going to try to sugarcoat it: Form Layout is not a very good component :sweat_smile:

it does not work

yeah but i am becoming frustrated slowly, we chose hilla+vaadin components to make our lives easier :smile:

vaadin-form-item seems to match only explicitly wrapped items with

It seems not to match vaadin fields

and the spacing did not apply at all

nor to the explicitly wrapped ones

Yeah, sorry to hear that this is being a struggle. Maybe backtrack a bit: what are you trying to accomplish?

the form is very condensed, would like to have more ait between the lines

You say you want to increase the spacing. For all forms in your app I assume?

it is a small web calculator app with just two screens with two forms, i prefere to do it on the second one, which is a contact form

I feel like I need to try this locally now. I wonder what makes it so difficult…

I fixed the most obvious spacing by adding vaadin-checkbox {
margin-top: 25px;
}