I created a custom module that overrides the addtocart.phtml file. In that module, I also created a css file.
Here is what I did:
Here is my layout – catalog_product_view.xml
:
< ?xml version="1.0"?>
Vendor_Module::product/view/addtocart.phtml
Vendor_Module::product/view/addtocart.phtml
and then I put the style.css
in /Vendor/Module/view/frontend/web/css
I thought that in this case the css file could be visible ONLY in the module, but it is not.
How can I make it visible ONLY in that phtml file?
I mean, I want the css to be able to edit ONLY the files into the module.
Is it possible?
Thanks