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

Saving block spacing settings adds code under theme.json settings #388

Closed
carolinan opened this issue Jun 2, 2023 · 1 comment
Closed

Comments

@carolinan
Copy link

carolinan commented Jun 2, 2023

When you go to the Site Editor > Styles sidebar > Blocks > Dimension panel, spacing, and adjust settings like padding and margin, and then open the plugin sidebar and select "Save changes", code is added under theme.json settings, not only styles.

This can be reproduced with any block theme.

  1. Open the Styles sidebar and the blocks panel. Select the paragraph block.
  2. Add any color to the paragraph text, background and link. Save the style changes through the regular site editor save option, as well as the plugin sidebar "save changes" option.
  3. Open theme.json: confirm that the colors are correctly added to styles > blocks > paragraph.
  4. Next, change the typography options. Save, and view the changes to theme.json: Confirm that the styles are applied correctly.
  5. Now change padding and margin. Save, and view theme.json.

Confirm that the spacing is correctly added under styles.
View settings.
Confirm that all the theme.json settings are now duplicated under settings > blocks > paragraph.

Here is the resulting theme.json of Twenty Twenty Two:

{
	"customTemplates": [
		{
			"name": "blank",
			"postTypes": [
				"page",
				"post"
			],
			"title": "Blank"
		},
		{
			"name": "page-large-header",
			"postTypes": [
				"page"
			],
			"title": "Page (Large Header)"
		},
		{
			"name": "single-no-separators",
			"postTypes": [
				"post"
			],
			"title": "Single Post (No Separators)"
		},
		{
			"name": "page-no-separators",
			"postTypes": [
				"page"
			],
			"title": "Page (No Separators)"
		}
	],
	"settings": {
		"appearanceTools": true,
		"blocks": {
			"core/paragraph": {
				"appearanceTools": true,
				"color": {
					"background": true,
					"custom": true,
					"customDuotone": true,
					"customGradient": true,
					"defaultDuotone": true,
					"defaultGradients": true,
					"defaultPalette": true,
					"duotone": [
						{
							"colors": [
								"#000000",
								"#ffffff"
							],
							"name": "Foreground and background",
							"slug": "foreground-and-background"
						},
						{
							"colors": [
								"#000000",
								"#ffe2c7"
							],
							"name": "Foreground and secondary",
							"slug": "foreground-and-secondary"
						},
						{
							"colors": [
								"#000000",
								"#f6f6f6"
							],
							"name": "Foreground and tertiary",
							"slug": "foreground-and-tertiary"
						},
						{
							"colors": [
								"#1a4548",
								"#ffffff"
							],
							"name": "Primary and background",
							"slug": "primary-and-background"
						},
						{
							"colors": [
								"#1a4548",
								"#ffe2c7"
							],
							"name": "Primary and secondary",
							"slug": "primary-and-secondary"
						},
						{
							"colors": [
								"#1a4548",
								"#f6f6f6"
							],
							"name": "Primary and tertiary",
							"slug": "primary-and-tertiary"
						}
					],
					"gradients": [
						{
							"gradient": "linear-gradient(to bottom,var(--wp--preset--color--secondary) 0%,var(--wp--preset--color--tertiary) 100%)",
							"name": "Vertical secondary to tertiary",
							"slug": "vertical-secondary-to-tertiary"
						},
						{
							"gradient": "linear-gradient(to bottom,var(--wp--preset--color--secondary) 0%,var(--wp--preset--color--background) 100%)",
							"name": "Vertical secondary to background",
							"slug": "vertical-secondary-to-background"
						},
						{
							"gradient": "linear-gradient(to bottom,var(--wp--preset--color--tertiary) 0%,var(--wp--preset--color--background) 100%)",
							"name": "Vertical tertiary to background",
							"slug": "vertical-tertiary-to-background"
						},
						{
							"gradient": "linear-gradient(to bottom right,var(--wp--preset--color--primary) 0%,var(--wp--preset--color--foreground) 100%)",
							"name": "Diagonal primary to foreground",
							"slug": "diagonal-primary-to-foreground"
						},
						{
							"gradient": "linear-gradient(to bottom right,var(--wp--preset--color--secondary) 50%,var(--wp--preset--color--background) 50%)",
							"name": "Diagonal secondary to background",
							"slug": "diagonal-secondary-to-background"
						},
						{
							"gradient": "linear-gradient(to bottom right,var(--wp--preset--color--background) 50%,var(--wp--preset--color--secondary) 50%)",
							"name": "Diagonal background to secondary",
							"slug": "diagonal-background-to-secondary"
						},
						{
							"gradient": "linear-gradient(to bottom right,var(--wp--preset--color--tertiary) 50%,var(--wp--preset--color--background) 50%)",
							"name": "Diagonal tertiary to background",
							"slug": "diagonal-tertiary-to-background"
						},
						{
							"gradient": "linear-gradient(to bottom right,var(--wp--preset--color--background) 50%,var(--wp--preset--color--tertiary) 50%)",
							"name": "Diagonal background to tertiary",
							"slug": "diagonal-background-to-tertiary"
						}
					],
					"palette": [
						{
							"color": "#000000",
							"name": "Foreground",
							"slug": "foreground"
						},
						{
							"color": "#ffffff",
							"name": "Background",
							"slug": "background"
						},
						{
							"color": "#1a4548",
							"name": "Primary",
							"slug": "primary"
						},
						{
							"color": "#ffe2c7",
							"name": "Secondary",
							"slug": "secondary"
						},
						{
							"color": "#F6F6F6",
							"name": "Tertiary",
							"slug": "tertiary"
						}
					],
					"text": true
				},
				"custom": {
					"spacing": {
						"large": "clamp(4rem, 10vw, 8rem)",
						"medium": "clamp(2rem, 8vw, calc(4 * var(--wp--style--block-gap)))",
						"outer": "var(--wp--custom--spacing--small, 1.25rem)",
						"small": "max(1.25rem, 5vw)"
					},
					"typography": {
						"font-size": {
							"colossal": "clamp(3.25rem, 8vw, 6.25rem)",
							"gigantic": "clamp(2.75rem, 6vw, 3.25rem)",
							"huge": "clamp(2.25rem, 4vw, 2.75rem)"
						},
						"line-height": {
							"medium": 1.3999999999999999,
							"normal": 1.6000000000000001,
							"small": 1.2,
							"tiny": 1.1499999999999999
						}
					}
				},
				"layout": {
					"contentSize": false,
					"definitions": {
						"constrained": {
							"baseStyles": [
								{
									"rules": {
										"float": "left",
										"margin-inline-end": "2em",
										"margin-inline-start": "0"
									},
									"selector": " > .alignleft"
								},
								{
									"rules": {
										"float": "right",
										"margin-inline-end": "0",
										"margin-inline-start": "2em"
									},
									"selector": " > .alignright"
								},
								{
									"rules": {
										"margin-left": "auto !important",
										"margin-right": "auto !important"
									},
									"selector": " > .aligncenter"
								},
								{
									"rules": {
										"margin-left": "auto !important",
										"margin-right": "auto !important",
										"max-width": "var(--wp--style--global--content-size)"
									},
									"selector": " > :where(:not(.alignleft):not(.alignright):not(.alignfull))"
								},
								{
									"rules": {
										"max-width": "var(--wp--style--global--wide-size)"
									},
									"selector": " > .alignwide"
								}
							],
							"className": "is-layout-constrained",
							"name": "constrained",
							"slug": "constrained",
							"spacingStyles": [
								{
									"rules": {
										"margin-block-start": "0"
									},
									"selector": " > :first-child:first-child"
								},
								{
									"rules": {
										"margin-block-end": "0"
									},
									"selector": " > :last-child:last-child"
								},
								{
									"rules": {
										"margin-block-end": "0",
										"margin-block-start": null
									},
									"selector": " > *"
								}
							]
						},
						"default": {
							"baseStyles": [
								{
									"rules": {
										"float": "left",
										"margin-inline-end": "2em",
										"margin-inline-start": "0"
									},
									"selector": " > .alignleft"
								},
								{
									"rules": {
										"float": "right",
										"margin-inline-end": "0",
										"margin-inline-start": "2em"
									},
									"selector": " > .alignright"
								},
								{
									"rules": {
										"margin-left": "auto !important",
										"margin-right": "auto !important"
									},
									"selector": " > .aligncenter"
								}
							],
							"className": "is-layout-flow",
							"name": "default",
							"slug": "flow",
							"spacingStyles": [
								{
									"rules": {
										"margin-block-start": "0"
									},
									"selector": " > :first-child:first-child"
								},
								{
									"rules": {
										"margin-block-end": "0"
									},
									"selector": " > :last-child:last-child"
								},
								{
									"rules": {
										"margin-block-end": "0",
										"margin-block-start": null
									},
									"selector": " > *"
								}
							]
						},
						"flex": {
							"baseStyles": [
								{
									"rules": {
										"align-items": "center",
										"flex-wrap": "wrap"
									},
									"selector": ""
								},
								{
									"rules": {
										"margin": "0"
									},
									"selector": " > *"
								}
							],
							"className": "is-layout-flex",
							"displayMode": "flex",
							"name": "flex",
							"slug": "flex",
							"spacingStyles": [
								{
									"rules": {
										"gap": null
									},
									"selector": ""
								}
							]
						},
						"grid": {
							"baseStyles": [
								{
									"rules": {
										"margin": "0"
									},
									"selector": " > *"
								}
							],
							"className": "is-layout-grid",
							"displayMode": "grid",
							"name": "grid",
							"slug": "grid",
							"spacingStyles": [
								{
									"rules": {
										"gap": null
									},
									"selector": ""
								}
							]
						}
					},
					"wideSize": false
				},
				"shadow": {
					"defaultPresets": true,
					"presets": []
				},
				"spacing": {
					"customSpacingSize": true,
					"spacingScale": {
						"increment": 1.5,
						"mediumStep": 1.5,
						"operator": "*",
						"steps": 7,
						"unit": "rem"
					},
					"spacingSizes": [],
					"units": [
						"%",
						"px",
						"em",
						"rem",
						"vh",
						"vw"
					]
				},
				"typography": {
					"customFontSize": true,
					"fontFamilies": [
						{
							"fontFamily": "-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif",
							"name": "System Font",
							"slug": "system-font"
						},
						{
							"fontFace": [
								{
									"fontFamily": "Source Serif Pro",
									"fontStretch": "normal",
									"fontStyle": "normal",
									"fontWeight": "200 900",
									"src": [
										"file:./assets/fonts/source-serif-pro/SourceSerif4Variable-Roman.ttf.woff2"
									]
								},
								{
									"fontFamily": "Source Serif Pro",
									"fontStretch": "normal",
									"fontStyle": "italic",
									"fontWeight": "200 900",
									"src": [
										"file:./assets/fonts/source-serif-pro/SourceSerif4Variable-Italic.ttf.woff2"
									]
								}
							],
							"fontFamily": "\"Source Serif Pro\", serif",
							"name": "Source Serif Pro",
							"slug": "source-serif-pro"
						},
						{
							"fontFace": {
								"dm-sans-400-italic": {
									"fontDisplay": "fallback",
									"fontFamily": "DM Sans",
									"fontStyle": "italic",
									"fontWeight": "400",
									"origin": "gutenberg_wp_fonts_api",
									"provider": "local",
									"src": [
										"http://basic.wordpress.test/wp-content/themes/twentytwentytwo/assets/fonts/dm-sans/DMSans-Italic.ttf"
									]
								},
								"dm-sans-400-normal": {
									"fontDisplay": "fallback",
									"fontFamily": "DM Sans",
									"fontStyle": "normal",
									"fontWeight": "400",
									"origin": "gutenberg_wp_fonts_api",
									"provider": "local",
									"src": [
										"http://basic.wordpress.test/wp-content/themes/twentytwentytwo/assets/fonts/dm-sans/DMSans-Regular.ttf"
									]
								},
								"dm-sans-700-italic": {
									"fontDisplay": "fallback",
									"fontFamily": "DM Sans",
									"fontStyle": "italic",
									"fontWeight": "700",
									"origin": "gutenberg_wp_fonts_api",
									"provider": "local",
									"src": [
										"http://basic.wordpress.test/wp-content/themes/twentytwentytwo/assets/fonts/dm-sans/DMSans-BoldItalic.ttf"
									]
								},
								"dm-sans-700-normal": {
									"fontDisplay": "fallback",
									"fontFamily": "DM Sans",
									"fontStyle": "normal",
									"fontWeight": "700",
									"origin": "gutenberg_wp_fonts_api",
									"provider": "local",
									"src": [
										"http://basic.wordpress.test/wp-content/themes/twentytwentytwo/assets/fonts/dm-sans/DMSans-Bold.ttf"
									]
								}
							},
							"fontFamily": "dm-sans",
							"name": "dm-sans",
							"slug": "dm-sans"
						},
						{
							"fontFace": {
								"ibm-plex-sans-200-italic": {
									"fontDisplay": "fallback",
									"fontFamily": "IBM Plex Sans",
									"fontStretch": "normal",
									"fontStyle": "italic",
									"fontWeight": "200",
									"origin": "gutenberg_wp_fonts_api",
									"provider": "local",
									"src": [
										"http://basic.wordpress.test/wp-content/themes/twentytwentytwo/assets/fonts/ibm-plex/IBMPlexSans-ExtraLightItalic.woff2"
									]
								},
								"ibm-plex-sans-200-normal": {
									"fontDisplay": "fallback",
									"fontFamily": "IBM Plex Sans",
									"fontStretch": "normal",
									"fontStyle": "normal",
									"fontWeight": "200",
									"origin": "gutenberg_wp_fonts_api",
									"provider": "local",
									"src": [
										"http://basic.wordpress.test/wp-content/themes/twentytwentytwo/assets/fonts/ibm-plex/IBMPlexSans-ExtraLight.woff2"
									]
								},
								"ibm-plex-sans-400-italic": {
									"fontDisplay": "fallback",
									"fontFamily": "IBM Plex Sans",
									"fontStretch": "normal",
									"fontStyle": "italic",
									"fontWeight": "400",
									"origin": "gutenberg_wp_fonts_api",
									"provider": "local",
									"src": [
										"http://basic.wordpress.test/wp-content/themes/twentytwentytwo/assets/fonts/ibm-plex/IBMPlexSans-LightItalic.woff2"
									]
								},
								"ibm-plex-sans-400-normal": {
									"fontDisplay": "fallback",
									"fontFamily": "IBM Plex Sans",
									"fontStretch": "normal",
									"fontStyle": "normal",
									"fontWeight": "400",
									"origin": "gutenberg_wp_fonts_api",
									"provider": "local",
									"src": [
										"http://basic.wordpress.test/wp-content/themes/twentytwentytwo/assets/fonts/ibm-plex/IBMPlexSans-Light.woff2"
									]
								}
							},
							"fontFamily": "ibm-plex-sans",
							"name": "ibm-plex-sans",
							"slug": "ibm-plex-sans"
						},
						{
							"fontFace": {
								"ibm-plex-mono-400-italic": {
									"fontDisplay": "fallback",
									"fontFamily": "IBM Plex Mono",
									"fontStretch": "normal",
									"fontStyle": "italic",
									"fontWeight": "400",
									"origin": "gutenberg_wp_fonts_api",
									"provider": "local",
									"src": [
										"http://basic.wordpress.test/wp-content/themes/twentytwentytwo/assets/fonts/ibm-plex/IBMPlexMono-TextItalic.woff2"
									]
								},
								"ibm-plex-mono-400-normal": {
									"fontDisplay": "fallback",
									"fontFamily": "IBM Plex Mono",
									"fontStretch": "normal",
									"fontStyle": "normal",
									"fontWeight": "400",
									"origin": "gutenberg_wp_fonts_api",
									"provider": "local",
									"src": [
										"http://basic.wordpress.test/wp-content/themes/twentytwentytwo/assets/fonts/ibm-plex/IBMPlexMono-Text.woff2"
									]
								},
								"ibm-plex-mono-700-italic": {
									"fontDisplay": "fallback",
									"fontFamily": "IBM Plex Mono",
									"fontStretch": "normal",
									"fontStyle": "italic",
									"fontWeight": "700",
									"origin": "gutenberg_wp_fonts_api",
									"provider": "local",
									"src": [
										"http://basic.wordpress.test/wp-content/themes/twentytwentytwo/assets/fonts/ibm-plex/IBMPlexSans-BoldItalic.woff2"
									]
								},
								"ibm-plex-mono-700-normal": {
									"fontDisplay": "fallback",
									"fontFamily": "IBM Plex Mono",
									"fontStretch": "normal",
									"fontStyle": "normal",
									"fontWeight": "700",
									"origin": "gutenberg_wp_fonts_api",
									"provider": "local",
									"src": [
										"http://basic.wordpress.test/wp-content/themes/twentytwentytwo/assets/fonts/ibm-plex/IBMPlexMono-Bold.woff2"
									]
								}
							},
							"fontFamily": "ibm-plex-mono",
							"name": "ibm-plex-mono",
							"slug": "ibm-plex-mono"
						},
						{
							"fontFace": {
								"inter-200-900-normal": {
									"fontDisplay": "fallback",
									"fontFamily": "Inter",
									"fontStretch": "normal",
									"fontStyle": "normal",
									"fontWeight": "200 900",
									"origin": "gutenberg_wp_fonts_api",
									"provider": "local",
									"src": [
										"http://basic.wordpress.test/wp-content/themes/twentytwentytwo/assets/fonts/inter/Inter.ttf"
									]
								}
							},
							"fontFamily": "inter",
							"name": "inter",
							"slug": "inter"
						}
					],
					"fontSizes": [
						{
							"name": "Small",
							"size": "1rem",
							"slug": "small"
						},
						{
							"name": "Medium",
							"size": "1.125rem",
							"slug": "medium"
						},
						{
							"name": "Large",
							"size": "1.75rem",
							"slug": "large"
						},
						{
							"name": "Extra Large",
							"size": "clamp(1.75rem, 3vw, 2.25rem)",
							"slug": "x-large"
						}
					],
					"fontStyle": true,
					"fontWeight": true,
					"letterSpacing": true,
					"textDecoration": true,
					"textTransform": true
				}
			}
		},
		"color": {
			"duotone": [
				{
					"colors": [
						"#000000",
						"#ffffff"
					],
					"name": "Foreground and background",
					"slug": "foreground-and-background"
				},
				{
					"colors": [
						"#000000",
						"#ffe2c7"
					],
					"name": "Foreground and secondary",
					"slug": "foreground-and-secondary"
				},
				{
					"colors": [
						"#000000",
						"#f6f6f6"
					],
					"name": "Foreground and tertiary",
					"slug": "foreground-and-tertiary"
				},
				{
					"colors": [
						"#1a4548",
						"#ffffff"
					],
					"name": "Primary and background",
					"slug": "primary-and-background"
				},
				{
					"colors": [
						"#1a4548",
						"#ffe2c7"
					],
					"name": "Primary and secondary",
					"slug": "primary-and-secondary"
				},
				{
					"colors": [
						"#1a4548",
						"#f6f6f6"
					],
					"name": "Primary and tertiary",
					"slug": "primary-and-tertiary"
				}
			],
			"gradients": [
				{
					"gradient": "linear-gradient(to bottom,var(--wp--preset--color--secondary) 0%,var(--wp--preset--color--tertiary) 100%)",
					"name": "Vertical secondary to tertiary",
					"slug": "vertical-secondary-to-tertiary"
				},
				{
					"gradient": "linear-gradient(to bottom,var(--wp--preset--color--secondary) 0%,var(--wp--preset--color--background) 100%)",
					"name": "Vertical secondary to background",
					"slug": "vertical-secondary-to-background"
				},
				{
					"gradient": "linear-gradient(to bottom,var(--wp--preset--color--tertiary) 0%,var(--wp--preset--color--background) 100%)",
					"name": "Vertical tertiary to background",
					"slug": "vertical-tertiary-to-background"
				},
				{
					"gradient": "linear-gradient(to bottom right,var(--wp--preset--color--primary) 0%,var(--wp--preset--color--foreground) 100%)",
					"name": "Diagonal primary to foreground",
					"slug": "diagonal-primary-to-foreground"
				},
				{
					"gradient": "linear-gradient(to bottom right,var(--wp--preset--color--secondary) 50%,var(--wp--preset--color--background) 50%)",
					"name": "Diagonal secondary to background",
					"slug": "diagonal-secondary-to-background"
				},
				{
					"gradient": "linear-gradient(to bottom right,var(--wp--preset--color--background) 50%,var(--wp--preset--color--secondary) 50%)",
					"name": "Diagonal background to secondary",
					"slug": "diagonal-background-to-secondary"
				},
				{
					"gradient": "linear-gradient(to bottom right,var(--wp--preset--color--tertiary) 50%,var(--wp--preset--color--background) 50%)",
					"name": "Diagonal tertiary to background",
					"slug": "diagonal-tertiary-to-background"
				},
				{
					"gradient": "linear-gradient(to bottom right,var(--wp--preset--color--background) 50%,var(--wp--preset--color--tertiary) 50%)",
					"name": "Diagonal background to tertiary",
					"slug": "diagonal-background-to-tertiary"
				}
			],
			"palette": [
				{
					"color": "#000000",
					"name": "Foreground",
					"slug": "foreground"
				},
				{
					"color": "#ffffff",
					"name": "Background",
					"slug": "background"
				},
				{
					"color": "#1a4548",
					"name": "Primary",
					"slug": "primary"
				},
				{
					"color": "#ffe2c7",
					"name": "Secondary",
					"slug": "secondary"
				},
				{
					"color": "#F6F6F6",
					"name": "Tertiary",
					"slug": "tertiary"
				}
			]
		},
		"custom": {
			"spacing": {
				"large": "clamp(4rem, 10vw, 8rem)",
				"medium": "clamp(2rem, 8vw, calc(4 * var(--wp--style--block-gap)))",
				"outer": "var(--wp--custom--spacing--small, 1.25rem)",
				"small": "max(1.25rem, 5vw)"
			},
			"typography": {
				"font-size": {
					"colossal": "clamp(3.25rem, 8vw, 6.25rem)",
					"gigantic": "clamp(2.75rem, 6vw, 3.25rem)",
					"huge": "clamp(2.25rem, 4vw, 2.75rem)"
				},
				"line-height": {
					"medium": 1.3999999999999999,
					"normal": 1.6000000000000001,
					"small": 1.2,
					"tiny": 1.1499999999999999
				}
			}
		},
		"layout": {
			"contentSize": "650px",
			"wideSize": "1000px"
		},
		"spacing": {
			"units": [
				"%",
				"px",
				"em",
				"rem",
				"vh",
				"vw"
			]
		},
		"typography": {
			"dropCap": false,
			"fontFamilies": [
				{
					"fontFamily": "-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif",
					"name": "System Font",
					"slug": "system-font"
				},
				{
					"fontFace": [
						{
							"fontFamily": "Source Serif Pro",
							"fontStretch": "normal",
							"fontStyle": "normal",
							"fontWeight": "200 900",
							"src": [
								"file:./assets/fonts/source-serif-pro/SourceSerif4Variable-Roman.ttf.woff2"
							]
						},
						{
							"fontFamily": "Source Serif Pro",
							"fontStretch": "normal",
							"fontStyle": "italic",
							"fontWeight": "200 900",
							"src": [
								"file:./assets/fonts/source-serif-pro/SourceSerif4Variable-Italic.ttf.woff2"
							]
						}
					],
					"fontFamily": "\"Source Serif Pro\", serif",
					"name": "Source Serif Pro",
					"slug": "source-serif-pro"
				}
			],
			"fontSizes": [
				{
					"size": "1rem",
					"slug": "small"
				},
				{
					"size": "1.125rem",
					"slug": "medium"
				},
				{
					"size": "1.75rem",
					"slug": "large"
				},
				{
					"size": "clamp(1.75rem, 3vw, 2.25rem)",
					"slug": "x-large"
				}
			]
		}
	},
	"styles": {
		"blocks": {
			"core/button": {
				"border": {
					"radius": "0"
				},
				"color": {
					"background": "var(--wp--preset--color--primary)",
					"text": "var(--wp--preset--color--background)"
				},
				"typography": {
					"fontSize": "var(--wp--preset--font-size--medium)"
				}
			},
			"core/paragraph": {
				"color": {
					"background": "var(--wp--preset--color--primary)",
					"text": "var(--wp--preset--color--luminous-vivid-orange)"
				},
				"elements": {
					"link": {
						":hover": {
							"color": {
								"text": "var(--wp--preset--color--light-green-cyan)"
							}
						},
						"color": {
							"text": "var(--wp--preset--color--vivid-red)"
						}
					}
				},
				"spacing": {
					"margin": {
						"bottom": "var(--wp--preset--spacing--30)",
						"left": "var(--wp--preset--spacing--30)",
						"right": "var(--wp--preset--spacing--30)",
						"top": "var(--wp--preset--spacing--30)"
					},
					"padding": {
						"bottom": "var(--wp--preset--spacing--30)",
						"left": "var(--wp--preset--spacing--30)",
						"right": "var(--wp--preset--spacing--30)",
						"top": "var(--wp--preset--spacing--30)"
					}
				},
				"typography": {
					"fontFamily": "var(--wp--preset--font-family--dm-sans)",
					"fontSize": "var(--wp--preset--font-size--small)",
					"fontStyle": "normal",
					"fontWeight": "600",
					"letterSpacing": "5px",
					"textTransform": "uppercase"
				}
			},
			"core/post-comments": {
				"spacing": {
					"padding": {
						"top": "var(--wp--custom--spacing--small)"
					}
				}
			},
			"core/post-title": {
				"typography": {
					"fontFamily": "var(--wp--preset--font-family--source-serif-pro)",
					"fontSize": "var(--wp--custom--typography--font-size--gigantic)",
					"fontWeight": "300",
					"lineHeight": "var(--wp--custom--typography--line-height--tiny)"
				}
			},
			"core/pullquote": {
				"border": {
					"width": "1px 0"
				}
			},
			"core/query-title": {
				"typography": {
					"fontFamily": "var(--wp--preset--font-family--source-serif-pro)",
					"fontSize": "var(--wp--custom--typography--font-size--gigantic)",
					"fontWeight": "300",
					"lineHeight": "var(--wp--custom--typography--line-height--small)"
				}
			},
			"core/quote": {
				"border": {
					"width": "1px"
				}
			},
			"core/site-title": {
				"typography": {
					"fontFamily": "var(--wp--preset--font-family--system-font)",
					"fontSize": "var(--wp--preset--font-size--medium)",
					"fontStyle": "italic",
					"fontWeight": "normal",
					"lineHeight": "var(--wp--custom--typography--line-height--normal)"
				}
			}
		},
		"color": {
			"background": "var(--wp--preset--color--background)",
			"text": "var(--wp--preset--color--foreground)"
		},
		"elements": {
			"h1": {
				"typography": {
					"fontFamily": "var(--wp--preset--font-family--source-serif-pro)",
					"fontSize": "var(--wp--custom--typography--font-size--colossal)",
					"fontWeight": "300",
					"lineHeight": "var(--wp--custom--typography--line-height--tiny)"
				}
			},
			"h2": {
				"typography": {
					"fontFamily": "var(--wp--preset--font-family--source-serif-pro)",
					"fontSize": "var(--wp--custom--typography--font-size--gigantic)",
					"fontWeight": "300",
					"lineHeight": "var(--wp--custom--typography--line-height--small)"
				}
			},
			"h3": {
				"typography": {
					"fontFamily": "var(--wp--preset--font-family--source-serif-pro)",
					"fontSize": "var(--wp--custom--typography--font-size--huge)",
					"fontWeight": "300",
					"lineHeight": "var(--wp--custom--typography--line-height--tiny)"
				}
			},
			"h4": {
				"typography": {
					"fontFamily": "var(--wp--preset--font-family--source-serif-pro)",
					"fontSize": "var(--wp--preset--font-size--x-large)",
					"fontWeight": "300",
					"lineHeight": "var(--wp--custom--typography--line-height--tiny)"
				}
			},
			"h5": {
				"typography": {
					"fontFamily": "var(--wp--preset--font-family--system-font)",
					"fontSize": "var(--wp--preset--font-size--medium)",
					"fontWeight": "700",
					"lineHeight": "var(--wp--custom--typography--line-height--normal)",
					"textTransform": "uppercase"
				}
			},
			"h6": {
				"typography": {
					"fontFamily": "var(--wp--preset--font-family--system-font)",
					"fontSize": "var(--wp--preset--font-size--medium)",
					"fontWeight": "400",
					"lineHeight": "var(--wp--custom--typography--line-height--normal)",
					"textTransform": "uppercase"
				}
			},
			"link": {
				"color": {
					"text": "var(--wp--preset--color--foreground)"
				}
			}
		},
		"spacing": {
			"blockGap": "1.5rem"
		},
		"typography": {
			"fontFamily": "var(--wp--preset--font-family--system-font)",
			"fontSize": "var(--wp--preset--font-size--medium)",
			"lineHeight": "var(--wp--custom--typography--line-height--normal)"
		}
	},
	"templateParts": [
		{
			"area": "header",
			"name": "header",
			"title": "Header"
		},
		{
			"area": "header",
			"name": "header-large-dark",
			"title": "Header (Dark, large)"
		},
		{
			"area": "header",
			"name": "header-small-dark",
			"title": "Header (Dark, small)"
		},
		{
			"area": "footer",
			"name": "footer",
			"title": "Footer"
		}
	],
	"version": 2,
	"$schema": "https://schemas.wp.org/trunk/theme.json"
}

@jffng
Copy link
Contributor

jffng commented Jun 2, 2023

I followed the testing instructions but instead, deactivated CBT and exported using the native site editor Export, and the result is the same — settings are duplicated under the paragraph block. So I think this is a Gutenberg issue, tested on trunk.

I'll try looking into when this issue was introduced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants