This is more a general question. How can I access less variables like @secondary-colour which are defined in the Parent Theme, when creating a Child Theme?
I have this in my inc.php file:
public function init() {
$this->setParent('classicthemeplugin');
$this->addStyle('custom-stylesheet', 'less/custom.less');
$this->addScript('custom', 'js/custom.js');
}
but when I define the @secondary-colour in the custom.less file I have a server error:
PHP Fatal error: Uncaught Less_Exception_Compiler: variable @secondary-color is undefined in file
So the less variables are not imported in the child theme, I have made some attempts but I couldn’t find a solution.
Especially the Classic Theme is hard, because has a lot of “nested” less files.