I created custom theme and I overrided Magento_catalog and css of parent from folder Magento_catalog in blank theme. now I want to change some css code like gallery.I use firebug in chrome to find path and line css of gallery,but it shows me style.css in pub folder.how can I find exactly path of css??


  • did you run php bin/magento setup:static-content:deploy command ? Commented Feb 27, 2018 at 20:51
  • Did you try my solution ?
    – Pawan
    Commented Feb 28, 2018 at 16:02
  • @Pawan thanks for helping but your solution wasn't exactly related to my question..
    – mahsaabdev
    Commented Feb 28, 2018 at 16:09
  • Welcome but I think its related , you want to overide default CSS and you can do it by custom css.
    – Pawan
    Commented Feb 28, 2018 at 16:14
  • @Pawan my problem is I cant find the path of css parent theme.I confuse about the element that I want to change it, be in which folder of css ?
    – mahsaabdev
    Commented Feb 28, 2018 at 16:26

2 Answers 2


The CSS files for Magento 2 are generated from several less files. When you run your webshop in developer mode (on your local machine), and then running the grunt commands (I usually run grunt exec:<theme> && grunt less:<theme> && grunt watch:<theme>), your browser will show the less file that contains the styling of the selected element.

If this isn't working for you, it could also help by finding a specific piece of styling, like the class, can be tracked back to one or more less files in your installation. This will most likely make it possible to track back where the original styling is declared. Be aware, this can also be in the parent theme (could be the blank theme).


You must use the Grunt processor. Your answer, it finds in below link:

Magento 2 - How to configure Grunt in PhpStorm

  • what do I with grunt?I don t fully understand about grunt
    – mahsaabdev
    Commented Feb 28, 2018 at 5:44
  • @mrs.programmer If you use Grunt it makes you a map of all created styles and shows you in Inspect Element in which .less file and at what line is the stylize you are tilting
    – St3phan
    Commented Feb 28, 2018 at 8:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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