A user wanted to replace the default share button icon on a Dawn theme product page but encountered an unwanted underline extending into the space between the custom icon and “Share” text.
Initial Problem:
Adding spaces using in share.liquid created the desired spacing but caused the underline to extend across those spaces
The user could change the icon but couldn’t achieve proper spacing without the underline issue
Solution Provided:
Instead of using HTML spaces, the fix involved:
Adding custom CSS to theme.liquid before the </head> tag
Using CSS to control icon margin (margin-right) rather than text spacing
Removing text decoration from the space area using .share-button__button .icon-share styling
Outcome:
The solution successfully removed the unwanted underline while maintaining proper spacing
The thread was marked as resolved
A follow-up question was posted asking how to change the share icon itself, but remains unanswered
Summarized with AI on October 31.
AI used: claude-sonnet-4-5-20250929.
I already know how to change the icon for the share button on the product page, but there’s an issue… I space issue between the icon and share text. I can get a space between the icon and the text, but the underline starts right at the icon. I want “Icon space Share” See images below.
Green arrow shows unwanted underline:
This default dawn theme share button:
So how can I change to my icon and have the proper space/text between them?
Sorry, you might misunderstood the my question… I can change the spacing. its the underline after changing to my icon… please check my website again and put a space with my icons that’s now active. you’ll see the underline continuing after the icon. id like that space underline gone
You are increasing the space between the icon and the ‘Share’ text by adding spaces at the beginning of the text. However, this method is not ideal and, as you can see, it adds an underline to the spaces as well. Instead, to adjust the spacing between the icon and the text, you should use my approach: adjust the margin for the icon. Do you understand?