Summary
When a Google Font with an explicit weight variant is selected for headings (e.g., Roboto 900), the headings_bold checkbox CSS (font-weight: var(--dxt-setting-headings-bold) !important) always overrides the native font weight (font-weight: var(--dxt-setting-headings-font-weight, 700)), because the bold rule uses !important and appears later in source order.
This means the precise weight from font selection (e.g., 900, 300) is never applied to headings — it's always replaced by either bold (~700) or normal (~400) from the checkbox.
Steps to reproduce
- Go to Appearance > DXPR Theme Settings > Typography
- Select a Google Font with a specific weight variant for headings (e.g., "Roboto 900")
- Inspect any heading element in the browser
What is the current bug behavior?
The heading gets font-weight: bold (or normal) from --dxt-setting-headings-bold, ignoring the 900 weight from the font selection.
What is the expected correct behavior?
When a native font weight is detected from font selection (e.g., 900), it should take precedence over the bold checkbox. When no explicit weight is detected (web-safe fonts, default variants), the bold checkbox should continue to work as before.
Possible fixes
Use CSS var() fallback nesting in scss/base/typography.scss:
font-weight: var(--dxt-setting-headings-font-weight, var(--dxt-setting-headings-bold)) !important;
And stop outputting --dxt-setting-headings-font-weight for fonts without an explicitly detected weight (web-safe fonts, Google fonts with "regular" variant), so the fallback to --dxt-setting-headings-bold kicks in for those cases.
Scope of affected files
scss/base/typography.scss
css/base/typography.css
features/sooper-settings/css-variables-theme-settings-css.inc
js/dist/settings-admin/font-loader.js
js/dist/settings-admin/field-handler.js
js/minified/dxpr-theme-settings-admin.bundle.min.js
Summary
When a Google Font with an explicit weight variant is selected for headings (e.g., Roboto 900), the
headings_boldcheckbox CSS (font-weight: var(--dxt-setting-headings-bold) !important) always overrides the native font weight (font-weight: var(--dxt-setting-headings-font-weight, 700)), because the bold rule uses!importantand appears later in source order.This means the precise weight from font selection (e.g., 900, 300) is never applied to headings — it's always replaced by either
bold(~700) ornormal(~400) from the checkbox.Steps to reproduce
What is the current bug behavior?
The heading gets
font-weight: bold(ornormal) from--dxt-setting-headings-bold, ignoring the 900 weight from the font selection.What is the expected correct behavior?
When a native font weight is detected from font selection (e.g., 900), it should take precedence over the bold checkbox. When no explicit weight is detected (web-safe fonts, default variants), the bold checkbox should continue to work as before.
Possible fixes
Use CSS
var()fallback nesting inscss/base/typography.scss:And stop outputting
--dxt-setting-headings-font-weightfor fonts without an explicitly detected weight (web-safe fonts, Google fonts with "regular" variant), so the fallback to--dxt-setting-headings-boldkicks in for those cases.Scope of affected files
scss/base/typography.scsscss/base/typography.cssfeatures/sooper-settings/css-variables-theme-settings-css.incjs/dist/settings-admin/font-loader.jsjs/dist/settings-admin/field-handler.jsjs/minified/dxpr-theme-settings-admin.bundle.min.js