ブロックテーマ

theme.jsonとは

投稿日:

WordPress 5.8から、ブロックエディタエディターを構成するために導入されクラシックテーマ(Gutenberg)及びブロックテーマで利用される設定ファイル。

ブロック エディターの設定を定義する標準的なファイルで、グローバルスタイル、ブロックスタイル、ブロックエディターの設定をきめ細かく制御できる方法を提供します。

ブロックテーマのファイル構成ではオプションファイルの位置づけですが、ブロックテーマがフルサイト編集 (full site editing)機能を使用する上で重要なファイルです。

このページは、公式サイトグローバル設定とスタイル (theme.json)をもとに、theme.jsonに関する情報を備忘録として整理したページです。

WordPress の公式サイトへ

WordPress 公式サイトでのtheme.json説明ページはこちのグローバル設定とスタイル (theme.json)です。

公式サイトでのtheme.json機能毎の概要説明は下記リンク先になります。

theme.jsonの仕様

theme.jsonは、テーマやコアの設定を上書きします。

theme.jsonは、任意の登録ブロックに対して settings  styles  サブセクションんだ下記の形式になります。

{
"version":2,
"settings":{},
"styles":{},
"customTemplates":{},
"templateParts":{}
}

theme.json各項目の仕様

version

theme.json ファイルのフォーマットを表します。

Version 2 :WordPress 5.9 以降で動作する。JSON 形式のschemeは、https://raw.githubusercontent.com/WordPress/gutenberg/trunk/schemas/json/theme.jsonです。

Version 1:theme.jsonをversion2とすると新機能が有効になり、古い機能は互換性を保ち調整されます。

こちらがtheme.json Version 1 Referenceです。

settings

ブロックエディター全体・ブロック個別の機能の設定ができます。

add_theme_support()関数より詳細な制御を行えブロック全体に影響します。

	
{
"version":2,
"settings":
   {
     "border":{"radius":false,"color":false,"style":false,"width":false},
     "color":{"custom":true,"customDuotone":true,"customGradient":true,"duotone":[],"gradients":[],"link":false,"palette":[],"text":true,"background":true,"defaultGradients":true,"defaultPalette":true},
     "custom":{},"layout":{"contentSize":"800px","wideSize":"1000px"},
     "spacing":{"margin":false,"padding":false,"blockGap":null,"units":["px","em","rem","vh","vw"]},
     "typography":{"customFontSize":true,"lineHeight":false,"dropCap":true,"fontStyle":true,"fontWeight":true,"letterSpacing":true,"textDecoration":true,"textTransform":true,"fontSizes":[],"fontFamilies":[]},
     "blocks":{"core/paragraph":{"color":{},"custom":{},"layout":{},"spacing":{},"typography":{}},"core/heading":{},"etc":{}}
   }
}
border color spacing 

body セレクタで指定されたサイト全体のスタイルを定義できます。

typography

トップレベル、ブロックレベルおよび両方の場所で使用できる要素を指定

	
{
    "version":1,
    "styles":
    {
        "typography":{"fontSize":"var(--wp--preset--font-size--normal)"},
        "elements":{
            "h1":{"typography":{"fontSize":"var(--wp--preset--font-size--huge)"}},
            "h2":{"typography":{"fontSize":"var(--wp--preset--font-size--big)"}},
            "h3":{"typography":{"fontSize":"var(--wp--preset--font-size--medium)"}}
        },
        "blocks":{
            "core/group":
            {"elements":
            {
                "h2":{"typography":{"fontSize":"var(--wp--preset--font-size--small)"}},
                "h3":{"typography":{"fontSize":"var(--wp--preset--font-size--smaller)"}}
            }}
        }
    }
}
blocks

特定のブロックにスタイルを適用できます。

settings セクションのテーマに対するオプトイン、オプトアウトの仕組みの提供
プリセット
	
{"version":2,
"settings":
{"color":
    {
        "duotone":[{"colors":["#000","#FFF"],"slug":"black-and-white","name":"Black and White"}],
        "gradients":[{"slug":"blush-bordeaux","gradient":"linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)","name":"Blush bordeaux"},{"slug":"blush-light-purple","gradient":"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)","name":"Blush light purple"}],
        "palette":[{"slug":"strong-magenta","color":"#a156b4","name":"Strong magenta"},{"slug":"very-dark-grey","color":"rgb(131, 12, 8)","name":"Very dark grey"}]
    },
"typography":
    {
        "fontFamilies":[{"fontFamily":"-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell, \"Helvetica Neue\",sans-serif","slug":"system-font","name":"System Font"},{"fontFamily":"Helvetica Neue, Helvetica, Arial, sans-serif","slug":"helvetica-arial","name":"Helvetica or Arial"}],
        "fontSizes":[{"slug":"big","size":32,"name":"Big"},{"slug":"x-large","size":46,"name":"Large"},]
    },
"blocks":
    {
        "core/group":
            {
                "color":
                    {
                        "palette":[{"slug":"black","color":"#000000","name":"Black"},{"slug":"white","color":"#ffffff","name":"White"}]
                    }
            }
    }
}
}
カスタム
	
{
"version":2,
"settings":
    {"custom":
        {
            "baseFont":16,"lineHeight":{"small":1.2,"medium":1.4,"large":1.8}
        },
            "blocks":
                {
                    "core/group":
                        {
                            "custom":
                                {
                                    "baseFont":32
                                }
                        }
                }
    }
}
styles

theme.jsonで、テーマ用の任意のスタイルプロパティを定義できます。

サイト、要素、ブロックにスタイルを適用できます。

トップレベルにあれば、要素セレクタが使用されます。ブロック内にあれば、使用されるセレクタは、対応するブロックに追加された形の要素セレクタになります。

		
{
    "version":2,
    "styles":
        {
            "border":
                {"radius":"value","color":"value","style":"value","width":"value"},
            "filter":
                {"duotone":"value"},
            "color":{"background":"value","gradient":"value","text":"value"},
            "spacing":
                {
                    "blockGap":"value",
                    "margin":{"top":"value","right":"value","bottom":"value","left":"value",},
                    "padding":{"top":"value","right":"value","bottom":"value","left":"value"}
                },
            "typography":
                {"fontSize":"value","fontStyle":"value","fontWeight":"value","letterSpacing":"value","lineHeight":"value","textDecoration":"value","textTransform":"value"},
            "elements":
                {"link":{"border":{},"color":{},"spacing":{},"typography":{}},"h1":{},"h2":{},"h3":{},"h4":{},"h5":{},"h6":{}},
            "blocks":{"core/group":{"border":{},"color":{},"spacing":{},"typography":{},"elements":{"link":{},"h1":{},"h2":{},"h3":{},"h4":{},"h5":{},"h6":{}}},
            "etc":{}
                }
        }
}

elements blocks
	
{
    "version":1,
    "styles":
    {
        "typography":{"fontSize":"var(--wp--preset--font-size--normal)"},
        "elements":{
            "h1":{"typography":{"fontSize":"var(--wp--preset--font-size--huge)"}},
            "h2":{"typography":{"fontSize":"var(--wp--preset--font-size--big)"}},
            "h3":{"typography":{"fontSize":"var(--wp--preset--font-size--medium)"}}
        },
        "blocks":{
            "core/group":
            {"elements":
            {
                "h2":{"typography":{"fontSize":"var(--wp--preset--font-size--small)"}},
                "h3":{"typography":{"fontSize":"var(--wp--preset--font-size--smaller)"}}
            }}
        }
    }
}

要素疑似セレクタの指定

"elements":
{
    "link":
    {
        "color":{"text":"green"},":hover":{"color":{"text":"hotpink"}}
    }
}

ブロックエディター API 

WordPress 5.8のリリースから、ブロックタイプを登録する標準の方法として、block.json ファイルの使用が推奨されています。

block.json ファイルを使用するとブロックを共有できます。

block.json で登録されたブロックは、標準でアセットのエンキューが最適化されます。

style や script プロパティにリストされたフロントエンドの CSS や JavaScript アセットは、ブロックがページ上に存在するときにのみエンキューされ、結果的にページサイズが小さくなります。

定義されたスキーマ定義ファイルの使用

定義されたスキーマ定義ファイルをblock.jsonの先頭に記述すると、エディタでは、ツールチップやオートコンプリート、スキーマの検証などの支援機能を利用できます。

block.json のメタデータ

{
    "$schema": "https://schemas.wp.org/trunk/block.json",
    "apiVersion": 2,
    "name": "my-plugin/notice",
    "title": "Notice",
    "category": "text",
    "parent": [ "core/group" ],
    "icon": "star",
    "description": "Shows warning, error or success notices…",
    "keywords": [ "alert", "message" ],
    "version": "1.0.3",
    "textdomain": "my-plugin",
    "attributes": {
        "message": {
            "type": "string",
            "source": "html",
            "selector": ".message"
        }
    },
    "providesContext": {
        "my-plugin/message": "message"
    },
    "usesContext": [ "groupId" ],
    "supports": {
        "align": true
    },
    "styles": [
        { "name": "default", "label": "Default", "isDefault": true },
        { "name": "other", "label": "Other" }
    ],
    "example": {
        "attributes": {
            "message": "This is a notice!"
        }
    },
    "variations": [
        {
            "name": "example",
            "title": "Example",
            "attributes": {
                "message": "This is an example!"
            },
        }
    ]
    "editorScript": "file:./build/index.js",
    "script": "file:./build/script.js",
    "viewScript": "file:./build/view.js",
    "editorStyle": "file:./build/index.css",
    "style": "file:./build/style.css"
}

