Skip to content

Add theme.json support for style previews for theme authors #60478

@bgardner

Description

@bgardner

What problem does this address?

Given #59514 and the conversation in #59444, I think we should allow theme authors to use theme.json to set specific colors that would be given priority over the fallbacks (text color) and (button color/link color). With the merged PR, my Powder theme will result in this, which is less than helpful.

image

What is your proposed solution?

Add support in theme.json for something like this:

{
	"settings": {
		"example": [
			{
				"colors": [ "#0a0a0a", "#6d28d9" ]
			}
		]
	}
}

cc: @richtabor @justintadlock @spencerfinnell

Metadata

Metadata

Assignees

No one assigned

    Labels

    Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.[Type] EnhancementA suggestion for improvement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions