Cheat Sheet: Every setting that you can remove using theme.json

In this lesson

Last updated

Below is a code example of every setting that you can remove using theme.json:

{
	"version": 3,
	"settings": {
		"appearanceTools": false,
		"background": {
			"backgroundImage": false,
			"backgroundSize": false
		},
		"border": {
			"color": false,
			"radius": false,
			"style": false,
			"width": false
		},
		"color": {
			"text": false,
			"background": false,
			"link": false,
			"heading": false,
			"button": false,
			"caption": false,
			"custom": false,
			"customDuotone": false,
			"customGradient": false,
			"defaultDuotone": false,
			"defaultGradients": false,
			"defaultPalette": false
		},
		"dimensions": {
			"defaultAspectRatios": false,
			"aspectRatios": [],
			"minHeight": false
		},
		"layout": {
			"contentSize": null,
			"wideSize": null,
			"allowEditing": false,
			"allowCustomContentAndWideSize":false
		},
		"position": {
			"sticky": false
		},
		"spacing": {
			"blockGap": null,
			"margin": false,
			"padding": false,
			"units": [],
			"defaultSpacingSizes": false,
			"customSpacingSize": false,
			"spacingScale": []
		},
		"shadow": {
			"defaultPresets": false,
			"presets": []
		},
		"typography": {
			"customFontSize": false,
			"dropCap": false,
			"fontStyle": false,
			"fontWeight": false,
			"fluid": false,
			"letterSpacing": false,
			"lineHeight": false,
			"textDecoration": false,
			"textTransform": false,
			"writingMode": false,
			"fontSizes": [],
			"fontFamilies": []
		},
		"useRootPaddingAwareAlignments": false,
		"blocks": {
			"core/button": {
				"border": {
					"radius": false
				}
			},
			"core/image": {
				"lightbox": {
					"allowEditing": false,
					"enabled": false
				}
			},
			"core/pullquote": {
				"border": {
					"color": false,
					"radius": false,
					"style": false,
					"width": false
				}
			}
		}
	}
}

Note that if you remove the background image support, it does not remove any existing background images from your blocks.

To disable the “Inherit default layout” setting for container blocks like group, remove the

"layout": {
"contentSize": null,
"wideSize": null
},

Known issues

Border allows custom color picker even when custom color is set to false in theme.json: #59567