theme.json事例

twentytwentytwo

{
	"version": 2,
	"customTemplates": [
		{
			"name": "blank",
			"title": "Blank",
			"postTypes": [
				"page",
				"post"
			]
		},
		{
			"name": "page-large-header",
			"title": "Page (Large Header)",
			"postTypes": [
				"page"
			]
		},
		{
			"name": "single-no-separators",
			"title": "Single Post (No Separators)",
			"postTypes": [
				"post"
			]
		},
		{
			"name": "page-no-separators",
			"title": "Page (No Separators)",
			"postTypes": [
				"page"
			]
		}
	],
	"settings": {
		"appearanceTools": true,
		"color": {
			"duotone": [
				{
					"colors": [ "#000000", "#ffffff" ],
					"slug": "foreground-and-background",
					"name": "Foreground and background"
				},
				{
					"colors": [ "#000000", "#ffe2c7" ],
					"slug": "foreground-and-secondary",
					"name": "Foreground and secondary"
				},
				{
					"colors": [ "#000000", "#f6f6f6" ],
					"slug": "foreground-and-tertiary",
					"name": "Foreground and tertiary"
				},
				{
					"colors": [ "#1a4548", "#ffffff" ],
					"slug": "primary-and-background",
					"name": "Primary and background"
				},
				{
					"colors": [ "#1a4548", "#ffe2c7" ],
					"slug": "primary-and-secondary",
					"name": "Primary and secondary"
				},
				{
					"colors": [ "#1a4548", "#f6f6f6" ],
					"slug": "primary-and-tertiary",
					"name": "Primary and tertiary"
				}
			],
			"gradients": [
				{
					"slug": "vertical-secondary-to-tertiary",
					"gradient": "linear-gradient(to bottom,var(--wp--preset--color--secondary) 0%,var(--wp--preset--color--tertiary) 100%)",
					"name": "Vertical secondary to tertiary"
				},
				{
					"slug": "vertical-secondary-to-background",
					"gradient": "linear-gradient(to bottom,var(--wp--preset--color--secondary) 0%,var(--wp--preset--color--background) 100%)",
					"name": "Vertical secondary to background"
				},
				{
					"slug": "vertical-tertiary-to-background",
					"gradient": "linear-gradient(to bottom,var(--wp--preset--color--tertiary) 0%,var(--wp--preset--color--background) 100%)",
					"name": "Vertical tertiary to background"
				},
				{
					"slug": "diagonal-primary-to-foreground",
					"gradient": "linear-gradient(to bottom right,var(--wp--preset--color--primary) 0%,var(--wp--preset--color--foreground) 100%)",
					"name": "Diagonal primary to foreground"
				},
				{
					"slug": "diagonal-secondary-to-background",
					"gradient": "linear-gradient(to bottom right,var(--wp--preset--color--secondary) 50%,var(--wp--preset--color--background) 50%)",
					"name": "Diagonal secondary to background"
				},
				{
					"slug": "diagonal-background-to-secondary",
					"gradient": "linear-gradient(to bottom right,var(--wp--preset--color--background) 50%,var(--wp--preset--color--secondary) 50%)",
					"name": "Diagonal background to secondary"
				},
				{
					"slug": "diagonal-tertiary-to-background",
					"gradient": "linear-gradient(to bottom right,var(--wp--preset--color--tertiary) 50%,var(--wp--preset--color--background) 50%)",
					"name": "Diagonal tertiary to background"
				},
				{
					"slug": "diagonal-background-to-tertiary",
					"gradient": "linear-gradient(to bottom right,var(--wp--preset--color--background) 50%,var(--wp--preset--color--tertiary) 50%)",
					"name": "Diagonal background to tertiary"
				}
			],
			"palette": [
				{
					"slug": "foreground",
					"color": "#000000",
					"name": "Foreground"
				},
				{
					"slug": "background",
					"color": "#ffffff",
					"name": "Background"
				},
				{
					"slug": "primary",
					"color": "#1a4548",
					"name": "Primary"
				},
				{
					"slug": "secondary",
					"color": "#ffe2c7",
					"name": "Secondary"
				},
				{
					"slug": "tertiary",
					"color": "#F6F6F6",
					"name": "Tertiary"
				}
			]
		},
		"custom": {
			"spacing": {
				"small": "max(1.25rem, 5vw)",
				"medium": "clamp(2rem, 8vw, calc(4 * var(--wp--style--block-gap)))",
				"large": "clamp(4rem, 10vw, 8rem)",
				"outer": "var(--wp--custom--spacing--small, 1.25rem)"
			},
			"typography": {
				"font-size": {
					"huge": "clamp(2.25rem, 4vw, 2.75rem)",
					"gigantic": "clamp(2.75rem, 6vw, 3.25rem)",
					"colossal": "clamp(3.25rem, 8vw, 6.25rem)"
				},
				"line-height": {
					"tiny": 1.15,
					"small": 1.2,
					"medium": 1.4,
					"normal": 1.6
				}
			}
		},
		"spacing": {
			"units": [
				"%",
				"px",
				"em",
				"rem",
				"vh",
				"vw"
			]
		},
		"typography": {
			"dropCap": false,
			"fontFamilies": [
				{
					"fontFamily": "-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif",
					"name": "System Font",
					"slug": "system-font"
				},
				{
					"fontFamily": "\"Source Serif Pro\", serif",
					"name": "Source Serif Pro",
					"slug": "source-serif-pro",
					"fontFace": [
						{
							"fontFamily": "Source Serif Pro",
							"fontWeight": "200 900",
							"fontStyle": "normal",
							"fontStretch": "normal",
							"src": [ "file:./assets/fonts/source-serif-pro/SourceSerif4Variable-Roman.ttf.woff2" ]
						},
						{
							"fontFamily": "Source Serif Pro",
							"fontWeight": "200 900",
							"fontStyle": "italic",
							"fontStretch": "normal",
							"src": [ "file:./assets/fonts/source-serif-pro/SourceSerif4Variable-Italic.ttf.woff2" ]
						}
					]
				}
			],
			"fontSizes": [
				{
					"size": "1rem",
					"slug": "small"
				},
				{
					"size": "1.125rem",
					"slug": "medium"
				},
				{
					"size": "1.75rem",
					"slug": "large"
				},
				{
					"size": "clamp(1.75rem, 3vw, 2.25rem)",
					"slug": "x-large"
				}
			]
		},
		"layout": {
			"contentSize": "650px",
			"wideSize": "1000px"
		}
	},
	"styles": {
		"blocks": {
			"core/button": {
				"border": {
					"radius": "0"
				},
				"color": {
					"background": "var(--wp--preset--color--primary)",
					"text": "var(--wp--preset--color--background)"
				},
				"typography": {
					"fontSize": "var(--wp--preset--font-size--medium)"
				}
			},
			"core/post-title": {
				"typography": {
					"fontFamily": "var(--wp--preset--font-family--source-serif-pro)",
					"fontWeight": "300",
					"lineHeight": "var(--wp--custom--typography--line-height--tiny)",
					"fontSize": "var(--wp--custom--typography--font-size--gigantic)"
				}
			},
			"core/post-comments": {
				"spacing": {
					"padding": {
						"top": "var(--wp--custom--spacing--small)"
					}
				}
			},
			"core/pullquote": {
				"border": {
					"width": "1px 0"
				}
			},
			"core/query-title": {
				"typography": {
					"fontFamily": "var(--wp--preset--font-family--source-serif-pro)",
					"fontWeight": "300",
					"lineHeight": "var(--wp--custom--typography--line-height--small)",
					"fontSize": "var(--wp--custom--typography--font-size--gigantic)"
				}
			},
			"core/quote": {
				"border": {
					"width": "1px"
				}
			},
			"core/site-title": {
				"typography": {
					"fontFamily": "var(--wp--preset--font-family--system-font)",
					"lineHeight": "var(--wp--custom--typography--line-height--normal)",
					"fontSize": "var(--wp--preset--font-size--medium)",
					"fontStyle": "italic",
					"fontWeight": "normal"
				}
			}
		},
		"color": {
			"background": "var(--wp--preset--color--background)",
			"text": "var(--wp--preset--color--foreground)"
		},
		"elements": {
			"h1": {
				"typography": {
					"fontFamily": "var(--wp--preset--font-family--source-serif-pro)",
					"fontWeight": "300",
					"lineHeight": "var(--wp--custom--typography--line-height--tiny)",
					"fontSize": "var(--wp--custom--typography--font-size--colossal)"
				}
			},
			"h2": {
				"typography": {
					"fontFamily": "var(--wp--preset--font-family--source-serif-pro)",
					"fontWeight": "300",
					"lineHeight": "var(--wp--custom--typography--line-height--small)",
					"fontSize": "var(--wp--custom--typography--font-size--gigantic)"
				}
			},
			"h3": {
				"typography": {
					"fontFamily": "var(--wp--preset--font-family--source-serif-pro)",
					"fontWeight": "300",
					"lineHeight": "var(--wp--custom--typography--line-height--tiny)",
					"fontSize": "var(--wp--custom--typography--font-size--huge)"
				}
			},
			"h4": {
				"typography": {
					"fontFamily": "var(--wp--preset--font-family--source-serif-pro)",
					"fontWeight": "300",
					"lineHeight": "var(--wp--custom--typography--line-height--tiny)",
					"fontSize": "var(--wp--preset--font-size--x-large)"
				}
			},
			"h5": {
				"typography": {
					"fontFamily": "var(--wp--preset--font-family--system-font)",
					"fontWeight": "700",
					"textTransform": "uppercase",
					"lineHeight": "var(--wp--custom--typography--line-height--normal)",
					"fontSize": "var(--wp--preset--font-size--medium)"
				}
			},
			"h6": {
				"typography": {
					"fontFamily": "var(--wp--preset--font-family--system-font)",
					"fontWeight": "400",
					"textTransform": "uppercase",
					"lineHeight": "var(--wp--custom--typography--line-height--normal)",
					"fontSize": "var(--wp--preset--font-size--medium)"
				}
			},
			"link": {
				"color": {
					"text": "var(--wp--preset--color--foreground)"
				}
			}
		},
		"spacing": {
			"blockGap": "1.5rem"
		},
		"typography": {
			"fontFamily": "var(--wp--preset--font-family--system-font)",
			"lineHeight": "var(--wp--custom--typography--line-height--normal)",
			"fontSize": "var(--wp--preset--font-size--medium)"
		}
	},
	"templateParts": [
		{
			"name": "header",
			"title": "Header",
			"area": "header"
		},
		{
			"name": "header-large-dark",
			"title": "Header (Dark, large)",
			"area": "header"
		},
		{
			"name": "header-small-dark",
			"title": "Header (Dark, small)",
			"area": "header"
		},
		{
			"name": "footer",
			"title": "Footer",
			"area": "footer"
		}
	]
}

