1

I've one composer module which has CSS stored in view/base/web/css/style.css

How can I override this file so that I can modify it.

I tried copying that file to my custom theme as below,

app/design/frontend/Vendor/Theme/ChildTheme/Vendor_Module/web/css/style.css

But this doesn't work for me. Any ideas ?

UPDATE

Actually thing is CSS is responsible for styling order PDF so I think it will not work by putting it at frontend theme. I'm not sure but I've to make admintheme and then override into it

asked Sep 27, 2019 at 6:54

3 Answers 3

0

You can add this CSS File as:

app/design/frontend/VendorName/ChildTheme/Vendor_Module/web/css/style.css

Hope this will Help!!

answered Sep 27, 2019 at 7:17
0

You are in the right path!

After copying the file in app/design/frontend/Vendor/Theme/ChildTheme/Vendor_Module/web/css/style.css

You need to know which deploy environment your in, so execute this CLI command in Magento Root directory php bin/magento deploy:mode:show

If you are in developer mode go to

back office => system => cache management

, click on button Flush JavaScript/CSS Cache and clear cache.

If you are in default or production mode generate the static content using the CLI command bin/magento setup:static-content:deploy {local you are testing with default is en_US}

Happy coding

answered Sep 27, 2019 at 7:46
1
  • 1
    Haha, Thanks for more clarifications but I did all but still doesnt work for me. Actually thing is CSS is responsible for styling order PDF so I think it will not work by putting it at frontend theme. I'm not sure but I've to make admintheme and then override into it. Commented Sep 27, 2019 at 8:31
0

everyone here is missing that the original css files were in the view/base/web/css folder, and not the view/frontend/web/css folder.

The way to extend anything outside the /frontend/ folder is unfortunately to make a custom module extending the original, as your app/design/frontend/Vendor/Theme/ChildTheme/Vendor_Module theme folder can only extend things in the /view/frontend space, which is why when you're extending them, you remove that from the path within your custom theme folder

making an adminhtml theme won't help much either as it's under the same restrictions but for the view/adminhtml space

answered Dec 7, 2021 at 17:47

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.