I am using Magento 2.2.1. I want to do changes in my CSS file. After inspecting on the website I am finding the source of CSS is from somewhere in pub/static folder. I tried editing the CSS in that folder and after that I ran the deploy command. But again my CSS is reverting back to the older one. Kindly help anyone. I have tried all the solutions provided in this website but am unable to get a correct way out of my problem.
Magento 2.2 – CSS Changes Not Reflecting
csserrormagento2.2
Best Answer
You should not edit/modify files within pub/* or vendor/* directory.
The pub folder is for deployment only. Magento uses LESS CSS preprocessing for managing styles of themes and works in the following manner:
Instead of making changes in pub folder's css or js files or working directly in vendor folder, follow these steps:
For more info, have a look at the following useful links: