Sub-themes cannot override fonts in CivicTheme unless they override the component

Created on 25 August 2025, 21 days ago

Problem/Motivation

We generate CSS variables for every colour used in CivicTheme but we do not generate CSS variables for any other properties.

In the past, when we compiled SASS for sub-theme, we combined the CT SASS with SubTheme SASS and compiled it and so any SubTheme overrides overrode CT at compile time and there was one giant blob of CSS to load for CT.

We are now compiling CivicTheme CSS for every component in the SDC component directory `civictheme/components/02-molecules/promo-card/promo-card.css` and not into a monolithic file in the sub-theme.

This means that if we change the font used in the sub-theme, any non-overridden component will not use the updated font because it is a SASS variable in the sub-theme (and not converted to CSS variable like color) and CivicTheme does not recompile its components and so does not get the updated value.

Steps to reproduce

1. Override font-family in subtheme
2. Note that components do not update their typography for this change

Proposed resolution

Convert font variables to be CSS variables:

PR: https://github.com/civictheme/uikit/pull/738

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇦🇺Australia RichardGaunt Melbourne

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024