Skip to content

Post terms color in theme.json ignored if element link color is set #66651

@bradhogan

Description

@bradhogan

Description

The core/post-terms color is being overwritten by the element link.

Step-by-step reproduction instructions

In your theme.json, add:

"styles": {
	"elements": {
		"link": {
			"color": {
				"text": "var(--wp--preset--color--contrast)"
			}
		}
	}
	"blocks": {
		"core/post-terms": {
			"color": {
				"text": "var(--wp--preset--color--accent)"
			}
		}
	}
}

Swap out the variables to whatever your theme uses.

Add a post terms block and notice the terms as links use the element link color and not the block core/post-terms color.

Screenshots, screen recording, code snippet

No response

Environment info

  • wp 6.6.2
  • gutenberg 19.5.0
  • chrome
  • mac

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Type] BugAn existing feature does not function as intended

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions