Browse Source

typography settings for sk8prk, refactored BB headings rules

Maggie 4 years ago
parent
commit
80229b73a9

+ 21 - 7
blockbase/theme.json

@@ -374,13 +374,6 @@
 					"width": "2px"
 				}
 			},
-			"core/heading": {
-				"typography": {
-					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
-					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
-					"lineHeight": "var(--wp--custom--heading--typography--line-height)"
-				}
-			},
 			"core/navigation": {
 				"typography": {
 					"fontSize": "var(--wp--preset--font-size--normal)"
@@ -460,36 +453,57 @@
 		"elements": {
 			"h1": {
 				"typography": {
+					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
+					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
+					"lineHeight": "var(--wp--custom--heading--typography--line-height)",
 					"fontSize": "48px"
 				}
 			},
 			"h2": {
 				"typography": {
+					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
+					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
+					"lineHeight": "var(--wp--custom--heading--typography--line-height)",
 					"fontSize": "32px"
 				}
 			},
 			"h3": {
 				"typography": {
+					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
+					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
+					"lineHeight": "var(--wp--custom--heading--typography--line-height)",
 					"fontSize": "var(--wp--preset--font-size--huge)"
 				}
 			},
 			"h4": {
 				"typography": {
+					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
+					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
+					"lineHeight": "var(--wp--custom--heading--typography--line-height)",
 					"fontSize": "var(--wp--preset--font-size--large)"
 				}
 			},
 			"h5": {
 				"typography": {
+					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
+					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
+					"lineHeight": "var(--wp--custom--heading--typography--line-height)",
 					"fontSize": "var(--wp--preset--font-size--normal)"
 				}
 			},
 			"h6": {
 				"typography": {
+					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
+					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
+					"lineHeight": "var(--wp--custom--heading--typography--line-height)",
 					"fontSize": "var(--wp--preset--font-size--small)"
 				}
 			},
 			"link": {
 				"color": {
+					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
+					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
+					"lineHeight": "var(--wp--custom--heading--typography--line-height)",
 					"text": "var(--wp--custom--color--primary)"
 				}
 			}

+ 21 - 7
mayland-blocks/theme.json

@@ -402,13 +402,6 @@
 					"width": "2px"
 				}
 			},
-			"core/heading": {
-				"typography": {
-					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
-					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
-					"lineHeight": "var(--wp--custom--heading--typography--line-height)"
-				}
-			},
 			"core/navigation": {
 				"typography": {
 					"fontSize": "var(--wp--preset--font-size--small)"
@@ -488,36 +481,57 @@
 		"elements": {
 			"h1": {
 				"typography": {
+					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
+					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
+					"lineHeight": "var(--wp--custom--heading--typography--line-height)",
 					"fontSize": "41.47px"
 				}
 			},
 			"h2": {
 				"typography": {
+					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
+					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
+					"lineHeight": "var(--wp--custom--heading--typography--line-height)",
 					"fontSize": "var(--wp--preset--font-size--huge)"
 				}
 			},
 			"h3": {
 				"typography": {
+					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
+					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
+					"lineHeight": "var(--wp--custom--heading--typography--line-height)",
 					"fontSize": "var(--wp--preset--font-size--large)"
 				}
 			},
 			"h4": {
 				"typography": {
+					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
+					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
+					"lineHeight": "var(--wp--custom--heading--typography--line-height)",
 					"fontSize": "24px"
 				}
 			},
 			"h5": {
 				"typography": {
+					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
+					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
+					"lineHeight": "var(--wp--custom--heading--typography--line-height)",
 					"fontSize": "var(--wp--preset--font-size--normal)"
 				}
 			},
 			"h6": {
 				"typography": {
+					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
+					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
+					"lineHeight": "var(--wp--custom--heading--typography--line-height)",
 					"fontSize": "var(--wp--preset--font-size--small)"
 				}
 			},
 			"link": {
 				"color": {
+					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
+					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
+					"lineHeight": "var(--wp--custom--heading--typography--line-height)",
 					"text": "var(--wp--custom--color--foreground)"
 				}
 			}

+ 27 - 19
quadrat/theme.json

@@ -446,13 +446,6 @@
 					"lineHeight": "1.6"
 				}
 			},
-			"core/heading": {
-				"typography": {
-					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
-					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
-					"lineHeight": "var(--wp--custom--heading--typography--line-height)"
-				}
-			},
 			"core/navigation": {
 				"typography": {
 					"fontSize": "18px"
@@ -564,42 +557,57 @@
 		"elements": {
 			"h1": {
 				"typography": {
-					"fontSize": "var(--wp--custom--heading--h1--font-size)",
-					"lineHeight": 1.2
+					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
+					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
+					"lineHeight": 1.2,
+					"fontSize": "var(--wp--custom--heading--h1--font-size)"
 				}
 			},
 			"h2": {
 				"typography": {
-					"fontSize": "min(max(36px, 6vw), 65px)",
-					"lineHeight": 1.2
+					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
+					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
+					"lineHeight": 1.2,
+					"fontSize": "min(max(36px, 6vw), 65px)"
 				}
 			},
 			"h3": {
 				"typography": {
-					"fontSize": "var(--wp--custom--heading--h3--font-size)",
-					"lineHeight": 1.2
+					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
+					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
+					"lineHeight": 1.2,
+					"fontSize": "var(--wp--custom--heading--h3--font-size)"
 				}
 			},
 			"h4": {
 				"typography": {
-					"fontSize": "20px",
-					"lineHeight": 1.4
+					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
+					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
+					"lineHeight": 1.4,
+					"fontSize": "20px"
 				}
 			},
 			"h5": {
 				"typography": {
-					"fontSize": "18px",
-					"lineHeight": 1.4
+					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
+					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
+					"lineHeight": 1.4,
+					"fontSize": "18px"
 				}
 			},
 			"h6": {
 				"typography": {
-					"fontSize": "16px",
-					"lineHeight": 1.4
+					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
+					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
+					"lineHeight": 1.4,
+					"fontSize": "16px"
 				}
 			},
 			"link": {
 				"color": {
+					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
+					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
+					"lineHeight": "var(--wp--custom--heading--typography--line-height)",
 					"text": "var(--wp--custom--color--foreground)"
 				}
 			}

+ 21 - 7
seedlet-blocks/theme.json

@@ -431,13 +431,6 @@
 					"width": "2px"
 				}
 			},
-			"core/heading": {
-				"typography": {
-					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
-					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
-					"lineHeight": "var(--wp--custom--heading--typography--line-height)"
-				}
-			},
 			"core/navigation": {
 				"typography": {
 					"fontSize": "var(--wp--preset--font-size--normal)"
@@ -522,36 +515,57 @@
 		"elements": {
 			"h1": {
 				"typography": {
+					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
+					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
+					"lineHeight": "var(--wp--custom--heading--typography--line-height)",
 					"fontSize": "48px"
 				}
 			},
 			"h2": {
 				"typography": {
+					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
+					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
+					"lineHeight": "var(--wp--custom--heading--typography--line-height)",
 					"fontSize": "32px"
 				}
 			},
 			"h3": {
 				"typography": {
+					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
+					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
+					"lineHeight": "var(--wp--custom--heading--typography--line-height)",
 					"fontSize": "var(--wp--preset--font-size--huge)"
 				}
 			},
 			"h4": {
 				"typography": {
+					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
+					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
+					"lineHeight": "var(--wp--custom--heading--typography--line-height)",
 					"fontSize": "var(--wp--preset--font-size--large)"
 				}
 			},
 			"h5": {
 				"typography": {
+					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
+					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
+					"lineHeight": "var(--wp--custom--heading--typography--line-height)",
 					"fontSize": "var(--wp--preset--font-size--normal)"
 				}
 			},
 			"h6": {
 				"typography": {
+					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
+					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
+					"lineHeight": "var(--wp--custom--heading--typography--line-height)",
 					"fontSize": "var(--wp--preset--font-size--small)"
 				}
 			},
 			"link": {
 				"color": {
+					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
+					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
+					"lineHeight": "var(--wp--custom--heading--typography--line-height)",
 					"text": "var(--wp--custom--color--primary)"
 				}
 			}

+ 12 - 0
skatepark/assets/theme.css

@@ -42,4 +42,16 @@
 	color: var(--wp--preset--color--background);
 }
 
+h4 {
+	text-transform: var(--wp--custom--heading--h4--text-transform);
+}
+
+h5 {
+	text-transform: var(--wp--custom--heading--h5--text-transform);
+}
+
+h6 {
+	text-transform: var(--wp--custom--heading--h6--text-transform);
+}
+
 /*# sourceMappingURL=theme.css.map */

+ 128 - 0
skatepark/child-theme.json

@@ -16,13 +16,141 @@
 			]
 		},
 		"custom": {
+			"body": {
+				"typography": {
+					"fontFamily": "var(--wp--preset--font-family--red-hat-display)",
+					"lineHeight": 1.6
+				}
+			},
 			"color": {
 				"foreground": "var(--wp--preset--color--primary)",
 				"background": "var(--wp--preset--color--background)",
 				"primary": "var(--wp--preset--color--primary)",
 				"secondary": "var(--wp--preset--color--primary)",
 				"selection": "var(--wp--preset--color--primary)"
+			},
+			"fontsToLoadFromGoogle": [
+				"family=Red+Hat+Display:ital,wght@0,400;0,500;0,700;0,900;1,400;1,500;1,700;1,900"
+			],
+			"heading": {
+				"typography": {
+					"fontFamily": "var(--wp--preset--font-family--red-hat-display)",
+					"fontWeight": "700"
+				},
+				"h1": {
+					"fontSize": "min(max(48px, 7vw), 72px)"
+				},
+				"h2": {
+					"fontSize": "min(max(36px, 5vw), 64px)"
+				},
+				"h3": {
+					"fontSize": "min(max(30px, 5vw), 48px)"
+				},
+				"h4": {
+					"textTransform": "uppercase"
+				},
+				"h5": {
+					"textTransform": "uppercase"
+				},
+				"h6": {
+					"textTransform": "uppercase"
+				}
+			},
+			"line-height": {
+				"body": 1.6
 			}
+		},
+		"typography": {
+			"customFontSize": true,
+			"customLineHeight": true,
+			"fontFamilies": [
+				{
+					"fontFamily": "\"Red Hat Display\", sans-serif",
+					"slug": "red-hat-display",
+					"name": "Red Hat Display"
+				}
+			],
+			"fontSizes": [
+				{
+					"name": "Tiny",
+					"size": "14px",
+					"slug": "tiny"
+				},
+				{
+					"name": "Extra Small",
+					"size": "16px",
+					"slug": "small"
+				},
+				{
+					"name": "Small",
+					"size": "20px",
+					"slug": "normal"
+				},
+				{
+					"name": "Medium",
+					"size": "24px",
+					"slug": "large"
+				},
+				{
+					"name": "Large",
+					"size": "min(max(28px, 5vw), 36px)",
+					"slug": "extra-large"
+				},
+				{
+					"name": "Extra Large",
+					"size": "min(max(36px, 5vw), 48px)",
+					"slug": "huge"
+				}
+			]
+		}
+	},
+	"styles": {
+		"elements": {
+			"h1": {
+				"typography": {
+					"fontSize": "var(--wp--custom--heading--h1--font-size)",
+					"lineHeight": 1.2,
+					"fontWeight": "700"
+				}
+			},
+			"h2": {
+				"typography": {
+					"fontSize": "var(--wp--custom--heading--h2--font-size)",
+					"lineHeight": 1.2,
+					"fontWeight": "900"
+				}
+			},
+			"h3": {
+				"typography": {
+					"fontSize": "var(--wp--custom--heading--h3--font-size)",
+					"lineHeight": 1.4,
+					"fontWeight": "900"
+				}
+			},
+			"h4": {
+				"typography": {
+					"fontSize": "20px",
+					"lineHeight": 1.3,
+					"fontWeight": "900"
+				}
+			},
+			"h5": {
+				"typography": {
+					"fontSize": "16px",
+					"lineHeight": 1.3,
+					"fontWeight": "900"
+				}
+			},
+			"h6": {
+				"typography": {
+					"fontSize": "14px",
+					"lineHeight": 1.3,
+					"fontWeight": "900"
+				}
+			}
+		},
+		"typography": {
+			"fontWeight": "400"
 		}
 	}
 }

+ 12 - 1
skatepark/sass/base/_text.scss

@@ -1,5 +1,16 @@
 // Text selection text color
-
 ::selection {
 	color: var(--wp--preset--color--background);
+}
+
+h4 {
+	text-transform: var(--wp--custom--heading--h4--text-transform);
+}
+
+h5 {
+	text-transform: var(--wp--custom--heading--h5--text-transform);
+}
+
+h6 {
+	text-transform: var(--wp--custom--heading--h6--text-transform);
 }

+ 73 - 26
skatepark/theme.json

@@ -165,15 +165,33 @@
 			},
 			"body": {
 				"typography": {
-					"fontFamily": "var(--wp--preset--font-family--system-font)",
+					"fontFamily": "var(--wp--preset--font-family--red-hat-display)",
 					"lineHeight": 1.6
 				}
 			},
 			"heading": {
 				"typography": {
-					"fontFamily": "var(--wp--preset--font-family--system-font)",
-					"fontWeight": 400,
+					"fontFamily": "var(--wp--preset--font-family--red-hat-display)",
+					"fontWeight": "700",
 					"lineHeight": 1.125
+				},
+				"h1": {
+					"fontSize": "min(max(48px, 7vw), 72px)"
+				},
+				"h2": {
+					"fontSize": "min(max(36px, 5vw), 64px)"
+				},
+				"h3": {
+					"fontSize": "min(max(30px, 5vw), 48px)"
+				},
+				"h4": {
+					"textTransform": "uppercase"
+				},
+				"h5": {
+					"textTransform": "uppercase"
+				},
+				"h6": {
+					"textTransform": "uppercase"
 				}
 			},
 			"latest-posts": {
@@ -183,6 +201,9 @@
 					}
 				}
 			},
