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

Default theme.json: The definition of styles.elements.button.spacing.padding is incorrect #60404

Closed
t-hamano opened this issue Apr 3, 2024 · 1 comment · Fixed by #57374
Closed
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Developer Documentation Documentation for developers [Type] Enhancement A suggestion for improvement.

Comments

@t-hamano
Copy link
Contributor

t-hamano commented Apr 3, 2024

What problem does this address?

For styles.elements.button.spacing.padding in theme.json, only objects with fields top, right, bottom, and left are allowed. However, the default theme.json specifies a string. Therefore, the code editor reports this field as an error.

image

What is your proposed solution?

It actually seems to work correctly with a string, but I think one of the following improvements is needed.

  • Rewrite to object in default theme.json
  • If the specification is expected to accept a string, update the JSON schema
@t-hamano t-hamano added [Type] Enhancement A suggestion for improvement. [Type] Developer Documentation Documentation for developers Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json labels Apr 3, 2024
@ramonjd
Copy link
Member

ramonjd commented Apr 3, 2024

Upcoming fix for this already in https://github.com/WordPress/gutenberg/pull/57374/files#diff-ba57fd27dc15a6079df31427f442f760cbe4035a941cfb1a4763c7cf90766b15R300

@t-hamano t-hamano linked a pull request Apr 3, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Developer Documentation Documentation for developers [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants