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

Assumptions about text color within any block that "has-tertiary-background-color" mean manual color palette selection is ignored #627

Closed
SoYoureAWaffleMan opened this issue Dec 27, 2020 · 2 comments

Comments

@SoYoureAWaffleMan
Copy link

Style rules written into GO css prevent the user from choosing what color text goes e.g. on a button or inside a cover block.

I would expect a button with the class "has-tertiary-background-color" to inherit the tertiary background color with no change in text color, but when I set the BG to "tertiary" the following rule is applied as well:

:root .has-tertiary-background-color, :root .has-tertiary-background-color a:not(.wp-block-button__link) {
    color: var(--go-heading--color--text);
}

I don't understand why the heading color is applied so liberally, shouldn't it only apply to headings? And why add the second selector when the first one has already changed the color of the button -> anchor element?

Same with text in cover blocks where this rule overrides a color chosen from the palette :

.wp-block-cover.has-tertiary-background-color p {
    color: var(--go--color--primary);
}

Same thing - I don't understand why this is desired behaviour, and it surely shouldn't prevent changing text color via the palette.

As I don't understand the intended behaviour I can only suggest these rules are removed. Please correct me if I'm missing something.

Demo here https://movema.cloudaccess.host/test-page-for-go-tertiary-issues

Apologies for the nasty green-on-red!

Screenshot: editor (good)

Screenshot from 2020-12-27 18-48-21

Screenshot: outcome (confusing)

Screenshot from 2020-12-27 18-51-01

@richtabor
Copy link
Contributor

@SoYoureAWaffleMan Thanks for the detailed report, I'm looking into it.

The main reason I have set the tertiary color to apply a heading text color, is that the core style application is white, regardless of the background color applied. There does need to be better checks for when colors are applied to text within the blocks.

@jrtashjian
Copy link
Member

Closing this issue as it will be addressed in the Full Site Editing work currently underway in Go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants