Deploying static content not updating css
-
27-03-2021 - |
Question
As far as I understand it, In order to change the style of an email, I need to override the _email-extended.less file. I go to the path below
app/design/frontend/Smartwave/Porto/web/css/source/_email-extended.less
and make my changes/add classes but it doesnt seem to affect any of my generated static content css files. It simply does nothing. Ive tried deleting the folder where I assume it shows up
pub/static/frontend/Smartwave/porto/en_US/css
but when I look, none of the files have been modified, it still generates the same files it was before it got deleted. The best i can tell is im doing the changes in the wrong location, however i am not sure where to look if not in the directory listed above...
Solution
Depending on your configuration, there's a few folders you might need to clear before your changes are caught. Are you using server-side or client-side rendering? Are you in production mode, default mode or developer mode?
Assuming you are in production mode, most likely you need to empty the following folder
var/view_preprocessed
and var/cache
.
I usually run rm -R var/cache/*;rm -R var/view_preprocessed/*
.
You can review the documentation here: https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/css-topics/css-preprocess.html