CSS merge and minification breaks the frontend. How to resolve?

CSS merge and minification breaks the frontend. How to resolve?

When you enable CSS optimization, it is possible for the website layout (both front- and backend) to break. In order to resolve the issue, it's usually enough to redeploy the static content (php bin/magento setup:static-content:deploy). 

In case it doesn't help, you may also remove the static content and disable static content signing with the following command: 

php bin/magento config:set dev/static/sign 0 && rm -rf generated/* pub/static/* var/view_preprocessed/* && php bin/magento setup:static-content:deploy your_LOCALE

As a result, the layout should get back to normal. However, if the issue persists after completing these steps, feel free to contact us, and our Support Team will be glad to assist you.