application.css

All the layout annotations provide the ability to specify adhoc CSS classes, associated with the corresponding element:

CSS can also be specified using the Xxx.layout.xml layout files. The viewer can then use this information within the rendered page. For example, the Web UI (Wicket viewer) adds the CSS as a style in a containing <div> for each element.

The serving of the CSS (containing the style definitions) is also viewer-specific. In the case of the Web UI (Wicket viewer) it uses Spring Boot to serve the CSS file, under static package on the classpath.

The name of the file under static is configurable, in either application.yml or application.properties. For example, the SimpleApp starter app uses application.yml:

application.yml
causeway:
  viewer:
    wicket:
      application:
        css: css/application.css

This corresponds to the static/css/application.css (in src/main/resources in the simpleapp’s webapp module).

If you change the contents of this file, you may find that your end users' browsers will still cache the old value. You can prevent this from occurring ("bust the cache") by setting this Spring Boot config value:

application.yml
spring:
  web:
    resources:
      cache:
        cachecontrol:
          max-age: 3600