Jump to content

Safari is adding a black underline on my links

Go to solution Solved by Square_Ace,

Recommended Posts

Site URL: https://gardenia-pumpkin-ekbe.squarespace.com/homebuying-incentive

Safari is adding a black underline to my links and that is covering my CSS hyperlink styles (light blue and on hover turns to very dark blue). 

 https://gardenia-pumpkin-ekbe.squarespace.com/homebuying-incentive

code: 1234

 

I have the links set to light blue in site styles and added "!important" to my code but I can't seem to get rid of that black underline. 

At first I thought my CSS wasn't reading at all for Safari, but when I zoomed in, I could see the light blue was there but it's covered by a black line. 

Current CSS: 

a {
  text-decoration-color: #1ABFDC !important;
  text-decoration-thickness: 2px !important;
}

a:hover {
  text-decoration-color: #07263E !important;
}

Any help is greatly appreciated! 

 

Screenshot 2024-10-15 at 11.47.36 AM.png

Screenshot 2024-10-15 at 11.48.05 AM.png

Edited by KMills
Link to comment

Hi, try this in your Custom CSS:

span[class^="sqsrte-text-color--"] {
  text-decoration: none
}

Hope that helps.

Square Ace

Enhancing Squarespace websites for over a decade. I am an expert in writing custom code for the Squarespace platform.
Tailor-made, reusable solutions to your problems, whether it's styling, layout or functionality.
Maverick Squarespace Designers, I'll be your Goose. If your tools are holding back your creative vision, maybe I can help.
I also build useful plugins for Squarespace (with some really positive reviews) including the popular high-quality video background plugin.

Link to comment

@Square_Ace - Thank you! That did in fact remove those pesky black lines. It is now giving me my solid light blue color but not achieving my hover effect of turning the line to dark blue. Is there some safari specific code that needs to be included? 

 

a {
text-decoration-color: #1ABFDC !important;
  text-decoration-thickness: 2px !important;
}

a:hover {
  text-decoration-color: #07263E !important;
}

span[class^="sqsrte-text-color--"] {
  text-decoration: none
}
 

Link to comment
  • Solution

Hi, I don't know of a fix for this. Safari sometimes acts differently - it's not as easy to code for as Chrome.

I think there's a simpler way to do this though. If you want all text links in your 'Lightest 1' palette sections (i.e with white background) to have black text and a blue underline, then remove the black text color you added to the links first. You can do this by selecting them and clicking on the color button where you added it in the first place and clicking the black colour again (this should toggle it off). This will make your links blue again as this is the default color.

Now go to your color palette editor and edit the Lightest 1 palette. Scroll down to the Links colors and change text links to black. Your links will now be black with blue underlines.

Now in your custom CSS remove the code I previously gave you:

span[class^="sqsrte-text-color--"] {
  text-decoration: none
}

Your existing custom CSS specifies that links should have a blue underline, so keep that, and it should function as you want it to.

 

Square Ace

Enhancing Squarespace websites for over a decade. I am an expert in writing custom code for the Squarespace platform.
Tailor-made, reusable solutions to your problems, whether it's styling, layout or functionality.
Maverick Squarespace Designers, I'll be your Goose. If your tools are holding back your creative vision, maybe I can help.
I also build useful plugins for Squarespace (with some really positive reviews) including the popular high-quality video background plugin.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.