Create a website theme
A Website Theme sets the look of your website: colors, fonts, button styles, and custom styles. You can keep several themes and switch between them.
INFO
Website Theme is part of the Frappe Framework.
Create the theme
- Open the Website Theme list and create a new Website Theme.
- Enter the Theme name.
- In the Theme Configuration tab, set the basics:
- Google Font and Font Size.
- Primary Color, Text Color, Dark Color, Light Color, and Background Color.
- Button Rounded Corners, Button Shadows, and Button Gradients.
- Save.
Apply the theme
- Open Website Settings.
- Select the theme in Website Theme.
- Save, and reload the website.
Add custom styles
The theme is built with SCSS and Bootstrap. In the Stylesheet tab:
Custom Overrides: overrides the SCSS variables of the app themes. ERPNext includes this field before the other SCSS. For example,
$spacer: 2rem;doubles all spacing.Custom SCSS: your own styles. ERPNext includes this field after the app themes, so it can override any style. For example:
scss.btn-primary { background-color: $teal; color: $orange; }Ignored Apps: each installed app can bring its own website styles (
<app>/public/scss/website.scss). Add an app here to leave its styles out of the theme.
Add custom JavaScript
In the Script tab, write JavaScript in JavaScript. It runs on every page that uses the theme. For example, use it to add or remove CSS classes.