Skip to content

Instantly share code, notes, and snippets.

@vapvarun
Created February 23, 2026 16:39
Show Gist options
  • Select an option

  • Save vapvarun/498507ce1015ef33bc7134a2c59ccb5d to your computer and use it in GitHub Desktop.

Select an option

Save vapvarun/498507ce1015ef33bc7134a2c59ccb5d to your computer and use it in GitHub Desktop.
theme.json Per-Block Settings Guide - Control Editor Experience (brndle.com)
{
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 3,
"settings": {
"color": {
"palette": [...]
},
"blocks": {
"core/paragraph": {
"color": {
"background": false
}
},
"core/heading": {
"typography": {
"fontSizes": [...]
}
}
}
}
}
{
"settings": {
"color": {
"background": true
},
"blocks": {
"core/paragraph": {
"color": {
"background": false
}
}
}
}
}
{
"settings": {
"color": {
"palette": [
{ "name": "Primary", "slug": "primary", "color": "#0066cc" },
{ "name": "Secondary", "slug": "secondary", "color": "#444444" },
{ "name": "Accent", "slug": "accent", "color": "#ff4800" },
{ "name": "Light", "slug": "light", "color": "#f5f5f5" },
{ "name": "Dark", "slug": "dark", "color": "#111111" }
]
},
"blocks": {
"core/button": {
"color": {
"palette": [
{ "name": "Primary", "slug": "primary", "color": "#0066cc" },
{ "name": "Accent", "slug": "accent", "color": "#ff4800" }
],
"custom": false
}
}
}
}
}
{
"settings": {
"color": {
"gradients": [...],
"customGradient": true
},
"blocks": {
"core/heading": {
"color": {
"gradients": [],
"customGradient": false
}
},
"core/paragraph": {
"color": {
"gradients": [],
"customGradient": false
}
}
}
}
}
{
"settings": {
"typography": {
"fontSizes": [
{ "name": "Small", "slug": "small", "size": "0.875rem" },
{ "name": "Medium", "slug": "medium", "size": "1rem" },
{ "name": "Large", "slug": "large", "size": "1.25rem" }
],
"customFontSize": false
},
"blocks": {
"core/heading": {
"typography": {
"fontSizes": [
{ "name": "Medium", "slug": "medium", "size": "1.5rem" },
{ "name": "Large", "slug": "large", "size": "2rem" },
{ "name": "X-Large", "slug": "x-large", "size": "2.75rem" },
{ "name": "XX-Large", "slug": "xx-large", "size": "3.5rem" }
],
"customFontSize": false
}
}
}
}
}
{
"settings": {
"typography": {
"fontFamilies": [
{
"name": "Inter",
"slug": "inter",
"fontFamily": "Inter, sans-serif",
"fontFace": [
{
"fontFamily": "Inter",
"fontWeight": "400 700",
"fontStyle": "normal",
"src": ["file:./assets/fonts/Inter-Variable.woff2"]
}
]
},
{
"name": "Playfair Display",
"slug": "playfair",
"fontFamily": "\"Playfair Display\", serif",
"fontFace": [
{
"fontFamily": "Playfair Display",
"fontWeight": "400 800",
"fontStyle": "normal",
"src": ["file:./assets/fonts/PlayfairDisplay-Variable.woff2"]
}
]
}
]
},
"blocks": {
"core/heading": {
"typography": {
"fontFamilies": [
{
"name": "Playfair Display",
"slug": "playfair",
"fontFamily": "\"Playfair Display\", serif"
}
]
}
},
"core/paragraph": {
"typography": {
"fontFamilies": [
{
"name": "Inter",
"slug": "inter",
"fontFamily": "Inter, sans-serif"
}
]
}
}
}
}
}
{
"settings": {
"typography": {
"lineHeight": true,
"letterSpacing": true
},
"blocks": {
"core/paragraph": {
"typography": {
"lineHeight": false,
"letterSpacing": false
}
},
"core/list": {
"typography": {
"lineHeight": false,
"letterSpacing": false
}
}
}
}
}
{
"settings": {
"appearanceTools": true
}
}
{
"settings": {
"appearanceTools": true,
"blocks": {
"core/image": {
"border": {
"radius": false
}
},
"core/quote": {
"color": {
"background": false
},
"typography": {
"lineHeight": false
}
}
}
}
}
{
"settings": {
"spacing": {
"spacingScale": {
"operator": "*",
"increment": 1.5,
"steps": 7,
"mediumStep": 1.5,
"unit": "rem"
},
"spacingSizes": [
{ "name": "XSmall", "slug": "10", "size": "0.5rem" },
{ "name": "Small", "slug": "20", "size": "0.75rem" },
{ "name": "Medium", "slug": "30", "size": "1.5rem" },
{ "name": "Large", "slug": "40", "size": "2.25rem" },
{ "name": "XLarge", "slug": "50", "size": "3.5rem" }
],
"padding": true,
"margin": true,
"blockGap": true
},
"blocks": {
"core/group": {
"spacing": {
"spacingSizes": [
{ "name": "Small", "slug": "20", "size": "1rem" },
{ "name": "Medium", "slug": "30", "size": "2rem" },
{ "name": "Large", "slug": "40", "size": "4rem" },
{ "name": "XLarge", "slug": "50", "size": "6rem" }
],
"padding": true,
"margin": false,
"blockGap": true
}
},
"core/paragraph": {
"spacing": {
"padding": false,
"margin": false
}
}
}
}
}
{
"settings": {
"layout": {
"contentSize": "720px",
"wideSize": "1200px"
},
"blocks": {
"core/columns": {
"spacing": {
"blockGap": true
}
},
"core/cover": {
"layout": {
"allowEditing": false
}
}
}
}
}
{
"settings": {
"border": {
"color": true,
"radius": true,
"style": true,
"width": true
},
"blocks": {
"core/image": {
"border": {
"radius": true,
"color": false,
"style": false,
"width": false
}
},
"core/button": {
"border": {
"radius": true,
"color": true,
"style": false,
"width": false
}
},
"core/paragraph": {
"border": {
"color": false,
"radius": false,
"style": false,
"width": false
}
}
}
}
}
{
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 3,
"settings": {
"appearanceTools": true,
"color": {
"custom": false,
"customGradient": false,
"palette": [
{ "name": "Brand Blue", "slug": "brand-blue", "color": "#1a56db" },
{ "name": "Brand Dark", "slug": "brand-dark", "color": "#111827" },
{ "name": "Brand Light", "slug": "brand-light", "color": "#f9fafb" },
{ "name": "White", "slug": "white", "color": "#ffffff" }
]
},
"typography": {
"customFontSize": false
},
"blocks": {
"core/paragraph": {
"color": {
"text": false,
"background": false,
"gradients": [],
"customGradient": false
},
"typography": {
"fontFamily": false,
"fontStyle": false,
"fontWeight": false,
"letterSpacing": false,
"lineHeight": false,
"textDecoration": false,
"textTransform": false
},
"spacing": {
"padding": false,
"margin": false
}
},
"core/heading": {
"color": {
"background": false,
"gradients": [],
"customGradient": false
},
"typography": {
"fontFamily": false,
"fontStyle": false,
"fontWeight": false,
"letterSpacing": false
}
},
"core/list": {
"color": {
"background": false
},
"typography": {
"fontFamily": false,
"lineHeight": false,
"letterSpacing": false
}
},
"core/image": {
"border": {
"color": false,
"style": false,
"width": false
}
},
"core/button": {
"color": {
"custom": false,
"gradients": [],
"customGradient": false
},
"typography": {
"fontFamily": false,
"lineHeight": false,
"letterSpacing": false
}
}
}
}
}
{
"settings": {
"blocks": {
"my-plugin/hero": {
"color": {
"palette": [
{ "name": "Brand Blue", "slug": "brand-blue", "color": "#1a56db" },
{ "name": "White", "slug": "white", "color": "#ffffff" }
],
"custom": false,
"customGradient": false
},
"spacing": {
"padding": true
}
}
}
}
}
{
"settings": {
"blocks": {
"core/paragraph": {
"typography": {
"customFontSize": false
}
}
}
},
"styles": {
"blocks": {
"core/paragraph": {
"typography": {
"fontSize": "1.125rem",
"lineHeight": "1.8"
},
"spacing": {
"margin": {
"bottom": "1.5rem"
}
}
}
}
}
}
{
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 3,
"settings": {
"appearanceTools": true,
"color": {
"custom": false,
"customGradient": false,
"defaultPalette": false,
"defaultGradients": false,
"palette": [
{ "name": "Ink", "slug": "ink", "color": "#1c1c1e" },
{ "name": "Charcoal", "slug": "charcoal", "color": "#3a3a3c" },
{ "name": "Slate", "slug": "slate", "color": "#636366" },
{ "name": "Silver", "slug": "silver", "color": "#aeaeb2" },
{ "name": "Pearl", "slug": "pearl", "color": "#f2f2f7" },
{ "name": "White", "slug": "white", "color": "#ffffff" },
{ "name": "Accent", "slug": "accent", "color": "#bf5af2" }
]
},
"typography": {
"customFontSize": false,
"defaultFontSizes": false,
"fontSizes": [
{ "name": "Small", "slug": "small", "size": "0.875rem" },
{ "name": "Base", "slug": "base", "size": "1.125rem" },
{ "name": "Medium", "slug": "medium", "size": "1.5rem" },
{ "name": "Large", "slug": "large", "size": "2rem" },
{ "name": "XLarge", "slug": "x-large", "size": "2.75rem" },
{ "name": "Display", "slug": "display", "size": "4rem" }
],
"fontFamilies": [
{
"name": "Editorial",
"slug": "editorial",
"fontFamily": "\"Libre Baskerville\", Georgia, serif",
"fontFace": [
{
"fontFamily": "Libre Baskerville",
"fontWeight": "400",
"fontStyle": "normal",
"src": ["file:./assets/fonts/LibreBaskerville-Regular.woff2"]
},
{
"fontFamily": "Libre Baskerville",
"fontWeight": "400",
"fontStyle": "italic",
"src": ["file:./assets/fonts/LibreBaskerville-Italic.woff2"]
},
{
"fontFamily": "Libre Baskerville",
"fontWeight": "700",
"fontStyle": "normal",
"src": ["file:./assets/fonts/LibreBaskerville-Bold.woff2"]
}
]
},
{
"name": "Interface",
"slug": "interface",
"fontFamily": "\"Inter\", system-ui, sans-serif",
"fontFace": [
{
"fontFamily": "Inter",
"fontWeight": "100 900",
"fontStyle": "normal",
"src": ["file:./assets/fonts/Inter-Variable.woff2"]
}
]
}
]
},
"spacing": {
"spacingSizes": [
{ "name": "XSmall", "slug": "10", "size": "0.5rem" },
{ "name": "Small", "slug": "20", "size": "1rem" },
{ "name": "Medium", "slug": "30", "size": "2rem" },
{ "name": "Large", "slug": "40", "size": "3rem" },
{ "name": "XLarge", "slug": "50", "size": "5rem" },
{ "name": "XXLarge", "slug": "60", "size": "8rem" }
],
"customSpacingSize": false
},
"layout": {
"contentSize": "680px",
"wideSize": "1100px"
},
"blocks": {
"core/paragraph": {
"color": {
"text": false,
"background": false
},
"typography": {
"fontFamily": false,
"fontWeight": false,
"letterSpacing": false,
"lineHeight": false,
"textTransform": false
},
"spacing": {
"padding": false,
"margin": false
}
},
"core/heading": {
"color": {
"background": false
},
"typography": {
"fontFamily": false,
"letterSpacing": false,
"lineHeight": false
}
},
"core/pullquote": {
"color": {
"palette": [
{ "name": "Ink", "slug": "ink", "color": "#1c1c1e" },
{ "name": "Accent", "slug": "accent", "color": "#bf5af2" }
]
},
"typography": {
"fontSizes": [
{ "name": "Medium", "slug": "medium", "size": "1.5rem" },
{ "name": "Large", "slug": "large", "size": "2rem" }
]
}
},
"core/quote": {
"color": {
"background": false
}
},
"core/button": {
"color": {
"custom": false,
"customGradient": false
},
"typography": {
"fontFamily": false,
"lineHeight": false
}
},
"core/image": {
"border": {
"color": false,
"style": false,
"width": false
}
},
"core/separator": {
"color": {
"background": false,
"text": false
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment