- This topic has 13 replies, 3 voices, and was last updated 4 years, 10 months ago by
Tom.
-
AuthorPosts
-
May 31, 2021 at 4:48 am #1804401
Andy
Hi,
I’m trying to recreate a similar effect that this site has on it’s social media links at the bottom of the page and apply it to my main navigation links:
https://tinyurl.com/8785bvvzBasically its color changes as you scroll based on the colors of the background-image.
I’ve tried using mix-blend-mode:difference; on various elements on my navigation such as:
.main-navigation or .main-navigation .main-nav ul li or .main-navigation .main-nav ul li a but nothing seems to take effect.Any advice appreciated.
May 31, 2021 at 9:21 am #1804874Ying
StaffCustomer SupportHi Andy,
For the question that’s purely about GB, could you please open the topic in its own support froum?
Pro version: https://generateblocks.com/support/
Free version: https://wordpress.org/plugins/generateblocks/Thanks for your understanding!
May 31, 2021 at 12:46 pm #1805096Andy
Hi,
I’m not sure I understand the main nav is generated by GP not GB?May 31, 2021 at 1:27 pm #1805133Ying
StaffCustomer SupportOops, I misread your question, sorry for that!
In order to make
mix-blend-mode:difference;work, the background color of the header needs to be set to transparent, then set the menu item link color to#ffffff.Then add this CSS:
header#masthead .main-navigation { mix-blend-mode: difference; }June 6, 2021 at 5:27 am #1812113Andy
Thanks so much for this, it’s working now.
However, on the pages under the ‘Work’ menu for some reason it’s not working, I think its because of this CSS:
.header-wrap #site-navigation:not(.toggled) .main-nav > ul > li > a { color:##0a0a0a; }
But I can’t figure what is generating this css?
June 6, 2021 at 11:02 am #1812539Ying
StaffCustomer SupportLooks like you have a Header element assigned to these pages, but the header element is empty, only the background color shows.
If there’s no content in the header element, I would recommend removing it.
Let me know if this helps 🙂
June 7, 2021 at 7:16 am #1813365Andy
Thanks, I needed custom headers on certain pages so I changed the nav color settings to white in the header options and that seems to have fixed it.
I still cant get the same effect to work on the Contact link though. Tried adding the following CSS:
header#masthead .menu-bar-item a {
mix-blend-mode: difference;
}However, in the Customizer settings, under the Color > Header options I’ve tried changing the color of links to white but that didnt work. I’ve temporarily changed it to ##d8d8d8 just so you can see it. But any ideas how I can get the mix-blend-mode working on this too?
June 7, 2021 at 9:50 am #1813751Ying
StaffCustomer SupportTry this CSS instead and set its color to
#ffffff:.menu-bar-item.slideout-toggle { mix-blend-mode: difference; }Let me know 🙂
June 7, 2021 at 12:23 pm #1813881Andy
Hmm its strange, whenever I add that CSS it makes the rest of the navigation links white and stops the mix-blend mode from working on them.
June 7, 2021 at 12:31 pm #1813885Ying
StaffCustomer SupportThe CSS is only targeting the menu bar item, regardless it won’t affect other menu items.
I tested in dev tool, it works well.
https://www.screencast.com/t/DJlcuTxdgTN3Could you add the CSS in first? I’ll take a look at the code then.
June 7, 2021 at 12:41 pm #1813891Andy
ok I’ve added the code and now you’ll see all the links are not visible.
June 8, 2021 at 8:53 am #1815129Tom
Lead DeveloperLead DeveloperHi there,
Is this still the case? Things look good to me?
Let us know 🙂
June 8, 2021 at 12:59 pm #1815378Andy
I think something odd has been going on with the server cache and it was effecting my CSS, its working great for me now too.
Thanks so much for all the help with this!
June 10, 2021 at 9:07 am #1817740Tom
Lead DeveloperLead DeveloperGlad it’s working now 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.