Hi, I’m making a child theme and following the code from Default theme, I’ve done this:
$this->setParent('defaultthemeplugin');
$additionalLessVariables = array();
if (Config::getVar('general', 'enable_cdn')) {
if ($this->getOption('typography') !== 'notoSans') {
$this->removeStyle('fontNotoSans');
}
if ($this->getOption('typography') === 'merriweather') {
$this->addStyle(
'fontMerriweather',
'//fonts.googleapis.com/css?family=Merriweather:400,400i,700,700i',
array('baseUrl' => '')
);
$additionalLessVariables[] = '@font: "Merriweather", Georgia, serif;';
}
}
// Pass additional LESS variables based on options
if (!empty($additionalLessVariables)) {
$this->modifyStyle('stylesheet', array('addLessVariables' => join($additionalLessVariables)));
}
The problem is when calling addLessVariables, it looks like another variables from Default theme (like colors) lose their value. Any idea what could be happening? The same happens if I put any variable instead. I just want to replace the @font var.