pom.xml
file and will be available to select when a new project is generated through Launchpad.
Styling
Each of the themes uses a main Less file insrc/main/webapp/styles
named themeName-settings.less
. This provides a basis for modifying the parameters of a theme at a high level such as the color scheme. If you are not familiar with Less or want to customize the UI by applying some standard CSS styling, this can be done in the custom.css
file in the same location.
When to use Less and when to use CSS
In some cases, it is easier to customize particular components of the UI through the Less settings, rather thancustom.css
. In our themes and styling, Appkit defines a number of Less “mixins” which are re-usable code snippets that can be invoked using some number of parameters. The Less code is never exposed to the web client directly, but rather is compiled into CSS code at runtime (or even at compile time). When compiled, a single line of a .less
file can result in multiple lines of CSS.
This means that in order to customize the default styling of a theme, you can:
- Modify a few lines in the
classic-settings.less
file - Override the compiled CSS settings in the custom.css file.
classic-settings.less
file:
.field-title
mixin, which is defined in the classic theme. The comment at the end of the line lists the arguments that can be specified in this particular mixin. When compiled, the output CSS includes these rules:
custom.css
overriding one or more of the compiled CSS rules, above.
So to conclude, it makes sense to override the Less settings when you are customising a part of the UI that has a well-defined mixin to match. For ad-hoc customization, it might be easiest to use custom.css
directly.