Jump to content

How to make the cart icon active on navigation?

Recommended Posts

Site URL: https://nonagon-accordion-zx5m.squarespace.com/

Hi, i'm trying to make all the navigation links bold when hover and when active. I've achieved it but the cart icon it resists to appear bold when its active.

I've added this css so far:

/* Nav item hover color */
.header-nav-item>a:hover {
    font-weight: 600 !important;
}
.header-nav-folder-item:hover a {
    font-weight: 600 !important;
}
/* Nav item active color */
.header-nav-item--active a {
    font-weight: 600 !important;
}

/* cart */
.header-actions-action--cart .icon--cart:hover .icon--cart {
    stroke-width: 2px !important;
}

.header-actions-action--cart .icon--cart--active .icon--cart {
    stroke-width: 2px !important;
}

/* Remove Navigation Link Underline */
.header-nav-item--active a{
  background: unset !important;
}

And this code injection in header:

<style>
#header a:active{
 font-weight: 600 !important;
}

#header a:hover{
 font-weight: 600 !important;
}

div.folder.active{
 font-weight: 600 !important;
}

</style>

Link to comment
  • Replies 1
  • Views 589
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

On 7/16/2021 at 4:44 PM, elasticalva said:

Site URL: https://nonagon-accordion-zx5m.squarespace.com/

Hi, i'm trying to make all the navigation links bold when hover and when active. I've achieved it but the cart icon it resists to appear bold when its active.

I've added this css so far:

/* Nav item hover color */
.header-nav-item>a:hover {
    font-weight: 600 !important;
}
.header-nav-folder-item:hover a {
    font-weight: 600 !important;
}
/* Nav item active color */
.header-nav-item--active a {
    font-weight: 600 !important;
}

/* cart */
.header-actions-action--cart .icon--cart:hover .icon--cart {
    stroke-width: 2px !important;
}

.header-actions-action--cart .icon--cart--active .icon--cart {
    stroke-width: 2px !important;
}

/* Remove Navigation Link Underline */
.header-nav-item--active a{
  background: unset !important;
}

And this code injection in header:

<style>
#header a:active{
 font-weight: 600 !important;
}

#header a:hover{
 font-weight: 600 !important;
}

div.folder.active{
 font-weight: 600 !important;
}

</style>

Hi. I don't see cart icon on header. Can you enable it?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

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.