twentytwentythree

{
	"$schema": "https://schemas.wp.org/trunk/theme.json",
	"version": 2,
	"customTemplates": [
		{
			"name": "blank",
			"postTypes": [
				"page",
				"post"
			],
			"title": "Blank"
		},
		{
			"name": "blog-alternative",
			"postTypes": [
				"page"
			],
			"title": "Blog (Alternative)"
		},
		{
			"name": "404",
			"postTypes": [
				"page"
			],
			"title": "404"
		}
	],
	"settings": {
		"appearanceTools": true,
		"color": {
			"palette": [
				{
					"color": "#ffffff",
					"name": "Base",
					"slug": "base"
				},
				{
					"color": "#000000",
					"name": "Contrast",
					"slug": "contrast"
				},
				{
					"color": "#9DFF20",
					"name": "Primary",
					"slug": "primary"
				},
				{
					"color": "#345C00",
					"name": "Secondary",
					"slug": "secondary"
				},
				{
					"color": "#F6F6F6",
					"name": "Tertiary",
					"slug": "tertiary"
				}
			]
		},
		"layout": {
			"contentSize": "650px",
			"wideSize": "1200px"
		},
		"spacing": {
			"spacingScale": {
				"steps": 0
			},
			"spacingSizes": [
				{
					"size": "clamp(1.5rem, 5vw, 2rem)",
					"slug": "30",
					"name": "1"
				},
				{
					"size": "clamp(1.8rem, 1.8rem + ((1vw - 0.48rem) * 2.885), 3rem)",
					"slug": "40",
					"name": "2"
				},
				{
					"size": "clamp(2.5rem, 8vw, 4.5rem)",
					"slug": "50",
					"name": "3"
				},
				{
					"size": "clamp(3.75rem, 10vw, 7rem)",
					"slug": "60",
					"name": "4"
				},
				{
					"size": "clamp(5rem, 5.25rem + ((1vw - 0.48rem) * 9.096), 8rem)",
					"slug": "70",
					"name": "5"
				},
				{
					"size": "clamp(7rem, 14vw, 11rem)",
					"slug": "80",
					"name": "6"
				}
			],
			"units": [
				"%",
				"px",
				"em",
				"rem",
				"vh",
				"vw"
			]
		},
		"typography": {
			"dropCap": false,
			"fluid": true,
			"fontFamilies": [
				{
					"fontFace": [
						{
							"fontFamily": "DM Sans",
							"fontStretch": "normal",
							"fontStyle": "normal",
							"fontWeight": "400",
							"src": [
								"file:./assets/fonts/dm-sans/DMSans-Regular.woff2"
							]
						},
						{
							"fontFamily": "DM Sans",
							"fontStretch": "normal",
							"fontStyle": "italic",
							"fontWeight": "400",
							"src": [
								"file:./assets/fonts/dm-sans/DMSans-Regular-Italic.woff2"
							]
						},
						{
							"fontFamily": "DM Sans",
							"fontStretch": "normal",
							"fontStyle": "normal",
							"fontWeight": "700",
							"src": [
								"file:./assets/fonts/dm-sans/DMSans-Bold.woff2"
							]
						},
						{
							"fontFamily": "DM Sans",
							"fontStretch": "normal",
							"fontStyle": "italic",
							"fontWeight": "700",
							"src": [
								"file:./assets/fonts/dm-sans/DMSans-Bold-Italic.woff2"
							]
						}
					],
					"fontFamily": "\"DM Sans\", sans-serif",
					"name": "DM Sans",
					"slug": "dm-sans"
				},
				{
					"fontFace": [
						{
							"fontDisplay": "block",
							"fontFamily": "IBM Plex Mono",
							"fontStretch": "normal",
							"fontStyle": "normal",
							"fontWeight": "300",
							"src": [
								"file:./assets/fonts/ibm-plex-mono/IBMPlexMono-Light.woff2"
							]
						},
						{
							"fontDisplay": "block",
							"fontFamily": "IBM Plex Mono",
							"fontStretch": "normal",
							"fontStyle": "normal",
							"fontWeight": "400",
							"src": [
								"file:./assets/fonts/ibm-plex-mono/IBMPlexMono-Regular.woff2"
							]
						},
						{
							"fontDisplay": "block",
							"fontFamily": "IBM Plex Mono",
							"fontStretch": "normal",
							"fontStyle": "italic",
							"fontWeight": "400",
							"src": [
								"file:./assets/fonts/ibm-plex-mono/IBMPlexMono-Italic.woff2"
							]
						},
						{
							"fontDisplay": "block",
							"fontFamily": "IBM Plex Mono",
							"fontStretch": "normal",
							"fontStyle": "normal",
							"fontWeight": "700",
							"src": [
								"file:./assets/fonts/ibm-plex-mono/IBMPlexMono-Bold.woff2"
							]
						}
					],
					"fontFamily": "'IBM Plex Mono', monospace",
					"name": "IBM Plex Mono",
					"slug": "ibm-plex-mono"
				},
				{
					"fontFace": [
						{
							"fontFamily": "Inter",
							"fontStretch": "normal",
							"fontStyle": "normal",
							"fontWeight": "200 900",
							"src": [
								"file:./assets/fonts/inter/Inter-VariableFont_slnt,wght.ttf"
							]
						}
					],
					"fontFamily": "\"Inter\", sans-serif",
					"name": "Inter",
					"slug": "inter"
				},
				{
					"fontFamily": "-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif",
					"name": "System Font",
					"slug": "system-font"
				},
				{
					"fontFace": [
						{
							"fontFamily": "Source Serif Pro",
							"fontStretch": "normal",
							"fontStyle": "normal",
							"fontWeight": "200 900",
							"src": [
								"file:./assets/fonts/source-serif-pro/SourceSerif4Variable-Roman.ttf.woff2"
							]
						},
						{
							"fontFamily": "Source Serif Pro",
							"fontStretch": "normal",
							"fontStyle": "italic",
							"fontWeight": "200 900",
							"src": [
								"file:./assets/fonts/source-serif-pro/SourceSerif4Variable-Italic.ttf.woff2"
							]
						}
					],
					"fontFamily": "\"Source Serif Pro\", serif",
					"name": "Source Serif Pro",
					"slug": "source-serif-pro"
				}
			],
			"fontSizes": [
				{
					"fluid": {
						"min": "0.875rem",
						"max": "1rem"
					},
					"size": "1rem",
					"slug": "small"
				},
				{
					"fluid": {
						"min": "1rem",
						"max": "1.125rem"
					},
					"size": "1.125rem",
					"slug": "medium"
				},
				{
					"fluid": {
						"min": "1.75rem",
						"max": "1.875rem"
					},
					"size": "1.75rem",
					"slug": "large"
				},
				{
					"fluid": false,
					"size": "2.25rem",
					"slug": "x-large"
				},
				{
					"fluid": {
						"min": "4rem",
						"max": "10rem"
					},
					"size": "10rem",
					"slug": "xx-large"
				}
			]
		},
		"useRootPaddingAwareAlignments": true
	},
	"styles": {
		"blocks": {
			"core/navigation": {
				"elements": {
					"link": {
						":hover": {
							"typography": {
								"textDecoration": "underline"
							}
						},
						":focus": {
							"typography": {
								"textDecoration": "underline dashed"
							}
						},
						":active": {
							"typography": {
								"textDecoration": "none"
							}
						},
						"typography": {
							"textDecoration": "none"
						}
					}
				},
				"typography": {
					"fontSize": "var(--wp--preset--font-size--small)"
				}
			},
			"core/post-author": {
				"typography": {
					"fontSize": "var(--wp--preset--font-size--small)"
				}
			},
			"core/post-content": {
				"elements": {
					"link": {
						"color": {
							"text": "var(--wp--preset--color--secondary)"
						}
					}
				}
			},
			"core/post-excerpt": {
				"typography": {
					"fontSize": "var(--wp--preset--font-size--medium)"
				}
			},
			"core/post-date": {
				"typography": {
					"fontSize": "var(--wp--preset--font-size--small)",
					"fontWeight": "400"
				},
				"elements": {
					"link": {
						"typography": {
							"textDecoration": "none"
						},
						":hover": {
							"typography": {
								"textDecoration": "underline"
							}
						}
					}
				}
			},
			"core/post-terms": {
				"typography": {
					"fontSize": "var(--wp--preset--font-size--small)"
				}
			},
			"core/post-title": {
				"spacing": {
					"margin": {
						"bottom": "1.25rem",
						"top": "1.25rem"
					}
				},
				"typography": {
					"fontWeight": "400"
				},
				"elements": {
					"link": {
						":hover": {
							"typography": {
								"textDecoration": "underline"
							}
						},
						":focus": {
							"typography": {
								"textDecoration": "underline dashed"
							}
						},
						":active": {
							"color": {
								"text": "var(--wp--preset--color--secondary)"
							},
							"typography": {
								"textDecoration": "none"
							}
						},
						"typography": {
							"textDecoration": "none"
						}
					}
				}
			},
			"core/comments-title":{
				"typography": {
					"fontSize": "var(--wp--preset--font-size--large)"
				},
				"spacing": {
					"margin": {
						"bottom": "var(--wp--preset--spacing--40)"
					}
				}
			},
			"core/comment-author-name": {
				"elements": {
					"link": {
						":hover": {
							"typography": {
								"textDecoration": "underline"
							}
						},
						":focus": {
							"typography": {
								"textDecoration": "underline dashed"
							}
						},
						":active": {
							"color": {
								"text": "var(--wp--preset--color--secondary)"
							},
							"typography": {
								"textDecoration": "none"
							}
						},
						"typography": {
							"textDecoration": "none"
						}
					}
				}
			},
			"core/comment-date": {
				"typography": {
					"fontSize": "var(--wp--preset--font-size--small)"
				},
				"elements": {
					"link": {
						":hover": {
							"typography": {
								"textDecoration": "underline"
							}
						},
						":focus": {
							"typography": {
								"textDecoration": "underline dashed"
							}
						},
						":active": {
							"color": {
								"text": "var(--wp--preset--color--secondary)"
							},
							"typography": {
								"textDecoration": "none"
							}
						},
						"typography": {
							"textDecoration": "none"
						}
					}
				}
			},
			"core/comment-edit-link": {
				"typography": {
					"fontSize": "var(--wp--preset--font-size--small)"
				}
			},
			"core/comment-reply-link": {
				"typography": {
					"fontSize": "var(--wp--preset--font-size--small)"
				}
			},
			"core/comments-pagination": {
				"spacing": {
					"margin": {
						"top": "var(--wp--preset--spacing--40)"
					}
				},
				"elements": {
					"link": {
						"typography": {
							"textDecoration": "none"
						}
					}
				}
			},
			"core/pullquote": {
				"border": {
					"style": "solid",
					"width": "1px 0"
				},
				"elements": {
					"cite": {
						"typography": {
							"fontSize": "var(--wp--preset--font-size--small)",
							"fontStyle": "normal",
							"textTransform": "none"
						}
					}
				},
				"typography": {
					"lineHeight": "1.3"
				},
				"spacing": {
					"margin": {
						"bottom": "var(--wp--preset--spacing--40) !important",
						"top": "var(--wp--preset--spacing--40) !important"
					}
				}
			},
			"core/query": {
				"elements": {
					"h2": {
						"typography": {
							"fontSize": "var(--wp--preset--font-size--x-large)"
						}
					}
				}
			},
			"core/query-pagination": {
				"typography": {
					"fontSize": "var(--wp--preset--font-size--small)",
					"fontWeight": "400"
				},
				"elements": {
					"link": {
						"typography": {
							"textDecoration": "none"
						},
						":hover": {
							"typography": {
								"textDecoration": "underline"
							}
						}
					}
				}
			},
			"core/quote": {
				"border": {
					"width": "1px"
				},
				"elements": {
					"cite": {
						"typography": {
							"fontSize": "var(--wp--preset--font-size--small)",
							"fontStyle": "normal"
						}
					}
				},
				"spacing": {
					"padding": {
						"left": "var(--wp--preset--spacing--30)",
						"right": "var(--wp--preset--spacing--30)"
					}
				}
			},
			"core/site-title": {
				"elements": {
					"link": {
						":hover": {
							"typography": {
								"textDecoration": "underline"
							}
						},
						":focus": {
							"typography": {
								"textDecoration": "underline dashed"
							}
						},
						":active": {
							"color": {
								"text": "var(--wp--preset--color--secondary)"
							},
							"typography": {
								"textDecoration": "none"
							}
						},
						"typography": {
							"textDecoration": "none"
						}
					}
				},
				"typography": {
					"fontSize": "var(--wp--preset--font-size--medium)",
					"fontWeight": "normal",
					"lineHeight": "1.4"
				}
			}
		},
		"color": {
			"background": "var(--wp--preset--color--base)",
			"text": "var(--wp--preset--color--contrast)"
		},
		"elements": {
			"button": {
				"border": {
					"radius": "0"
				},
				"color": {
					"background": "var(--wp--preset--color--primary)",
					"text": "var(--wp--preset--color--contrast)"
				},
				":hover": {
					"color": {
						"background": "var(--wp--preset--color--contrast)",
						"text": "var(--wp--preset--color--base)"
					}
				},
				":focus": {
					"color": {
						"background": "var(--wp--preset--color--contrast)",
						"text": "var(--wp--preset--color--base)"
					}
				},
				":active": {
					"color": {
						"background": "var(--wp--preset--color--secondary)",
						"text": "var(--wp--preset--color--base)"
					}
				},
				":visited": {
					"color": {
						"text": "var(--wp--preset--color--contrast)"
					}
				}
			},
			"h1": {
				"typography": {
					"fontSize": "3.625rem",
					"lineHeight": "1.2"
				}
			},
			"h2": {
				"typography": {
					"fontSize": "clamp(2.625rem, calc(2.625rem + ((1vw - 0.48rem) * 8.4135)), 3.25rem)",
					"lineHeight": "1.2"
				}
			},
			"h3": {
				"typography": {
					"fontSize": "var(--wp--preset--font-size--x-large)"
				}
			},
			"h4": {
				"typography": {
					"fontSize": "var(--wp--preset--font-size--large)"
				}
			},
			"h5": {
				"typography": {
					"fontSize": "var(--wp--preset--font-size--medium)",
					"fontWeight": "700",
					"textTransform": "uppercase"
				}
			},
			"h6": {
				"typography": {
					"fontSize": "var(--wp--preset--font-size--medium)",
					"textTransform": "uppercase"
				}
			},
			"heading": {
				"typography": {
					"fontWeight": "400",
					"lineHeight": "1.4"
				}
			},
			"link": {
				"color": {
					"text": "var(--wp--preset--color--contrast)"
				},
				":hover": {
					"typography": {
						"textDecoration": "none"
					}
				},
				":focus": {
					"typography": {
						"textDecoration": "underline dashed"
					}
				},
				":active": {
					"color": {
						"text": "var(--wp--preset--color--secondary)"
					},
					"typography": {
						"textDecoration": "none"
					}
				},
				"typography": {
					"textDecoration": "underline"
				}
			}
		},
		"spacing": {
			"blockGap": "1.5rem",
			"padding": {
				"top": "var(--wp--preset--spacing--40)",
				"right": "var(--wp--preset--spacing--30)",
				"bottom": "var(--wp--preset--spacing--40)",
				"left": "var(--wp--preset--spacing--30)"
			}
		},
		"typography": {
			"fontFamily": "var(--wp--preset--font-family--system-font)",
			"fontSize": "var(--wp--preset--font-size--medium)",
			"lineHeight": "1.6"
		}
	},
	"templateParts": [
		{
			"area": "header",
			"name": "header",
			"title": "Header"
		},
		{
			"area": "footer",
			"name": "footer",
			"title": "Footer"
		},
		{
			"area": "uncategorized",
			"name": "comments",
			"title": "Comments"
		},
		{
			"area": "uncategorized",
			"name": "post-meta",
			"title": "Post Meta"
		}
	]
}

-ブロックテーマ

Copyright© WordPressの始め方 , 2024 All Rights Reserved.