Trouble compiling multiple less files into one stylesheet
-
Hello,
I am using a parent/child theme structure where I want different sites to share variables and mixins. So, I have something like this:
/parent/parent.less /child/child.less
Inside child.less is this line:
@import "/wp-content/themes/parent/parent.less";
So when I enqueue this child theme in functions.php, this plugin will compile it the way I want — except for the import. This line shows up the same in the compiled css:
@import "/wp-content/themes/parent/parent.less";
Which the compiled css file can’t do anything with.
I could queue parent and child separately, and child.css would cascade over parent.css. However, the point is to have the preprocessing, and in this scenario, child.less can’t use any of the variables or mixins set by parent.less.
So my question is, how do I compile the two files before processing into css?
- The topic ‘Trouble compiling multiple less files into one stylesheet’ is closed to new replies.