# Published pages do not use theme-set --font-family and --header-font-family

**URL:** https://meta.discourse.org/t/published-pages-do-not-use-theme-set-font-family-and-header-font-family/389718
**Category:** Bug
**Tags:** page-publishing
**Created:** [November 26, 2025, 1:02pm UTC](https://meta.discourse.org/t/published-pages-do-not-use-theme-set-font-family-and-header-font-family/389718 "2025-11-26T13:02:56Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [November 26, 2025, 1:02pm UTC](https://meta.discourse.org/t/published-pages-do-not-use-theme-set-font-family-and-header-font-family/389718/1 "2025-11-26T13:02:57Z")

</div>

On published pages, it’s impossible to use --font-family and --heading-font-family set by a theme.

Repro:

- create a theme and enter this in CSS

```plaintext
:root {
    --font-family: CommonTestFont;
    --heading-font-family: CommonTestHeaderFont;
}

```

- and this in color-definitions

```plaintext
:root {
    --font-family: ColDefTestFont;
    --heading-font-family: ColDefTestHeaderFont;
}

```

A regular page will use them in this order (priority high - low)

- variables defined in common
- variables defined by site settings
- variables defined in color-definitions

 ![image](https://global.discourse-cdn.com/meta/original/4X/7/8/6/78642fb4b495df81df9c4807a83f48ad1dbccc69.png)

A published page will use them in this order (priority high-low)

- variables defined by site settings
- variables defined in color-definitions
- variables defined in common

 ![image](https://global.discourse-cdn.com/meta/original/4X/7/d/1/7d183fa556a5c46fb4afcf54732a398bfbe29382.png)

Two things are happening here.

1. the color-definitions CSS file puts the font-variables defined by the site settings **after** the :root from the themes color-definitions section, overriding them
2. in a published page, the CSS load order is different, because the color-definitions CSS is loaded in the body of the page, so the variables defined in there are overriding the theme common CSS.

---

_[View the full topic](https://meta.discourse.org/t/published-pages-do-not-use-theme-set-font-family-and-header-font-family/389718)._
