WordPress / WordPress/create-block-theme

Not allowed "theme" property added to settings.spacing.spacingScale

Open
#741 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug theme.json
Dominant language
JavaScript
Stars
417
Forks
66
PR merge metrics
No merged PRs in 30d

Description

If a spacing scale is defined in settings.spacing.spacingScale and if the user saves its theme to files from the site editor, a theme property is added to spacingScale as a child. It does not break the theme but the property is not allowed by schema ("Property theme is not allowed.").

Identified bug:

"spacingScale": {
	"theme": {
		"increment": 16,
		"mediumStep": 32,
		"operator": "+",
		"steps": 7,
		"unit": "px"
	}
},

Should be:

"spacingScale": {
	"increment": 16,
	"mediumStep": 32,
	"operator": "+",
	"steps": 7,
	"unit": "px"
},

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce saving a theme with a spacing scale from the site editor, then trace how settings.spacing.spacingScale is serialized into theme files. Done means the saved spacingScale contains increment, mediumStep, operator, steps, and unit directly, without a nested theme property, and passes schema validation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.