Jump to content

I need help making primary buttons fade to background color using code

Recommended Posts

Here is the custom CSS for my buttons:

 

.sqs-block-button
.sqs-button-element--primary {
    background-color: #d43f4c;
    border-color: #d43f4c;
    color: #000000;
}

.sqs-block-button
.sqs-button-element--secondary {
    background-color: #000000;
    border-color: #d43f4c;
    color: #d43f4c;
}

.sqs-block-button
.sqs-button-element--tertiary {
    background-color: #000000;
    border-color: #d43f4c;
    color: #d43f4c;
}

.sqs-block-button
.sqs-button-element--primary:hover {
    background-color: #000000;
    color: #d43f4c;
    border-color: #d43f4c;
}

.sqs-block-button
.sqs-button-element--secondary:hover {
    background-color: #d43f4c;
    color: #000000;
    border-color: #d43f4c;
}

.sqs-block-button
.sqs-button-element--tertiary:hover {
    background-color: #d43f4c;
    color: #000000;
    border-color: #d43f4c;
}

 

Secondary and Tertiary buttons fade to the corresponding background color by default without setting a fade animation. The primary would not fade no matter what code I wrote.

As long as I can get all button types to consistently fade, or not fade is fine with me. Here are the buttons.

image.png.d0266785ef722bba6472173c3b171887.png

Link to comment
  • Replies 3
  • Views 975
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

14 hours ago, Hubris3D said:

Here is the custom CSS for my buttons:

 

.sqs-block-button
.sqs-button-element--primary {
    background-color: #d43f4c;
    border-color: #d43f4c;
    color: #000000;
}

.sqs-block-button
.sqs-button-element--secondary {
    background-color: #000000;
    border-color: #d43f4c;
    color: #d43f4c;
}

.sqs-block-button
.sqs-button-element--tertiary {
    background-color: #000000;
    border-color: #d43f4c;
    color: #d43f4c;
}

.sqs-block-button
.sqs-button-element--primary:hover {
    background-color: #000000;
    color: #d43f4c;
    border-color: #d43f4c;
}

.sqs-block-button
.sqs-button-element--secondary:hover {
    background-color: #d43f4c;
    color: #000000;
    border-color: #d43f4c;
}

.sqs-block-button
.sqs-button-element--tertiary:hover {
    background-color: #d43f4c;
    color: #000000;
    border-color: #d43f4c;
}

 

Secondary and Tertiary buttons fade to the corresponding background color by default without setting a fade animation. The primary would not fade no matter what code I wrote.

As long as I can get all button types to consistently fade, or not fade is fine with me. Here are the buttons.

image.png.d0266785ef722bba6472173c3b171887.png

Can you share your URL so I can check it?

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - Lightbox captions only mode)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 No-code customisations for Squarespace
🚀 Learn how to rank new pages on Google in 48 hours!

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

Link to comment
11 hours ago, Beyondspace said:

Can you share your URL so I can check it?

Hey, thanks for the reply. My website is not live at the moment. I have not resolved the issue, but I opted to use the flex animation instead and that worked out for me.

Link to comment
Posted (edited)

If you still need help, kindly provide a password for your site. Share it so we can check it easier

https://support.squarespace.com/hc/en-us/articles/205815528-Site-wide-passwords

 

Edited by Beyondspace

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - Lightbox captions only mode)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 No-code customisations for Squarespace
🚀 Learn how to rank new pages on Google in 48 hours!

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. 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.