Magento 2 – How to Change Color of Cart Icon in Minicart

csslessmagento2

I am trying to change color of cart icon in header/minicart , as currently it's in grey shade

enter image description here

I tried changing via adding following css in my custom.css at \web\css\custom.css

.minicart-wrapper .action.showcart::before{
   color:#fe0404;
}

but some how it's not working

Best Answer

Adding your custom CSS/LESS or updating existing CSS/LESS use _extend.less .

This will load first so there will no issue of css order and you will not require using important

Create this at below location

app\design\frontend\vendor-name\theme-name\Magento_Theme\web\css\source\_extend.less

Place all your custom CSS and LESS in _extend.less . It's better to use LESS , so you can use variables or mixins for better management.

Run below commands after placing your CSS/LESS

php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy

Keep your cache disabled.