Skip to main content

Customization

Custom CSS classes

To add custom CSS classes or modify styles of existing elements, edit resources/styles/custom.css file. It contains a list of modifiable element classes for reference.

TagDescription
# CLASS: classnameApply CSS class to the paragraph <div> element.

Themes

To add a theme to the application, create a JSON file in the resources/themes folder with the following structure:

{
"name": "custom",
"theme": {
"bg-color": "#FCFCFC",
"fg-color": "#5D576B",
"shade-color": "rgba(0, 0, 0, 0.1)",
"font-color": "#333333",
"accent-bg-color": "#FCFCFC",
"accent-fg-color": "#F7567C",
"accent-inverse-color": "#FCFCFC",
"border-radius": "0.5rem",
"border-radius-inline": "0.25rem"
}
}
Theme parameterDescription
nameTheme display name.
bg-colorApp background color.
fg-colorPrimary color for controls.
shade-colorShadows and highlights.
font-colorApp and game text color.
accent-bg-colorBackground for accented elements.
accent-fg-colorForeground for accented elements.
accent-inverse-colorForeground for active accented elements (accent-fg-color is used as a background then).
border-radiusRound the corners of choices, modals, and boxes.
border-radius-inlineRound the corners of inline buttons.

Note: You can use any valid CSS values for the theme.

Fonts

To add a font to the application, create a folder in the resources/fonts folder with the following files:

  • index.js with the following content:
import('./index.css');
export default {
name: 'Font Name',
fallback: 'sans-serif', // fallback font
};
  • index.css, which includes corresponding @font-face directives
  • font files, referenced in the index.css

To remove font from the application, delete the font folder from resources/fonts.