Skip to content

Instantly share code, notes, and snippets.

@yasershahi
Created January 6, 2025 17:41
Show Gist options
  • Save yasershahi/4fb47b338f612ba7c8ce7064c8204dd7 to your computer and use it in GitHub Desktop.
Save yasershahi/4fb47b338f612ba7c8ce7064c8204dd7 to your computer and use it in GitHub Desktop.
A Simple theme.json File of a WordPress Theme
{
"settings": {
"appearanceTools": true,
"blocks": {
"core/image": {
"appearanceTools": true,
"color": {
"background": true,
"custom": true,
"customDuotone": true,
"customGradient": true,
"defaultDuotone": true,
"defaultGradients": true,
"defaultPalette": true,
"duotone": [],
"gradients": [],
"palette": [
{
"color": "#f3f3f3",
"name": "bacground",
"slug": "custom-bacground"
},
{
"color": "#303841",
"name": "forground",
"slug": "custom-forground"
},
{
"color": "#2158a4",
"name": "accent",
"slug": "custom-accent"
},
{
"color": "#ffffff",
"name": "white",
"slug": "custom-white"
}
],
"text": true
},
"layout": {
"contentSize": "40rem",
"wideSize": "1120px"
},
"lightbox": {
"allowEditing": true,
"enabled": true
},
"shadow": {
"defaultPresets": true,
"presets": []
},
"spacing": {
"customSpacingSize": true,
"defaultSpacingSizes": true,
"spacingScale": {
"default": {
"increment": 1.5,
"mediumStep": 1.5,
"operator": "*",
"steps": 7,
"unit": "rem"
}
},
"spacingSizes": [],
"units": [
"%",
"px",
"em",
"rem",
"vh",
"vw",
"ch"
]
},
"typography": {
"customFontSize": true,
"defaultFontSizes": true,
"dropCap": true,
"fontFamilies": [
{
"fontFamily": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif",
"name": "System Font",
"slug": "system-font"
},
{
"fontFace": [],
"fontFamily": "\"Sahel VF\"",
"name": "Sahel VF",
"slug": "sahel-vf"
}
],
"fontSizes": [
{
"name": "کوچیک",
"size": "0.88rem",
"slug": "custom-1"
},
{
"fluid": {
"max": "1.13rem",
"min": "1rem"
},
"name": "بدنه",
"size": "1rem",
"slug": "custom-2"
},
{
"fluid": {
"max": "2.5rem",
"min": "2rem"
},
"name": "تیتر 1",
"size": "2rem",
"slug": "custom-3"
},
{
"fluid": {
"max": "2rem",
"min": "1.75rem"
},
"name": "تیتر 2",
"size": "1.75rem",
"slug": "custom-4"
},
{
"fluid": {
"max": "1.75rem",
"min": "1.5rem"
},
"name": "تیتر 3",
"size": "1.5rem",
"slug": "custom-5"
},
{
"fluid": {
"max": "1.5rem",
"min": "1.25rem"
},
"name": "تیتر 4",
"size": "1.25rem",
"slug": "custom-6"
}
],
"fontStyle": true,
"fontWeight": true,
"letterSpacing": true,
"textAlign": true,
"textColumns": false,
"textDecoration": true,
"textTransform": true,
"writingMode": false
},
"useRootPaddingAwareAlignments": true
}
},
"color": {
"custom": false,
"customDuotone": false,
"customGradient": false,
"defaultDuotone": false,
"defaultGradients": false,
"defaultPalette": false,
"palette": [
{
"color": "#f3f3f3",
"name": "bacground",
"slug": "custom-bacground"
},
{
"color": "#303841",
"name": "forground",
"slug": "custom-forground"
},
{
"color": "#2158a4",
"name": "accent",
"slug": "custom-accent"
},
{
"color": "#ffffff",
"name": "white",
"slug": "custom-white"
}
]
},
"layout": {
"contentSize": "40rem",
"wideSize": "1120px",
"allowCustomContentAndWideSize": false
},
"shadow": {
"defaultPresets": false,
"presets": [
{
"name": "سایه",
"shadow": "6px 6px 9px rgba(0, 0, 0, 0.2)",
"slug": "shadow-1"
}
]
},
"spacing": {
"units": [
"%",
"px",
"em",
"rem",
"vh",
"vw",
"ch"
]
},
"typography": {
"defaultFontSizes": false,
"customFontSize": false,
"fontFamilies": [
{
"fontFamily": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif",
"name": "System Font",
"slug": "system-font"
},
{
"fontFace": [],
"fontFamily": "\"Sahel VF\"",
"name": "Sahel VF",
"slug": "sahel-vf"
}
],
"fontSizes": [
{
"name": "کوچیک",
"size": "0.88rem",
"slug": "custom-1"
},
{
"fluid": {
"max": "1.13rem",
"min": "1rem"
},
"name": "بدنه",
"size": "1rem",
"slug": "custom-2"
},
{
"fluid": {
"max": "2.5rem",
"min": "2rem"
},
"name": "تیتر 1",
"size": "2rem",
"slug": "custom-3"
},
{
"fluid": {
"max": "2rem",
"min": "1.75rem"
},
"name": "تیتر 2",
"size": "1.75rem",
"slug": "custom-4"
},
{
"fluid": {
"max": "1.75rem",
"min": "1.5rem"
},
"name": "تیتر 3",
"size": "1.5rem",
"slug": "custom-5"
},
{
"fluid": {
"max": "1.5rem",
"min": "1.25rem"
},
"name": "تیتر 4",
"size": "1.25rem",
"slug": "custom-6"
}
]
},
"useRootPaddingAwareAlignments": true
},
"styles": {
"blocks": {
"core/image": {
"border": {
"radius": "4px"
},
"filter": {
"duotone": "var(--wp--preset--duotone--purple-yellow)"
},
"shadow": "var(--wp--preset--shadow--natural)"
},
"core/quote": {
"border": {
"bottom": {
"style": "none",
"width": "0px"
},
"left": {
"style": "none",
"width": "0px"
},
"radius": "8px",
"right": {
"style": "none",
"width": "0px"
},
"top": {
"style": "none",
"width": "0px"
}
},
"color": {
"background": "var(--wp--preset--color--custom-accent)",
"text": "var(--wp--preset--color--white)"
},
"dimensions": {
"minHeight": "56px"
},
"elements": {
"link": {
"color": {
"text": "var(--wp--preset--color--white)"
}
}
},
"spacing": {
"blockGap": "var(--wp--preset--spacing--30)",
"padding": {
"bottom": "var(--wp--preset--spacing--60)",
"left": "var(--wp--preset--spacing--70)",
"right": "var(--wp--preset--spacing--70)",
"top": "var(--wp--preset--spacing--60)"
}
}
}
},
"color": {
"background": "var(--wp--preset--color--custom-bacground)",
"text": "var(--wp--preset--color--custom-forground)"
},
"elements": {
"button": {
"color": {
"background": "var(--wp--preset--color--custom-accent)",
"text": "var(--wp--preset--color--white)"
}
},
"caption": {
"color": {
"text": "var(--wp--preset--color--custom-forground)"
}
},
"h1": {
"typography": {
"fontSize": "var(--wp--preset--font-size--custom-3)",
"fontStyle": "normal",
"fontWeight": "800"
}
},
"h2": {
"typography": {
"fontSize": "var(--wp--preset--font-size--custom-4)",
"fontStyle": "normal",
"fontWeight": "700"
}
},
"h3": {
"typography": {
"fontSize": "var(--wp--preset--font-size--custom-5)",
"fontStyle": "normal",
"fontWeight": "700"
}
},
"h4": {
"typography": {
"fontSize": "var(--wp--preset--font-size--custom-6)",
"fontStyle": "normal",
"fontWeight": "700"
}
},
"heading": {
"color": {
"text": "var(--wp--preset--color--black)"
},
"typography": {
"fontFamily": "var(--wp--preset--font-family--sahel-vf)",
"fontStyle": "normal",
"fontWeight": "700",
"lineHeight": "1.4"
}
},
"link": {
":hover": {
"color": {
"text": "var(--wp--preset--color--custom-accent)"
}
},
"color": {
"text": "var(--wp--preset--color--custom-forground)"
},
"typography": {
"fontFamily": "var(--wp--preset--font-family--sahel-vf)",
"fontSize": "var(--wp--preset--font-size--custom-2)",
"lineHeight": "1.78",
"textDecoration": "none"
}
}
},
"spacing": {
"blockGap": "20px",
"padding": {
"bottom": "0px",
"left": "0px",
"right": "0px",
"top": "0px"
}
},
"typography": {
"fontFamily": "var(--wp--preset--font-family--sahel-vf)",
"fontSize": "var(--wp--preset--font-size--custom-2)",
"fontStyle": "normal",
"fontWeight": "400",
"lineHeight": "1.78"
}
},
"templateParts": [
{
"area": "header",
"name": "header"
},
{
"area": "footer",
"name": "footer"
}
],
"version": 3,
"$schema": "https://schemas.wp.org/trunk/theme.json"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment