I am trying to downsize the "add to cart" button on the mobile view without altering the size of the button and text in the desktop view. I am only able to find the code to change the style such as
borderColor
borderRadius
borderWidth
color
Anyone know where to find the code or how to do this? TYIA
Hi there,
It's not currently possible to change the shipping cart icon's styling properties with code. You can view the elements that expose the style property here.
However, as a workaround, you can add a second cart icon and style it with the editor tools. You can then set it to be hidden on load through the properties panel and choose to show the new cart icon on mobile only using the formFactor API while hiding the primary cart icon.
Example:
import wixWindow from 'wix-window'; $w.onReady(function () { if (wixWindow.formFactor === "Mobile") { $w("#shoppingCartIcon2").show(); $w("#shoppingCartIcon1").hide(); } });
You can check out the article link below for more information:
Corvid Tutorial: Displaying Elements in Mobile Only
I hope this helps you out!
Best regards,
Miguel