12 votes
Accepted

How can I add custom less file and in a particular theme compile less file in Magento 2

Just add new file here app\design\frontend\Vendor\Themename\web\css\source\_new.less and import this file in source file given path below app\design\frontend\Vendor\Themename\web\css\source\...
10 votes

Getting Error cannot create symlink Every time

I know this post is old but it may help others. Make sure you open the cmd window as administrator. Right click on CMD then "Run as Administrator" then run the grunt commands and it will work fine.
  • 101
2 votes

Magento 2 - Importing LESS mixins/variables from lib

@Ben You can just add a reference import (as @mrtuvn mentioned above), except your path can be to source/lib/_responsive.less in your custom file...this needs to be relative to your theme's web/css/ ...
  • 2,259
2 votes

How can I add custom less file and in a particular theme compile less file in Magento 2

Above answer is not working I don't know how its accepted: If you want to add custom common css file, you have to follow below steps: 1) create file at following locationi in your custom theme app\...
1 vote

How to over ride frontend-blank _navigation.less in custom theme?

Having tested further I can confirm that option 1 above is the correct way to override a less partial from magento blank theme e.g. /vendor/magento/theme-frontend-blank/web/css/source/_navigation.less....
1 vote

CSS files not update with _extend.less rules

Clear generated files by deleting pub/static/frontend/[Vendor]/[YourTheme]/ For more information on this issue see this answer - how to automatic update file `.less` in custom theme magento2?

Only top scored, non community-wiki answers of a minimum length are eligible