> For the complete documentation index, see [llms.txt](https://themes.kajabi.com/liquid/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://themes.kajabi.com/liquid/theme-styling/css-variables.md).

# CSS Variables

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

```css
  :root {
    --color-primary: {{ settings.color_primary }};
    --color-offset: #faf9f7;
    --font-default: {{ settings.font_family }};
    --font-heading: {{ settings.heading_font_family }};
  }
```

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);
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://themes.kajabi.com/liquid/theme-styling/css-variables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