+			"layout": {
+				"contentSize": "620px"
+			},
 			"list": {
 				"spacing": {
 					"padding": {
@@ -268,6 +289,12 @@
 					"textAlign": "center",
 					"margin": "var(--wp--custom--margin--vertical) auto"
 				}
+			},
+			"fontsToLoadFromGoogle": [
+				"family=Red+Hat+Display:ital,wght@0,400;0,500;0,700;0,900;1,400;1,500;1,700;1,900"
+			],
+			"line-height": {
+				"body": 1.6
 			}
 		},
 		"layout": {
@@ -289,9 +316,9 @@
 			"customLineHeight": true,
 			"fontFamilies": [
 				{
-					"fontFamily": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif",
-					"slug": "system-font",
-					"name": "System Font"
+					"fontFamily": "\"Red Hat Display\", sans-serif",
+					"slug": "red-hat-display",
+					"name": "Red Hat Display"
 				}
 			],
 			"fontSizes": [
@@ -301,23 +328,28 @@
 					"slug": "tiny"
 				},
 				{
-					"name": "Small",
+					"name": "Extra Small",
 					"size": "16px",
 					"slug": "small"
 				},
 				{
-					"name": "Normal",
-					"size": "18px",
+					"name": "Small",
+					"size": "20px",
 					"slug": "normal"
 				},
 				{
-					"name": "Large",
+					"name": "Medium",
 					"size": "24px",
 					"slug": "large"
 				},
 				{
-					"name": "Huge",
-					"size": "28px",
+					"name": "Large",
+					"size": "min(max(28px, 5vw), 36px)",
+					"slug": "extra-large"
+				},
+				{
+					"name": "Extra Large",
+					"size": "min(max(36px, 5vw), 48px)",
 					"slug": "huge"
 				}
 			]
