0

I need to remove a style that is listed in the below listed gallery.css file.

How ever I believe the path below is the location of a cached version of the file not the actual file??

I need to find the actual file and not sure were/how to find it?

domain.com/pub/static/version1500569382/frontend/Smartwave/porto_child/en_US/mage/gallery/gallery.css

any suggestions on where I can find this file? I looked in

domain.com/app/design/frontend/Smartwave/porto_child

however That directory does not contain a en_US folder?

2 Answers 2

1

If you want to remove this file then add below code in <theme_dir>\Magento_Catalog\layout\catalog_product_view.xml file.

<head>
   <remove src="mage/gallery/gallery.css" />
</head>

If you want to edit gallery style:

If you are not locate this file in <theme_dir>\web\mage\gallery then copy gallery.less file from <root>\lib\web\mage\gallery and add in your theme.

Run command:

  • php bin/magento cache:clean
  • php bin/magento setup:static-content:deploy

en_US folder is generate from themes when you run php bin/magento setup:static-content:deploy.

2
  • When I copy over the gallery.less file from <root>\lib\web\mage\gallery should I change the file ext to be .css and not .less or keep the file as .less ?
    – Jayreis
    Aug 3, 2017 at 21:30
  • You can keep .less ext. Aug 4, 2017 at 11:36
0

If you are looking for the static file you should check in

domain.com/pub/static/frontend/Smartwave/porto_child/en_US/mage/gallery/gallery.css

Otherwise if you are looking for the original file which you want to deploy in future after finishing the changes, you should check in

domain.com/app/design/frontend/Smartwave/porto/mage/gallery/gallery.css

Since 'porto' is a parent theme for the 'porto_child', it will be there in the porto theme directory.

2
  • thank youI do not have any "mage" folder in the parent theme folder domain.com/app/design/frontend/Smartwave/porto/ which is why I was not sure what to do. I am just trying to remove a very specific style class in the gallery.css file.
    – Jayreis
    Aug 3, 2017 at 21:28
  • search file using the linux command 'find . -name "gallery.css"' inside <magen_root_dir>/app/design. From the result you can find where it is located. Aug 5, 2017 at 6:52

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.