CSS Classes not applied some times

Dont ask. :smiley:

After i removed production mode and dev mode flags from application.properties ist started working but it has the error that the div for example had a red background even if it wasnt added in the css.

I think there was some caching issue which now has been fixed with the production build. Very strange. Never have had those issues before. And the error with AccessDenied /.well-known… is also gone now.

so mvn clean package is the way to go?

For a production build, do you mean? If so, yes, mvn clean package is all you need (use install only if you need the artifact to be copied into your local maven repository)

ah yes mvn clean package. Thanks.

but -pProduction is still supported (or ignored), right?

It depends by your project :smile:
If your POM has a production profile, it will be activated; otherwise, not.

Yeah it has, but this section is quite old and could be maybe renewed.

production Profile
<profile>
            <id>production</id>
            <dependencies>
                <dependency>
                    <groupId>com.vaadin</groupId>
                    <artifactId>vaadin-core</artifactId>
                    <version>${vaadin.version}</version>
                    <exclusions>
                        <exclusion>
                            <groupId>com.vaadin</groupId>
                            <artifactId>vaadin-dev</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>com.vaadin</groupId>
                            <artifactId>vaadin-dev-server</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>com.vaadin</groupId>
                            <artifactId>hilla-dev</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.vaadin</groupId>
                        <artifactId>vaadin-maven-plugin</artifactId>
                        <version>${vaadin.version}</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>build-frontend</goal>
                                </goals>
                                <phase>compile</phase>
                                <configuration>
                                    <forceProductionBuild>true</forceProductionBuild>
                                    <optimizeBundle>false</optimizeBundle>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- Spring Boot Repackage -->
                    <plugin>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>repackage</id>
                                <goals>
                                    <goal>repackage</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

Hi, it almost works but what often occur is: we change a css class in css file (added a backround-color property to a existing css class). Then it reload and sometimes the whole page is completely broken, it applies some other css to components but the mainlayout is broken.

We need then to prepear und build frontend, then it works until the next time this issue occur. Does anyone has an idea where this issue could come from? Since the move to 25. we are stuggeling with CSS issues, which worked before very well. So i think its upon version upgrade or css path maybe?

Personally, I don’t remember have seen such behavior.
Could you provide a project that reproduces the issue?
Also please provide information on how you start the application when experiencing such issues (from the IDE or cli, with hotswap agent or without?)

Need to bring this up again. I still have issues with CSS and hotloading. Some times it works if i change a color of a background for example, but some times i need to have a clear package in order to see changes. Lately i was trying to remove the transition in css. But the result was not visible with a restart, it needed a complete build. But this takes place several times a day.

.carousel-track {
display: flex;
transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

Is there a documentation where i find the recommended settings for the correct css/hotswap settings i need to have?

And the whole app restarts after CSS changes sometimes, but not always, thats new as well since i am on v25. Something must be missconfigured.