@@ -356,13 +388,6 @@
 					"width": "2px"
 				}
 			},
-			"core/heading": {
-				"typography": {
-					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
-					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
-					"lineHeight": "var(--wp--custom--heading--typography--line-height)"
-				}
-			},
 			"core/navigation": {
 				"typography": {
 					"fontSize": "var(--wp--preset--font-size--normal)"
@@ -442,36 +467,57 @@
 		"elements": {
 			"h1": {
 				"typography": {
-					"fontSize": "48px"
+					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
+					"fontWeight": "700",
+					"lineHeight": 1.2,
+					"fontSize": "var(--wp--custom--heading--h1--font-size)"
 				}
 			},
 			"h2": {
 				"typography": {
-					"fontSize": "32px"
+					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
+					"fontWeight": "900",
+					"lineHeight": 1.2,
+					"fontSize": "var(--wp--custom--heading--h2--font-size)"
 				}
 			},
 			"h3": {
 				"typography": {
-					"fontSize": "var(--wp--preset--font-size--huge)"
+					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
+					"fontWeight": "900",
+					"lineHeight": 1.4,
+					"fontSize": "var(--wp--custom--heading--h3--font-size)"
 				}
 			},
 			"h4": {
 				"typography": {
-					"fontSize": "var(--wp--preset--font-size--large)"
+					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
+					"fontWeight": "900",
+					"lineHeight": 1.3,
+					"fontSize": "20px"
 				}
 			},
 			"h5": {
 				"typography": {
-					"fontSize": "var(--wp--preset--font-size--normal)"
+					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
+					"fontWeight": "900",
+					"lineHeight": 1.3,
+					"fontSize": "16px"
 				}
 			},
 			"h6": {
 				"typography": {
-					"fontSize": "var(--wp--preset--font-size--small)"
+					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
+					"fontWeight": "900",
+					"lineHeight": 1.3,
+					"fontSize": "14px"
 				}
 			},
 			"link": {
 				"color": {
+					"fontFamily": "var(--wp--custom--heading--typography--font-family)",
+					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
+					"lineHeight": "var(--wp--custom--heading--typography--line-height)",
 					"text": "var(--wp--custom--color--primary)"
 				}
 			}
@@ -479,7 +525,8 @@
 		"typography": {
 			"lineHeight": "var(--wp--custom--body--typography--line-height)",
 			"fontFamily": "var(--wp--custom--body--typography--font-family)",
-			"fontSize": "var(--wp--preset--font-size--normal)"
+			"fontSize": "var(--wp--preset--font-size--normal)",
+			"fontWeight": "400"
 		}
 	}
 }