Skip to content

theme.json schema change for spacingScale.steps warns about valid value 0 #62561

@mrwweb

Description

@mrwweb

Description

The documented way to turn off the spacing scale (see "Disable the spacing scale" section) is to set settings.spacing.spacingScale.steps to 0.

In VS Code, that now produces the warning:

Value is below the minimum of 1.

I don't think it's directly relevant, but the recently filed #62520 is also about changes to theme.json schema impacting valid spacing values.

Step-by-step reproduction instructions

  1. Create a theme.json file
  2. Use the following value and observe a warning for the value "0" on line 7 in VS Code
{
	"$schema": "https://schemas.wp.org/trunk/theme.json",
	"version": 2,
	"settings": {
		"spacing": {
			"spacingScale": {
				"steps": 0
			}
		}
	}
}

Screenshots, screen recording, code snippet

No response

Environment info

  • WordPress 6.5
  • No Gutenberg
  • Custom hybrid theme
  • VS Code

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

Yes

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

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] LayoutLayout block support, its UI controls, and style output.[Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.[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