I would like to add custom css to shopping cart page. Where can I place the custom less file and where can I add the link to that file?
1 Answer
Create your own theme at below location app/design/frontend/Package/theme
In that add the module of checkout with directory name Magento_Checkout
Simply add your custom css
for the checkout page at the below location.
For css
files
magento_root\app\design\frontend\Package\theme\Magento_Checkout\web\css\Custom.css
for .less
files
magento_root\app\design\frontend\Package\theme\Magento_Checkout\web\css\source\module\_checkout.less
Note:
Disable the catch before doing adding the css or don't forget to run the below commands.
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
-
1I observed that the styles ended up in styles-l.css. Now I need to figure out how to pull in common styles from my custom css that I did for other pages located in app/design/frontend/MyTheme/default/web/css/mytheme.less. Thanks @abhishek– DmitryCommented Feb 6, 2018 at 20:59