1

Can anyone tell me how to find Style-l.css and Style-m.css file in my theme.

I want to make some change in these file but I do not find these file in my theme I find these file in

/pub/static/frontend/mythemename /nl_NL/css/styles-m.css
/pub/static/frontend/mythemename/nl_NL/css/styles-l.css 

I do change in this file but change does not reflect on my site and can we change the CSS is pub folder I have some doubt because when we make static deploy then change has gone so I want to style-m.css and style-l.css in my design theme folder can anyone Magento experience developer help me

  • let me know if any problem occurs – Manoj Deswal Oct 26 '17 at 12:33
2

You are right that you can not edit them directly in /pub/static/ folders . As you will deploy the content then changes will be lost .

styles-m.css and styles-l.css are compiled version of various .less files in lib and modules. So you need to edit .less files to reflect the changes and stay there after deploy.

So you need to use _extend.less for adding your custom CSS/LESS or updating existing CSS/LESS .

Here you can find detailed answers about using Custom LESS / CSS in Magento Way

How to change module LESS / CSS part of answers here in 2nd part of answers

I hope this will help you and others as well

0

These files will not be found in your theme because they are generated from .less files.

You can modify your .less files after which you have to run the command:

php bin/magento setup:static-content:deploy

or below command for only your theme:

php bin/magento setup:static-content:deploy --theme=Vendorname/Theme

There is a Grunt solution that helps you compile .less real-time files without the above commands and that helps you see the .less source file inspector in the browser.

This post will help you know how to use Grunt: Magento 2 - How to configure Grunt in PhpStorm

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.