Hello
My theme inherits from the blank theme (have actually copied all the less files from Blank to my theme. Bad decision? ).
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"?
Best,
Magnus
Solved! Go to Solution.
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 :
VendorName\ThemeName\web\css\source\_theme.less
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 !
It is ok,
Also, you can write your own CSS in
css/source/_extend.less
file. If you don't want to create custom 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 :
VendorName\ThemeName\web\css\source\_theme.less
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 !
It is ok,
Also, you can write your own CSS in
css/source/_extend.less
file. If you don't want to create custom LESS file.
how to import a custom css.????