diff --git a/addons/website/static/src/scss/primary_variables.scss b/addons/website/static/src/scss/primary_variables.scss index d4a2ca8d81d..feea57e5624 100644 --- a/addons/website/static/src/scss/primary_variables.scss +++ b/addons/website/static/src/scss/primary_variables.scss @@ -1994,7 +1994,8 @@ $o-base-website-values-palette: ( 'input-border-radius-sm': null, // Default to BS 'input-border-radius-lg': null, // Default to BS - // A key from the $o-theme-font-configs map (null = default to the first key) + // A key from the $o-theme-font-configs map (null = default to the first key + // for the base 'font' value, the others just fallback to 'font'). 'font': null, 'headings-font': null, 'navbar-font': null, diff --git a/addons/website/static/src/scss/secondary_variables.scss b/addons/website/static/src/scss/secondary_variables.scss index cef3c0e5f93..5ab1eb4427a 100644 --- a/addons/website/static/src/scss/secondary_variables.scss +++ b/addons/website/static/src/scss/secondary_variables.scss @@ -2,14 +2,14 @@ // Website customizations //------------------------------------------------------------------------------ -// Complete the base website values palette with the first defined font +// Complete the base website values palette with the first defined font in +// $o-theme-font-configs, this allows themes to just define a list of fonts and +// relying on the fact the first one will be used. $-first-font-name: nth(map-keys($o-theme-font-configs), 1); -@each $alias, $key in $o-font-aliases-to-keys { - @if map-get($o-base-website-values-palette, $key) == null { - $o-base-website-values-palette: map-merge($o-base-website-values-palette, ( - $key: $-first-font-name, - )); - } +@if map-get($o-base-website-values-palette, 'font') == null { + $o-base-website-values-palette: map-merge($o-base-website-values-palette, ( + 'font': $-first-font-name, + )); } @function o-add-font-config($values) {