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

theme.json schema: ref is not supported #45889

Closed
mikachan opened this issue Nov 18, 2022 · 0 comments · Fixed by #45897
Closed

theme.json schema: ref is not supported #45889

mikachan opened this issue Nov 18, 2022 · 0 comments · Fixed by #45897
Assignees
Labels
Developer Experience Ideas about improving block and theme developer experience

Comments

@mikachan
Copy link
Member

Description

In #41696, we added the ability to reference values from other locations in the tree. However, currently, this isn't valid theme.json markup because the reference is an object rather than a string.

Step-by-step reproduction instructions

Add the following markup to a theme.json file:

		"elements": {
			"button": {
				"color": {
					"background": {
						"ref": "styles.color.text"
					},
					"text": {
						"ref": "styles.color.background"
					}
				}
			}
		}

You should see a warning in your text editor that the ref is an incorrect type (Incorrect type. Expected "string".).

Screenshots, screen recording, code snippet

No response

Environment info

No response

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

@mikachan mikachan added the Developer Experience Ideas about improving block and theme developer experience label Nov 18, 2022
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Nov 18, 2022
@priethor priethor removed the [Status] In Progress Tracking issues with work in progress label Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Developer Experience Ideas about improving block and theme developer experience
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants