-
-
Save alecgeatches/3a37e172d8cda87c284bfc5ec722857b to your computer and use it in GitHub Desktop.
Example theme.json with nesting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://schemas.wp.org/trunk/theme.json", | |
"version": 2, | |
"settings": { | |
"appearanceTools": true, | |
"useRootPaddingAwareAlignments": true, | |
"border": { | |
"color": false, | |
"radius": false, | |
"style": false, | |
"width": false | |
}, | |
"color": { | |
"text": false, | |
"background": false, | |
"link": false, | |
"custom": false, | |
"defaultPalette": false, | |
"defaultGradients": false, | |
"defaultDuotone": false, | |
"customGradient": false, | |
"customDuotone": false, | |
"palette": [ | |
{ | |
"slug": "text", | |
"color": "var(--wp--custom--text--secondary)", | |
"name": "text" | |
}, | |
{ | |
"slug": "heading", | |
"color": "var(--wp--custom--text--primary)", | |
"name": "heading" | |
}, | |
{ | |
"slug": "layer-accent-red", | |
"color": "var(--wp--custom--layer--accent--red)", | |
"name": "red accent" | |
}, | |
{ | |
"slug": "layer-accent-yellow", | |
"color": "var(--wp--custom--layer--accent--yellow)", | |
"name": "yellow accent" | |
}, | |
{ | |
"slug": "layer-accent-blue", | |
"color": "var(--wp--custom--layer--accent--blue)", | |
"name": "blue accent" | |
} | |
], | |
"gradients": [] | |
}, | |
"custom": { | |
"heading": { | |
"1": { | |
"font-size": "clamp(0.89rem, calc(0.95rem + -0.06vw), 0.94rem)" | |
}, | |
"2": { | |
"font-size": "clamp(1.22rem, calc(1.07rem + 0.75vw), 1.84rem)" | |
}, | |
"3": { | |
"font-size": "clamp(1.30rem, calc(1.08rem + 1.09vw), 2.20rem)" | |
}, | |
"4": { | |
"font-size": "clamp(1.38rem, calc(1.08rem + 1.52vw), 2.64rem)" | |
}, | |
"5": { | |
"font-size": "clamp(1.48rem, calc(1.07rem + 2.04vw), 3.17rem)" | |
}, | |
"6": { | |
"font-size": "clamp(1.57rem, calc(1.04rem + 2.69vw), 3.81rem)" | |
} | |
}, | |
"quotation": { | |
"1": { | |
"font-size": "clamp(1.30rem, calc(1.08rem + 1.09vw), 2.20rem)" | |
}, | |
"2": { | |
"font-size": "clamp(1.38rem, calc(1.08rem + 1.52vw), 2.64rem)" | |
}, | |
"3": { | |
"font-size": "clamp(1.48rem, calc(1.07rem + 2.04vw), 3.17rem)" | |
} | |
}, | |
"layer": { | |
"accent": { | |
"red": "#ff8872", | |
"yellow": "#ffb84a", | |
"blue": "#77cad8" | |
} | |
}, | |
"text": { | |
"primary": "#13191e", | |
"secondary": "#444140" | |
} | |
}, | |
"spacing": { | |
"margin": false, | |
"padding": false, | |
"units": [ | |
"rem", | |
"%" | |
] | |
}, | |
"typography": { | |
"customFontSize": false, | |
"fontStyle": false, | |
"fontWeight": false, | |
"letterSpacing": false, | |
"lineHeight": false, | |
"textDecoration": false, | |
"textTransform": false, | |
"dropCap": false, | |
"fontFamilies": [], | |
"fontSizes": [] | |
}, | |
"blocks": { | |
"core/heading": { | |
"color": { | |
"text": true, | |
"palette": [ | |
{ | |
"slug": "text", | |
"color": "var(--wp--custom--text--secondary)", | |
"name": "text" | |
}, | |
{ | |
"slug": "heading", | |
"color": "var(--wp--custom--text--primary)", | |
"name": "heading" | |
}, | |
{ | |
"slug": "layer-accent-blue", | |
"color": "var(--wp--custom--layer--accent--blue)", | |
"name": "blue accent" | |
} | |
] | |
}, | |
"typography": { | |
"fontSizes": [ | |
{ | |
"slug": "heading-2", | |
"size": "var(--wp--custom--heading--2--font-size)", | |
"name": "Heading 2" | |
}, | |
{ | |
"slug": "heading-3", | |
"size": "var(--wp--custom--heading--3--font-size)", | |
"name": "Heading 3" | |
}, | |
{ | |
"slug": "heading-4", | |
"size": "var(--wp--custom--heading--4--font-size)", | |
"name": "Heading 4" | |
}, | |
{ | |
"slug": "heading-5", | |
"size": "var(--wp--custom--heading--5--font-size)", | |
"name": "Heading 5" | |
}, | |
{ | |
"slug": "heading-6", | |
"size": "var(--wp--custom--heading--6--font-size)", | |
"name": "Heading 6" | |
} | |
] | |
} | |
}, | |
"core/quote": { | |
"typography": { | |
"fontSizes": [ | |
{ | |
"slug": "quote-1", | |
"size": "var(--wp--custom--quotation--1--font-size)", | |
"name": "Quote 1" | |
}, | |
{ | |
"slug": "quote-2", | |
"size": "var(--wp--custom--quotation--2--font-size)", | |
"name": "Quote 2" | |
}, | |
{ | |
"slug": "quote-3", | |
"size": "var(--wp--custom--quotation--3--font-size)", | |
"name": "Quote 3" | |
} | |
] | |
}, | |
"color": { | |
"gradients": [] | |
}, | |
"core/heading": { | |
"color": { | |
"text": true, | |
"palette": [ | |
{ | |
"slug": "layer-accent-red", | |
"color": "var(--wp--custom--layer--accent--red)", | |
"name": "red accent" | |
} | |
] | |
}, | |
"typography": { | |
"fontWeight": true, | |
"fontSizes": [ | |
{ | |
"slug": "heading-4", | |
"size": "var(--wp--custom--heading--4--font-size)", | |
"name": "Heading 4" | |
}, | |
{ | |
"slug": "heading-6", | |
"size": "var(--wp--custom--heading--6--font-size)", | |
"name": "Heading 6" | |
} | |
] | |
}, | |
"border": { | |
"color": true | |
} | |
}, | |
"core/media-text": { | |
"color": { | |
"gradients": [] | |
}, | |
"core/heading": { | |
"color": { | |
"text": true, | |
"palette": [ | |
{ | |
"slug": "layer-accent-yellow", | |
"color": "var(--wp--custom--layer--accent--yellow)", | |
"name": "yellow accent" | |
} | |
] | |
}, | |
"typography": { | |
"fontWeight": true, | |
"fontSizes": [ | |
{ | |
"slug": "heading-4", | |
"size": "var(--wp--custom--heading--4--font-size)", | |
"name": "Heading 4" | |
}, | |
{ | |
"slug": "heading-6", | |
"size": "var(--wp--custom--heading--6--font-size)", | |
"name": "Heading 6" | |
} | |
] | |
}, | |
"border": { | |
"color": true | |
} | |
} | |
} | |
} | |
} | |
}, | |
"styles": { | |
"blocks": { | |
"core/heading": { | |
"color": { | |
"text": "var(--wp--custom--text--primary)" | |
}, | |
"typography": { | |
"fontSize": "var(--wp--custom--heading--4--font-size)", | |
"fontFamily": "var(--wp--custom--heading--4--font-family)", | |
"lineHeight": "var(--wp--custom--heading--4--line-height)", | |
"fontWeight": "var(--wp--custom--heading--4--font-weight)" | |
} | |
} | |
} | |
}, | |
"templateParts": [ | |
{ | |
"name": "header", | |
"title": "Header", | |
"area": "header" | |
}, | |
{ | |
"name": "footer", | |
"title": "Footer", | |
"area": "footer" | |
} | |
], | |
"customTemplates": [ | |
{ | |
"name": "", | |
"title": "", | |
"postTypes": [ | |
"post", | |
"page" | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment