Shape 1 Shape 2 Shape 3

Custom CSS Variables From Settings

Cornerstone introduces a new way of handling styles made possible through CSS custom properties. CSS custom properties are supported in all modern browsers so they create a simple clean way to connect your theme settings directly with your stylesheets.

In the past we were required to serve scss.liquid files to accomplish what we can now pull off in normal css. With our new approach we define all of our CSS variables in a snippet called css-variables.liquid which is included in the  of the theme.liquid file.

In this file we define all our custom variables

<style> :root { --color-primary: {{ settings.color_primary }}; --color-offset: #faf9f7;

--font-default: {{ settings.font_family }}; --font-heading: {{ settings.heading_font_family }}; } </style>

this creates a CSS custom property which is tied to the value from the theme editor. We can access these variables in our .scss files:

background: var(--color-offset);

Here on the UX Team, we are so grateful for your time and we look forward to making the process of developing Kajabi themes simpler than ever before!

If you have any questions, feel free to reach out to us at themes@kajabi.com

Join Feedback Community

Enter your email below so that we can give you access to the Theme Developer Feedback Community.