The logo .png I uploaded to my site is originally white. I know these can't be "adaptive" since it's an image, but I was hoping I could implement a code that can invert it automatically when the first sections color theme is selected (similar to how adaptive text works). I'm trying to refrain from using any kind of block, section, or collection ID to do this.
I have tried this:
[data-theme-color="var(--lightest)"] .header-title-logo img,
[data-theme-color="var(--light)"] .header-title-logo img {
filter: invert(100%);
}
I've also tried code injection and html but nothing. Hopefully Squarespace can make this more flexible in the future!
On another note, when I do use the section ID, how can I get it to only invert on the desktop and mobile, but not in mobile nav?
How do you invert logo color on specific color themes?
in Customize with code
Posted · Edited by morgantaylr
wrong link
The logo .png I uploaded to my site is originally white. I know these can't be "adaptive" since it's an image, but I was hoping I could implement a code that can invert it automatically when the first sections color theme is selected (similar to how adaptive text works). I'm trying to refrain from using any kind of block, section, or collection ID to do this.
I have tried this:
[data-theme-color="var(--lightest)"] .header-title-logo img,
[data-theme-color="var(--light)"] .header-title-logo img {
filter: invert(100%);
}
I've also tried code injection and html but nothing. Hopefully Squarespace can make this more flexible in the future!
On another note, when I do use the section ID, how can I get it to only invert on the desktop and mobile, but not in mobile nav?
https://sandbar-demo.squarespace.com/
password: demo
Thank you!