theme-json

Role

core-fse/theme.json simultaneously:

  • configures available Gutenberg capabilities;
  • disables unnecessary WordPress defaults;
  • declares public colors, spacing, and font-size presets;
  • defines the base layout;
  • defines template parts;
  • serves as an inheritable base for child themes.

It contains almost no brand-specific global styles: the child theme provides the finished visual design.

Inheritance

WordPress merges parent and child theme.json data. However, preset arrays and collections cannot be considered automatically “appended” in every situation.

If a child theme extends the palette, gradients, shadows, or another collection, it must check the final merged result and list required parent entries again when necessary. Benedictine, for example, declares the base colors again and adds its own.

Do not copy the entire parent theme.json into a child theme without reason. Override or extend only what is needed, but check the actual result in the editor.

Generated API

Preset:

{
  "name": "fluid-md",
  "slug": "fluid-md",
  "size": "var(--size-fluid300-16px)"
}

creates:

--wp--preset--spacing--fluid-md: var(--size-fluid300-16px);

Usage:

padding: var(--wp--preset--spacing--fluid-md);

WordPress also creates utility classes for some presets, such as color and spacing classes in block markup.

Reference syntax

A WordPress preset reference is valid inside theme.json:

{
  "fontSize": "var:preset|font-size|md",
  "fontFamily": "var:preset|font-family|basic"
}

In CSS:

font-size: var(--wp--preset--font-size--md);
font-family: var(--wp--preset--font-family--basic);

Do not mix the two syntaxes without checking the context.

Layout

Core defaults:

SettingValue
contentSize50rem
wideSize80rem
custom content/wide sizeenabled
editing layout sizesenabled

useRootPaddingAwareAlignments is enabled. Horizontal page padding is usually set by the child theme through the edge-x preset.

Editor capabilities

General

SettingValueEffect
appearanceToolsfalseWordPress does not enable all appearance controls automatically
useRootPaddingAwareAlignmentstruealign-wide/full account for root padding
position.stickytruesticky position is available to supporting blocks

Background

ControlAvailable
background imageyes
background sizeyes

Border

ControlAvailable
coloryes
styleyes
widthyes
radiusyes

Color

ControlValue
backgroundenabled
textenabled
linkenabled
custom colordisabled
custom gradientdisabled in the parent theme
custom duotonedisabled
default palettedisabled
default gradientsdisabled
default duotonedisabled
separate button/caption/heading palettesdisabled

Child theme can deliberately change some settings, for example enabling custom gradients.

Spacing

ControlValue
marginenabled
paddingenabled
block gapenabled
custom spacing sizeglobally disabled
default spacing sizesdisabled

Custom spacing size is enabled separately for core/button.

Typography

ControlValue
font styleenabled
font weightenabled
text alignenabled
text decorationenabled
text transformenabled
line heightenabled
letter spacingenabled
writing modeenabled
fit textenabled
drop capdisabled
custom font sizedisabled
default font sizesdisabled

Colors

Core theme:

  • disables the default palette, gradients, and duotone;
  • disables arbitrary custom colors;
  • publishes a minimal color contract;
  • leaves gradients empty for child-theme extension.

The base palette is listed in reference.

Child theme must:

  1. define the required CSS color variables;
  2. include them in the final palette;
  3. add additional brand colors where needed;
  4. check contrast and correctness of the on-* roles.

Spacing

Core theme:

  • disables WordPress default spacing sizes;
  • disables arbitrary spacing-size additions;
  • enables margin, padding, and block gap;
  • publishes normal, fluid, and negative scales;
  • enables %, em, rem, and viewport units, but not px.

Use a spacing preset first. If no suitable preset exists and a fixed value is
required, use rem, em, %, or a context-appropriate relative unit.

px remains permitted only for deliberate pixel-bound exceptions such as a
1px border or separator. Do not use it for layout, spacing, sizing, or
positioning.

Typography

Core theme:

  • disables default font sizes;
  • disables custom font size;
  • publishes percentage, named, and fluid scales;
  • enables line height, letter spacing, font weight/style, and other controls;
  • sets the fluid viewport range to 375px → 1280px;
  • does not define font families: the child theme provides them.

For font-size, always select an existing WordPress font-size preset. A
percentage may be used only when the design intentionally requires a relative
adjustment. Do not hardcode font sizes in px, rem, or em.

Font families and fontFace belong to the brand. They are declared in child theme.json, after which WordPress generates --wp--preset--font-family--* and @font-face.

Borders, background, position, and shadows

Core theme enables:

  • border color, style, width, and radius;
  • background image and size;
  • sticky position.

Default shadow presets are disabled; the core list is empty. The child theme may declare its own presets.

Core gradients, shadow presets, and custom templates are also empty. These are extension points, not a missing part of the build.

Block settings

Core theme contains a focused core/button setting that enables custom spacing for the button. This is a block-specific exception, not a separate token layer.

Child-theme global styles

The child theme defines the actual base design in styles:

  • page colors;
  • root padding and block gap;
  • body typography;
  • headings and links;
  • block-specific styles.

Illustrative example:

{
  "styles": {
    "color": {
      "background": "var(--wp--preset--color--base)",
      "text": "var(--wp--preset--color--contrast)"
    },
    "spacing": {
      "blockGap": "var(--wp--preset--spacing--base-gap)"
    }
  }
}

Change rules

  • First look for an existing preset.
  • Do not add a preset for one block only.
  • Choose a stable role-based slug.
  • Do not rename an existing slug without migrating saved content.
  • Check the final palette and controls in Gutenberg.
  • Check generated CSS on the frontend and in the editor iframe.
  • Update reference when the public API changes.

In addition to JSON, auto-include/fse-settings.php removes WordPress default presets through the wp_theme_json_data_default filter. The actual editor API is determined by both JSON and this PHP layer.

Definitive reference

The documentation does not duplicate the entire JSON. The complete current file is the source of truth, while reference catalogs its public presets.