Jump to content

Multiply section box shadow without affecting child elements

Go to solution Solved by Ziggy,

Recommended Posts

I have a box-shadow applied to this sticky top page section. I want the box shadow to have a "multiply" blend mode over sections that scroll up behind it. When I add mix-blend-mode: multiply; to the individual page header injection it also multiplies the text block within the section, rendering it unreadable. Does anyone know a way to prevent the text block from also multiplying?

 

without mix-blend-mode: multiply  added to section box-shadow

Nomultiply.png.d3d7f18939966b7a3dc9692abebac120.png

 

with mix-blend-mode: multiply added to section box-shadow

mix-blend-mode_multiply.png.0da143d258d94295114861c247343c7b.png

Link to comment
52 minutes ago, THDesign said:

with mix-blend-mode: multiply added to section box-shadow

I guess this is applying to everything not just the box shadow, but it's just a guess because I can't see your website or code, could you share both please?

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️ Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment
7 hours ago, THDesign said:

This is the closest I can find on the subject, but I'm not sure how to translate it to my situation. 

Not sure this is helpful.

The easiest way to fix this would be to use a different rgba value, try rgba(0, 0, 0, 0.7)

Or you could use a pseudo element so you can use the blend mode on just that element, something like this:

/*NAV SECTION DROP SHADOW*/
section[data-section-id="66747049f3abb2025cbd195e"]:before {
  content:'';
  width:100%;
  height:100%;
  position:absolute;
  box-shadow: 0px 5px 12px rgba(100, 100, 100, 0.7);
  mix-blend-mode: multiply;
}

Let me know how you get on!

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️ Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment
  • Solution

Try this adjustment:

/*NAV SECTION DROP SHADOW*/
section[data-section-id="66747049f3abb2025cbd195e"]:before {
  content:'';
  width:100%;
  height:100%;
  position:absolute;
  top:0;
  left:0;
  box-shadow: 0px 5px 12px rgba(0, 0, 0, 0.5);
  mix-blend-mode: multiply;
}

 

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️ Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

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.