Skip to content

Custom Themes Guide

Grom edited this page Jan 23, 2021 · 1 revision

How to use variables in custom themes?

For the untrained CSS user that means, that instead of knowing what a property and a selector are, and instead of finding them in the CSS, they can just copy the variables to their custom theme or CSS module they are working on and change their values by declaring them anew. Most custom themes do little more than recoloring the Sigma-9 theme, for which variables may be enough in some cases, or at least a big enhancement to make things much easier.

If you are making a theme just based on variables, older browsers that do not support them yet will not display it right. It is advised to put the whole code of custom themes that do not use fallback values for variables into this code, so it is only loaded on supporting browsers: