I have done a custom theme to customize some elements on the Matomo interface. One of them was related to the header background color. I used for that the less variable @theme-color-header-background. It was working well but not anymore with the upgrade to version 3.6.0. It looks like it’s not used anymore. Looking around, I have seem that the color is set by:
nav { background-color:#37474f !important; }
I did not find how and where to change it (the !important could be anoying in that case).
My theme is still enabled (I even disabled and re-enabled it). I cleared again the cache. What surprise me is that some other modifications I have done are still used. But none of the modification on the less variables are taken into account (I also changed the variable @theme-color-header-text to #0d0d0d)
In the example theme, there is a class extending the plugin class. This does use the following function to override the theme color:
public function registerEvents()
{
return [
'Theme.configureThemeVariables' => 'configureThemeVariables',
];
}
public function configureThemeVariables(Plugin\ThemeStyles $vars)
{
$vars->fontFamilyBase = 'Arial, Verdana, sans-serif';
$vars->colorBrand = '#5793d4';
$vars->colorHeaderBackground = '#FFFFFF';
$vars->colorHeaderText = '#0d0d0d';
}
(they did “getListHooksRegistered” but it’s deprecated and so I changed it to “registerEvents”).
When I do the same for my theme, the color gots overridden. So for me it looks like the less files are not used ??