Skip to content

Section styles: editing a block variation in Styles doesn't reflect in the editor #62303

@annezazu

Description

@annezazu

While recording a demo of section styles with 6.6 beta 1, I noticed that while I could change the variation in Styles, the changes would update on the front end of the site but would revert in the editor after hitting save. Here's a video showing front end vs back end:

section.styles.editor.bug.mov

Here's the demo video I was working on for good measure:

bug.in.section.styles.mp4

Here's the theme.json:

	"styles": {
		"blocks": {
			"variations": {
				"Dark": {
					"blockTypes": [
						"core/group",
						"core/columns"
					],
					"color": {
						"background": "#1e1e1e",
						"text": "#FFF"
					},
					"elements": {
						"heading": {
							"color": {
								"text": "#FFF"
							}
						}
					}
				}
			}
		}
	}

I am assuming this is likely because I'm adding an element style to the variation (button in this case) but that doesn't explain why the Heading doesn't update. This could very well be user error but wanted to report just in case cc @aaronrobertshaw

Metadata

Metadata

Labels

[Feature] Block VariationsBlock variations, including introducing new variations and variations as a feature[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

No type
No fields configured for issues without a type.

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions