<commit_before>[#application-css]
= application.css

:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR  CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

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

* xref:refguide:applib:index/annotation/DomainObjectLayout.adoc#cssClass[@DomainObjectLayout#cssClass()]
* xref:refguide:applib:index/annotation/ActionLayout.adoc#cssClass[@ActionLayout#cssClass()]
* xref:refguide:applib:index/annotation/PropertyLayout.adoc#cssClass[@PropertyLayout#cssClass()]
* xref:refguide:applib:index/annotation/CollectionLayout.adoc#cssClass[@CollectionLayout#cssClass()]

CSS can also be specified using the xref:userguide:fun:ui.adoc#object-layout[Xxx.layout.xml] layout files.
The viewer can then use this information within the rendered page.
For example, the xref:vw:ROOT:about.adoc[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 xref:vw:ROOT:about.adoc[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 xref:docs:starters:simpleapp.adoc[SimpleApp] starter app uses `application.yml`:

[source,yaml]
.application.yml
----
isis:
  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).
<commit_msg>updates docs, adds hint on cache busting application.css<commit_after>[#application-css]
= application.css

:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR  CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

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

* xref:refguide:applib:index/annotation/DomainObjectLayout.adoc#cssClass[@DomainObjectLayout#cssClass()]
* xref:refguide:applib:index/annotation/ActionLayout.adoc#cssClass[@ActionLayout#cssClass()]
* xref:refguide:applib:index/annotation/PropertyLayout.adoc#cssClass[@PropertyLayout#cssClass()]
* xref:refguide:applib:index/annotation/CollectionLayout.adoc#cssClass[@CollectionLayout#cssClass()]

CSS can also be specified using the xref:userguide:fun:ui.adoc#object-layout[Xxx.layout.xml] layout files.
The viewer can then use this information within the rendered page.
For example, the xref:vw:ROOT:about.adoc[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 xref:vw:ROOT:about.adoc[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 xref:docs:starters:simpleapp.adoc[SimpleApp] starter app uses `application.yml`:

[source,yaml]
.application.yml
----
isis:
  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:

[source,yaml]
.application.yml
----
spring:
  web:
    resources:
      cache:
        cachecontrol:
          max-age: 3600
----



{'fraction_non_alphanumeric': 0.08315185111859037, 'fraction_numerical': 0.002375767174816868, 'mean_word_length': 5.168498168498169, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6965396', 'n_tokens_mistral': 1382, 'n_tokens_neox': 1321, 'n_words': 565}