cancel
Showing results for 
Search instead for 
Did you mean: 

LESS variables across custom less files

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

LESS variables across custom less files

How do i share LESS variables across custom less files? I have put below a quick example of my theme setup, it is a very customised front-end design so there is nothing much I want to use from Blank (I do want to use some UI elements though).

 

When compiling i have a problem with Variables being undefined, what is the best way to use variables across custom less files?
 Is there something i am missing with naming conventions?


Default Head blocks

<css src="css/styles.css" />


styles.less



@import "source/lib"; // My variables are declared here


@import "source/base";


@import "source/layout";


//@magento_import 'source/_module.less'; // Theme modules - this is Awesome!
//@magento_import 'source/_widgets.less'; // Theme widgets


@import "source/theme";