Customize theme variables

Settings for a theme are managed by theme variables that are set in the theme.scss.json file.

This procedure shows how to customize a generic theme variable. For instructions about customizing specific theme variables, see:

Before you begin

This procedure assumes you are comfortable updating theme parts and themes. For the basic principles behind themes and theme parts, see Customization fundamentals. For instructions about adding and modifying themes and theme parts, see Manage themes.

Update the theme variable

  1. Identify the theme part you plan to update. If you are creating a new theme part, prepare the directory.
  2. In the theme part, open the theme.scss.json file in a text editor.

    NOTE: Prior to GBC 1.00.53, you could also find a theme.scss.json file in the root folder of the customization directory. While it is still possible to put this file at the root of the customization directory, it is not recommended.

  3. Modify an existing style value or add a new style variable and value. For more information see theme.scss.json file.
  4. Save your changes.

Compile

After updating theme.scss.json with the theme variable and ensuring the theme part is assigned to one or more themes, you compile your customization.

$ gbc build --customization <customization_project_dir>

Test

Test your theme setting works as expected.

TIP: You may need to use CTRL + F5 to clear the browser cache before you see your changes.

If your tests do not behave as expected, ensure you are using your newly-compiled custom GBC. Depending on your development environment, you may need to package and deploy a custom GBC client. For information on which customization and theme you are using, see Customization and Theme Selection.