Custom themes
General
CSS files define the look of JabRef. In Preferences > General > Appearance you choose three things:
Color scheme: Follow system, Light, or Dark.
Theme: the base look. JabRef brings its own JabRef theme (
jabref-theme.css) and bundles the themes from themes.jabref.org that cover both color schemes: Primer (based on AtlantaFX), Everforest, Nord, Papers, Chocolate Honey, and Dino Girl's themes. Every theme comes with a light and a dark variant; Dino Girl's themes pair a dark and a light hue in one entry and show the name of the hue matching your color scheme. A preview image below the list shows the selected theme in the selected color scheme (both, when following the system).Custom theme: a CSS file of your own. JabRef applies it on top of the selected theme and color scheme, so it only needs to contain what you want to change.
JabRef picks up changes to the custom CSS file while running, so you can edit the file and see the result immediately.
You can find the full collection of user contributed themes at https://themes.jabref.org. Themes that cover only one color scheme are not bundled; load them as custom theme.
Writing a custom theme
A theme defines all its colors as -color-* variables (for example -color-accent, -color-bg-primary, -color-fg-default, -color-selection). The full list is in jabref-theme.css; the rest of JabRef's styling only uses these variables, so overriding them is enough to re-color the whole UI.
Override a variable for both color schemes:
.root {
-color-accent: #8F0D11;
}Override it for one color scheme only. The media query follows the color scheme selected in JabRef (or the operating system, with Follow system):
@media (prefers-color-scheme: dark) {
.root {
-color-accent: #ff79c6;
}
}Selection of Useful CSS selectors
preview box
#previewBody
{} biblatex source tab
.code-area
text in {} biblatex source tab
.code-area .text
Last updated
Was this helpful?