Posts

Showing posts with the label Vaadin

Fix: CSS in embedded Vaadin applications not working

 If you are experiencing issues with CSS not working in your embedded Vaadin application, there are a few common troubleshooting steps you can take: 1. CSS File Location: Ensure that your CSS file is located in the correct directory and that the path to the CSS file is correct in your Vaadin application. By default, Vaadin looks for CSS files in the "VAADIN" directory within your web application. Make sure your CSS file is located there or in a directory that Vaadin can access. 2. File Name and Extension: Ensure that your CSS file has the correct file name and extension. Vaadin typically expects the CSS file to be named `styles.css`. Also, check for typos in the file name. 3. Define a Theme: In Vaadin, you can define a custom theme for your application. Make sure you have correctly set the theme for your Vaadin UI, and the CSS rules are defined in the appropriate theme folder. The default theme location is under `src/main/webapp/VAADIN/themes`. 4. CSS Class Names: Check that