Skip to content

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

@SoYoureAWaffleMan

Description

@SoYoureAWaffleMan

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions