theme.json
v1Schema URL
Properties
Version of theme.json to use. Since 5.8.
JSON schema URI for theme.json.
Settings for the block editor and individual blocks. These include things like:
- Which customization options should be available to the user.
- The default colors, font sizes... available to the user.
- CSS custom properties and class names used in styles.
- And the default layout of the editor (widths and available alignments). Since 5.8.
Organized way to set CSS properties. Styles in the top-level will be added in the body selector.
Since 5.8.
Additional metadata for custom templates defined in the block-templates folder. Gutenberg plugin required.
Additional metadata for template parts defined in the block-template-parts folder. Gutenberg plugin required.
Definitions
Settings related to borders. Gutenberg plugin required.
4 nested properties
Allow users to set custom border colors. Gutenberg plugin required.
Allow users to set custom border radius. Gutenberg plugin required.
Allow users to set custom border styles. Gutenberg plugin required.
Allow users to set custom border widths. Gutenberg plugin required.
Settings related to colors. Since 5.8.
9 nested properties
Allow users to set background colors. Gutenberg plugin required.
Allow users to select custom colors. Since 5.8.
Allow users to create custom duotone filters. Since 5.8.
Allow users to create custom gradients. Since 5.8.
Duotone presets for the duotone picker. Doesn't generate classes or properties. Since 5.8.
Gradient presets for the gradient picker.
Generates a single class (.has-{slug}-background) and custom property (--wp--preset--gradient--{slug}) per preset value.
Since 5.8.
Allow users to set link colors. Since 5.8.
Color palette presets for the color picker.
Generates three classes (.has-{slug}-color, .has-{slug}-background-color, and .has-{slug}-border-color) and a single custom property (--wp--preset--color--{slug}) per preset value.
Since 5.8.
Allow users to set text colors. Gutenberg plugin required.
Settings related to layout. Since 5.8.
2 nested properties
Sets the max-width of the content. Since 5.8.
Sets the max-width of wide (.alignwide) content.
Since 5.8.
Settings related to spacing. Since 5.8.
4 nested properties
Enables --wp--style--block-gap to be generated from styles.spacing.blockGap.
A value of null instead of false further disables layout styles from being generated.
Gutenberg plugin required.
Allow users to set a custom margin. Since 5.8.
Allow users to set a custom padding. Since 5.8.
List of units the user can use for spacing values. Since 5.8.
[
"px",
"em",
"rem",
"vh",
"vw",
"%"
]
Settings related to typography. Since 5.8.
10 nested properties
Allow users to set custom font sizes. Since 5.8.
Allow users to set custom font styles. Gutenberg plugin required.
Allow users to set custom font weights. Gutenberg plugin required.
Allow users to set custom letter spacing. Gutenberg plugin required.
Allow users to set custom line height. Since 5.8.
Allow users to set custom text decorations. Gutenberg plugin required.
Allow users to set custom text transforms. Gutenberg plugin required.
Enable drop cap. Since 5.8.
Font size presets for the font size selector.
Generates a single class (.has-{slug}-color) and custom property (--wp--preset--font-size--{slug}) per preset value.
Since 5.8.
Font family presets for the font family selector.
Generates a single custom property (--wp--preset--font-family--{slug}) per preset value.
Gutenberg plugin required.
Border styles. Gutenberg plugin required.
4 nested properties
Sets the border-color CSS property.
Gutenberg plugin required.
Sets the border-radius CSS property.
Gutenberg plugin required.
Sets the border-style CSS property.
Gutenberg plugin required.
Sets the border-width CSS property.
Gutenberg plugin required.
Color styles. Since 5.8.
3 nested properties
Sets the background-color CSS property.
Since 5.8.
Sets the background CSS property.
Since 5.8.
Sets the color CSS property.
Since 5.8.
Spacing styles. Since 5.8.
3 nested properties
Sets the --wp--style--block-gap CSS custom property when settings.spacing.blockGap is true.
Margin styles. Since 5.8.
4 nested properties
Sets the margin-top CSS property.
Since 5.8.
Sets the margin-right CSS property.
Since 5.8.
Sets the margin-bottom CSS property.
Since 5.8.
Sets the margin-left CSS property.
Since 5.8.
Padding styles. Since 5.8.
4 nested properties
Sets the padding-top CSS property.
Since 5.8.
Sets the padding-right CSS property.
Since 5.8.
Sets the padding-bottom CSS property.
Since 5.8.
Sets the padding-left CSS property.
Since 5.8.
Typography styles. Since 5.8.
8 nested properties
Sets the font-family CSS property.
Gutenberg plugin required.
Sets the font-size CSS property.
Since 5.8.
Sets the font-style CSS property.
Gutenberg plugin required.
Sets the font-weight CSS property.
Gutenberg plugin required.
Sets the letter-spacing CSS property.
Gutenberg plugin required.
Sets the line-height CSS property.
Since 5.8.
Sets the text-decoration CSS property.
Gutenberg plugin required.
Sets the text-transform CSS property.
Gutenberg plugin required.