Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Header: Automatically change blocks color depending on the background #56327

Open
beafialho opened this issue Nov 20, 2023 · 1 comment
Open
Labels
[Block] Template Part Affects the Template Parts Block Needs Design Feedback Needs general design feedback. Needs Technical Feedback Needs testing from a developer perspective. [Type] Enhancement A suggestion for improvement.

Comments

@beafialho
Copy link

What problem does this address?

Currently, when I want to design a theme with a full width cover containing a header, if the background is dark I add a white site title and/or site logo. But that means I can't use the same header in other pages if the background is white, because the colors set in the header aren't black, they're always the same. Here are screenshots of what I mean:

Home template with cover Page template with same header
Single Post (Featured Image) Single Page
Single Post (Featured Image) Single Page

Right now, the way to work this issue around is to create two headers, one for each background color, but that can be very confusing for users. It also takes extra work to update two navigations, instead of one, etc.

What is your proposed solution?

Ideally the site title (and any block in the header) should automatically change color depending on the background, as this website does when we scroll down. For the site logo, I can imagine adding an option to load two logo variations: one light and one dark so that this automatic color change works.

The same thing I just described for the footer can also happen, although it is not as common as a pattern as this one.

Or could this work similarly to Figma components where we'd have the same header but are able to apply different colors to its elements depending on the template. I have no idea if this is technically doable, just throwing in a potential idea.

@beafialho beafialho added [Type] Enhancement A suggestion for improvement. Needs Design Feedback Needs general design feedback. Needs Technical Feedback Needs testing from a developer perspective. [Block] Template Part Affects the Template Parts Block labels Nov 20, 2023
@tellthemachines
Copy link
Contributor

This sounds like something that could be solved by #57537, specifically the extension of block style variations for section styling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Template Part Affects the Template Parts Block Needs Design Feedback Needs general design feedback. Needs Technical Feedback Needs testing from a developer perspective. [Type] Enhancement A suggestion for improvement.
2 participants