浏览代码

Blockbase: update font sizes to rem instead of px for a11y (#5752)

Madhu Dollu 3 年之前
父节点
当前提交
e9a4d09191
共有 1 个文件被更改,包括 8 次插入7 次删除
  1. 8 7
      blockbase/theme.json

+ 8 - 7
blockbase/theme.json

@@ -173,8 +173,9 @@
 				}
 				}
 			],
 			],
 			"fontSizes": {
 			"fontSizes": {
-				"x-small": "14px",
-				"normal": "18px"
+				"x-small": "0.875rem",
+				"normal": "1.125rem",
+				"huge": "3rem"
 			},
 			},
 			"form": {
 			"form": {
 				"padding": "calc( 0.5 * var(--wp--custom--gap--horizontal) )",
 				"padding": "calc( 0.5 * var(--wp--custom--gap--horizontal) )",
@@ -375,22 +376,22 @@
 			"fontSizes": [
 			"fontSizes": [
 				{
 				{
 					"name": "Small",
 					"name": "Small",
-					"size": "16px",
+					"size": "1rem",
 					"slug": "small"
 					"slug": "small"
 				},
 				},
 				{
 				{
 					"name": "Medium",
 					"name": "Medium",
-					"size": "24px",
+					"size": "1.5rem",
 					"slug": "medium"
 					"slug": "medium"
 				},
 				},
 				{
 				{
 					"name": "Large",
 					"name": "Large",
-					"size": "28px",
+					"size": "1.75rem",
 					"slug": "large"
 					"slug": "large"
 				},
 				},
 				{
 				{
 					"name": "Extra Large",
 					"name": "Extra Large",
-					"size": "32px",
+					"size": "2rem",
 					"slug": "x-large"
 					"slug": "x-large"
 				}
 				}
 			]
 			]
@@ -545,7 +546,7 @@
 					"fontFamily": "var(--wp--preset--font-family--heading-font)",
 					"fontFamily": "var(--wp--preset--font-family--heading-font)",
 					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
 					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
 					"lineHeight": "var(--wp--custom--heading--typography--line-height)",
 					"lineHeight": "var(--wp--custom--heading--typography--line-height)",
-					"fontSize": "48px"
+					"fontSize": "var(--wp--custom--font-sizes--huge)"
 				},
 				},
 				"spacing": {
 				"spacing": {
 					"margin": {
 					"margin": {