3

I created a custom less file in

\app\design\frontend\Vendor\theme\web\css\source

I don't know how to compile it and how to imports this file in style-l.css

please give your suggestions

  • create in theme module – Manoj Deswal Sep 25 '17 at 5:08
  • let me know if any problem – Manoj Deswal Sep 25 '17 at 5:16
2

For custom less use _extend.less this will import all your style in style-l.css

Create _extend.less and place at below location in your extended theme module

app/design/frontend/vendorname/themename/Magento_Theme/web/css/source/_extend.less

After adding your less styles here , run following commands to compile it to style-l.css

In developer mode

php bin/magento setup:upgrade

php bin/magento setup:static-content:deploy

In Production Mode

php bin/magento setup:upgrade

php bin/magento deploy:mode:set production

Keep your cache disabled or flush your cache

| improve this answer | |
0

Place your custom css in your-theme/web/css and add your css in

your-theme/Magento_Theme/layout/default_head_blocks.xml 

before styles-m.css like

<css src="css/custom.css" media="screen and (min-width: 1px)"/>

and then deploy the static content

also on the developer mode to avoid to deploy the content again and again

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.