i followed the suggestions here: Reducing the space between form-item - Vaadin Forum but it wont work in Vaadin 24.5. Has anyone a working solution? In the documentation is also mentioned, using --vaadin-form-item-row-spacing
Just put vaadin-form-layout.css in frontend/themes/<my-theme>/components and you should be good. Make sure you have vaadin.frontend.hotdeploy=true in application.properties.
Its not working in my case. I have the html {} part in theme-editor.css looks like it comes from copilot. I have added --vaadin-form-layout-row-spacing: 1rem; it there and also put it into style.css
Unfortunately its not working. When i move this file the build frontend process throws following exception:
Even when i import the file @import url(â./components/vaadin-form-layout.cssâ) into my styles.css
Failed to find the following imports in the `node_modules` tree:
- @vaadin/horizontal-layout/src/vaadin-horizontal-layout.js
- @vaadin/polymer-legacy-adapter/style-modules.js
- @vaadin/tabs/src/vaadin-tabs.js
- @vaadin/tabs/src/vaadin-tab.js
- @vaadin/tooltip/src/vaadin-tooltip.js
- @vaadin/icons/vaadin-iconset.js
- @vaadin/progress-bar/src/vaadin-progress-bar.js
- @vaadin/side-nav/src/vaadin-side-nav-item.js
- @vaadin/text-area/src/vaadin-text-area.js
- @vaadin/icon/src/vaadin-icon.js
- @vaadin/app-layout/src/vaadin-drawer-toggle.js
- @vaadin/checkbox/src/vaadin-checkbox.js
- @vaadin/vertical-layout/src/vaadin-vertical-layout.js
- @vaadin/button/src/vaadin-button.js
- @vaadin/app-layout/src/vaadin-app-layout.js
- @vaadin/scroller/src/vaadin-scroller.js
- @vaadin/side-nav/src/vaadin-side-nav.js
- @vaadin/upload/src/vaadin-upload.js
- @vaadin/date-picker/src/vaadin-date-picker.js
- @vaadin/form-layout/src/vaadin-form-item.js
- @vaadin/form-layout/src/vaadin-form-layout.js
If the build fails, check that npm packages are installed.
To fix the build remove `package-lock.json` and `node_modules` directory to reset modules.
In addition you may run `npm install` to fix `node_modules` tree structure.
(Deleted the node_modules folder and package-lock.json but didnt build)
Doesnt build:
When those files are in my-theme, the build is fine
You donât need to do that. If you place vaadin-form-layout.css in components it should be picked up automatically.
Those styles, however, need to use the Shadow DOM, as #layout isnât accessible in the Light DOM. If you use the Light DOM, you donât need to place them in components, nor do you need to name them after the component.
[INFO]
Failed to find the following imports in the `node_modules` tree:
- @vaadin/polymer-legacy-adapter/style-modules.js
- @vaadin/vaadin-lumo-styles/spacing.js
- @vaadin/common-frontend/ConnectionIndicator.js
- @vaadin/vaadin-lumo-styles/typography-global.js
- @vaadin/vaadin-lumo-styles/style.js
- @vaadin/vertical-layout/src/vaadin-vertical-layout.js
- @vaadin/vaadin-lumo-styles/color-global.js
- @vaadin/vaadin-lumo-styles/sizing.js
- @vaadin/vaadin-lumo-styles/vaadin-iconset.js
- @vaadin/login/src/vaadin-login-form.js
If the build fails, check that npm packages are installed.
To fix the build remove `package-lock.json` and `node_modules` directory to reset modules.
In addition you may run `npm install` to fix `node_modules` tree structure.
Yeah i tried mvn clean install that works but then the build frontend fails. I think it has something to do with our firewall and npm packages which can not be downloaded