Question

I have developed custom theme, and added own cart icon image using

app\design\frontend\Mytheme\theme\web\css\source_extend.less

.minicart-wrapper .showcart::before {
    // content: "" !important;
    background: url('../images/cart.png') no-repeat;
    width: 27px;
    height: 25px;
    padding-left: 37px !important;
  }

But default cart icon image also shown, how to remove default one.

Was it helpful?

Solution

.minicart-wrapper .action.showcart:before{
    content:"";
    background-image: url('../images/cart.png') no-repeat;
    width: 27px;
    height: 25px;
    padding-left: 37px;
}

Add the above css after run the below commnds,

bin/magento s:up
bin/magento s:s:d -f
bin/magento c:f
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top