I found the default size of the WooCommerce shopping cart icon (in the Storefront theme) was a bit on the small size.
The icon is textual and comes from Font Awesome. Normally, this would be an easy change by adding fa-2x or something similar to the style declaration. Inspecting the CSS in Chrome didn’t offer me such an option (I’m new to Font Awesome) so I added this CSS to the custom CSS in my Storefront child theme:
/* Increase size of shopping cart icon */The 1.25em increased the size of the cart icon to better reflect the size of the menu text and stand out better.
.site-header-cart .cart-contents:after
{
font-size: 1.25em !important;
}
Hi Michael. Thanks for the code ;)
ReplyDeleteIt increase the size downwards left. Is it possible to make it increase upwards rift so to say? Right now it moves into the nr of items text if its made 2.25em for example. I would like the button of the icon to be aligned with the bottom of the text (items X)
Cheers,
Mads
Hi Mads, I think I can see what you mean. In my case, the positioning is set using a right: 1.618em; and top: .3em; and I found by modifying these in Chrome I could move the icon around. Once you're happy with the result, drop your changes into the class above (below the font-size line) and add the !important declaration. Hope that makes sense.
ReplyDelete