Showing results for 
Search instead for 
Did you mean: 

Import new less file?


Import new less file?



My theme inherits from the blank theme (have actually copied all the less files from Blank to my theme. Bad decision? Smiley Frustrated).


Now I want to import a new less file to be complied together with the rest of the files. In which file is the "best" to make the import? I tried first to add

@import 'source/_themeone.less';

at the end of css/_styles.less. But it was overwritten in the compiled css file. Tried instead in the css/source/_theme.less, and that seems to work.


Is this "okay"? 






Re: Import new less file?

Hi @Brake6


Well your second approach seems correct over here.


When you are create a custom theme your _theme.less file location should be like below :




over there you need to write that import line to inherit the parent theme !!


You can also create your custom css on the below path :  VendorName\ThemeName\web\css\source\_extend.less 


Hope it helps !

if issue solved,Click Kudos & Accept as Solution

Re: Import new less file?

It is ok,

Also, you can write your own CSS in


file. If you don't want to create custom LESS file.


If Issue Solved, Click Kudos/Accept As solutions.