- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Which commands should I run after adding new CSS in Magento 2 ?
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @foysal
Yes - when you change anything in CSS and JS file then you required to run this commands !
For second question i would suggest you to refer this link - https://magento.stackexchange.com/questions/217131/load-custom-css-after-style-l-css-for-home-page
It might helps you for the same !
Hope it helps
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Custom CSS in Magento 2
Hi @foysal
You will required to run below commands in a sequence :
php bin/magento setup:di:compile php bin/magento setup:static-content:deploy -f php bin/magento cache:clean php bin/magento cache:flush
Hope it helps !
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Custom CSS in Magento 2
@Manthan DaveShould I run all these commands after every change ?
How to load a stylesheet at the end of all stylesheet ?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @foysal
Yes - when you change anything in CSS and JS file then you required to run this commands !
For second question i would suggest you to refer this link - https://magento.stackexchange.com/questions/217131/load-custom-css-after-style-l-css-for-home-page
It might helps you for the same !
Hope it helps
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Custom CSS in Magento 2
@Manthan Dave, What are the benefits of using `developer` mode ?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Custom CSS in Magento 2
Hi @foysal
Main benefits of developer mode is - you can able to see ERRORS on the browser.
In Default or production mode - errors is logged in the var/log directory and on the browser you will not able to see those errors.
In developer mode static view file caching is also disabled and automatic code compilation can be done for the same.
For more details refer this link - https://devdocs.magento.com/guides/v2.2/config-guide/bootstrap/magento-modes.html
Hope it helps !
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Custom CSS in Magento 2
!