Skip to content

experiment: add form-layout base styles and visual tests #9743

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 29, 2025

Conversation

anezthes
Copy link
Contributor

New FormLayout base style

localhost_8000_dev_form-layout html localhost_8000_dev_form-layout-auto-responsive html

Supported custom properties

Property Description
--vaadin-form-layout-label-spacing Spacing between form item labels and fields.
--vaadin-form-layout-label-width Default width for labels when placed beside fields.
--vaadin-form-layout-column-spacing Horizontal spacing between columns in the form layout.
--vaadin-form-layout-row-spacing Vertical spacing between rows in the form layout.
--vaadin-form-item-label-color Color of the form item labels.
--vaadin-form-item-label-font-size Font size of the form item labels.
--vaadin-form-item-label-font-weight Font weight of the form item labels.
--vaadin-form-item-label-line-height Line height of the form item labels.
--vaadin-form-item-label-width Width of individual form item labels.

Changes from 'core'

In auto-responsive mode, vaadin-form-item has its margin set to 0.

Copy link
Member

@jouni jouni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay IMO. I’m not 100% sure about the need for both --vaadin-form-layout-label-width and --vaadin-form-item-label-width, but since those are pre-existing properties, I think it’s fine to keep them. No other harm than perhaps documenting both.

Should add visual tests for base styles, though.

@web-padawan
Copy link
Member

I'll look into adding visual tests and then will rebase the PR for CRUD on top of this one just in case.

@web-padawan
Copy link
Member

Regarding --vaadin-form-item-label-width - it's deprecated in 24.7, maybe we could remove item properties.

@web-padawan web-padawan changed the title experiment: FormLayout base styles experiment: add form-layout base styles and visual tests Jul 29, 2025
Copy link

@web-padawan web-padawan merged commit 0f4816f into main Jul 29, 2025
10 checks passed
@web-padawan web-padawan deleted the base-formlayout branch July 29, 2025 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants