Jump to content

Adaptive Color/Negative Text

Go to solution Solved by Beyondspace,

Recommended Posts

Hola!

On my two pages of portfolio work I have titles that have a photo appear in the background that coincide with that project. The issue I'm running into is that because my website background is light colored, I need the text to be dark. But when hovering over these titles and the photos appear in the background, it makes it difficult to read the titles. Is there a way to make the text reactive to what is behind it? Essentially like a "negative" filter on the text.

Here's my website and you can find this problem I'm running into under the "video' and "photo" tabs.

https://www.raphevaldez.com

Thank you for any help in advance!

Link to comment
  • Solution
6 hours ago, Raphe said:

Hola!

On my two pages of portfolio work I have titles that have a photo appear in the background that coincide with that project. The issue I'm running into is that because my website background is light colored, I need the text to be dark. But when hovering over these titles and the photos appear in the background, it makes it difficult to read the titles. Is there a way to make the text reactive to what is behind it? Essentially like a "negative" filter on the text.

Here's my website and you can find this problem I'm running into under the "video' and "photo" tabs.

https://www.raphevaldez.com

Thank you for any help in advance!

You can try the following code to apply on 'video' page

#collection-64edb32dd2ca53635d0cce00 .portfolio-hover-base:has([data-active="true"]) + .portfolio-hover-items .portfolio-hover-item-content{
  color: #fff;
}

 

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

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
17 hours ago, Beyondspace said:

You can try the following code to apply on 'video' page

#collection-64edb32dd2ca53635d0cce00 .portfolio-hover-base:has([data-active="true"]) + .portfolio-hover-items .portfolio-hover-item-content{
  color: #fff;
}

 

This worked perfectly! What do I need to add/change to make it work on the "photo" page as well? Thank you so so much for your help!

Link to comment
On 6/9/2024 at 3:52 PM, Raphe said:

This worked perfectly! What do I need to add/change to make it work on the "photo" page as well? Thank you so so much for your help!

You can repeat the code with new id, it should be

body#collection-64edb2eaf8f57d12ed53e99a .portfolio-hover-base:has([data-active="true"]) + .portfolio-hover-items .portfolio-hover-item-content{
  color: #fff;
}

 

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.