Przeglądaj źródła

Quadrat/update font sizes (#4683)

* Updates themes.json htag font sizes

Updates font sizes for h4,5,6 in theme.json.

* Updates typography font sizes.

Updates tiny, small, normal, and extra large font sizes.

* Updates font sizes.

Citation and query pagination block font size updates.

* Updates font sizes.

Navigation and site title block font size update.

* Navigation font size update.

Updates responsive navigation font size.

* Fixes from review.

Changes font sizes to variables.

Props @scruffian for review.

* Replace font-size with variable.

Well spotted @scruffian - updated this and did a sweep for any other font-size in the theme. I don't see any more.

* Another sweep of fontSize replacement.

Found another instance in custom typography and core/code block.
Jeffrey Pearce 3 lat temu
rodzic
commit
de7a2473bb

+ 2 - 2
quadrat/assets/theme.css

@@ -270,7 +270,7 @@ ul ul {
 
 .wp-block-navigation.is-responsive .wp-block-navigation__responsive-container.is-menu-open.has-modal-open .wp-block-pages-list__item,
 .wp-block-navigation.is-responsive .wp-block-navigation__responsive-container.is-menu-open.has-modal-open .wp-block-navigation-link {
-	font-size: 20px;
+	font-size: var(--wp--preset--font-size--normal);
 	line-height: 50px;
 	margin: 0;
 	align-items: flex-end;
@@ -301,7 +301,7 @@ ul ul {
 .wp-block-navigation.is-responsive .wp-block-navigation__responsive-container.is-menu-open.has-modal-open .wp-block-navigation-link.has-child .wp-block-navigation-link__container .wp-block-pages-list__item__link,
 .wp-block-navigation.is-responsive .wp-block-navigation__responsive-container.is-menu-open.has-modal-open .wp-block-navigation-link.has-child .wp-block-navigation-link__container .wp-block-navigation-link__content {
 	padding: 0;
-	font-size: 15px;
+	font-size: var(--wp--preset--font-size--tiny);
 	line-height: 40px;
 }
 

+ 13 - 13
quadrat/child-theme.json

@@ -52,7 +52,7 @@
 					}
 				},
 				"typography": {
-					"fontSize": "20px",
+					"fontSize": "var(--wp--preset--font-size--normal)",
 					"fontWeight": "700"
 				}
 			},
@@ -219,17 +219,17 @@
 			"fontSizes": [
 				{
 					"name": "Tiny",
-					"size": "15px",
+					"size": "16px",
 					"slug": "tiny"
 				},
 				{
 					"name": "Small",
-					"size": "17px",
+					"size": "18px",
 					"slug": "small"
 				},
 				{
 					"name": "Normal",
-					"size": "18px",
+					"size": "20px",
 					"slug": "normal"
 				},
 				{
@@ -239,7 +239,7 @@
 				},
 				{
 					"name": "Extra Large",
-					"size": "min(max(28px, 5vw), 35px)",
+					"size": "min(max(28px, 5vw), 38px)",
 					"slug": "extra-large"
 				},
 				{
@@ -271,14 +271,14 @@
 					"background": "var(--wp--custom--color--tertiary)"
 				},
 				"typography": {
-					"fontSize": "20px",
+					"fontSize": "var(--wp--preset--font-size--normal)",
 					"fontWeight": "400",
 					"lineHeight": "1.6"
 				}
 			},
 			"core/navigation": {
 				"typography": {
-					"fontSize": "18px"
+					"fontSize": "var(--wp--preset--font-size--normal)"
 				}
 			},
 			"core/navigation-link": {
@@ -306,7 +306,7 @@
 				},
 				"citation": {
 					"typography": {
-						"fontSize": "15px",
+						"fontSize": "var(--wp--preset--font-size--tiny)",
 						"fontWeight": "400"
 					}
 				},
@@ -349,7 +349,7 @@
 			},
 			"core/query-pagination": {
 				"typography": {
-					"fontSize": "18px",
+					"fontSize": "var(--wp--preset--font-size--normal)",
 					"fontWeight": "500"
 				}
 			},
@@ -358,7 +358,7 @@
 					"link": "var(--wp--custom--color--primary)"
 				},
 				"typography": {
-					"fontSize": "18px",
+					"fontSize": "var(--wp--preset--font-size--normal)",
 					"fontWeight": 700,
 					"textTransform": "uppercase"
 				}
@@ -389,21 +389,21 @@
 			"h4": {
 				"typography": {
 					"fontFamily": "var(--wp--preset--font-family--dm-sans)",
-					"fontSize": "20px",
+					"fontSize": "var(--wp--preset--font-size--large)",
 					"lineHeight": 1.4
 				}
 			},
 			"h5": {
 				"typography": {
 					"fontFamily": "var(--wp--preset--font-family--dm-sans)",
-					"fontSize": "18px",
+					"fontSize": "var(--wp--preset--font-size--normal)",
 					"lineHeight": 1.4
 				}
 			},
 			"h6": {
 				"typography": {
 					"fontFamily": "var(--wp--preset--font-family--dm-sans)",
-					"fontSize": "16px",
+					"fontSize": "var(--wp--preset--font-size--small)",
 					"lineHeight": 1.4
 				}
 			},

+ 2 - 2
quadrat/sass/blocks/_navigation.scss

@@ -28,7 +28,7 @@
 		&.has-modal-open {
 			.wp-block-pages-list__item,
 			.wp-block-navigation-link {
-				font-size: 20px;
+				font-size: var(--wp--preset--font-size--normal);
 				line-height: 50px;
 				margin: 0;
 				align-items: flex-end;
@@ -45,7 +45,7 @@
 						.wp-block-pages-list__item__link,
 						.wp-block-navigation-link__content {
 							padding: 0;
-							font-size: 15px;
+							font-size: var(--wp--preset--font-size--tiny);
 							line-height: 40px;
 						}
 					}

+ 28 - 13
quadrat/theme.json

@@ -96,7 +96,7 @@
 					}
 				},
 				"typography": {
-					"fontSize": "20px",
+					"fontSize": "var(--wp--preset--font-size--normal)",
 					"fontWeight": "700",
 					"lineHeight": 2
 				}
@@ -386,17 +386,17 @@
 			"fontSizes": [
 				{
 					"name": "Tiny",
-					"size": "15px",
+					"size": "16px",
 					"slug": "tiny"
 				},
 				{
 					"name": "Small",
-					"size": "17px",
+					"size": "18px",
 					"slug": "small"
 				},
 				{
 					"name": "Normal",
-					"size": "18px",
+					"size": "20px",
 					"slug": "normal"
 				},
 				{
@@ -406,7 +406,7 @@
 				},
 				{
 					"name": "Extra Large",
-					"size": "min(max(28px, 5vw), 35px)",
+					"size": "min(max(28px, 5vw), 38px)",
 					"slug": "extra-large"
 				},
 				{
@@ -451,7 +451,7 @@
 				},
 				"typography": {
 					"fontFamily": "monospace",
-					"fontSize": "20px",
+					"fontSize": "var(--wp--preset--font-size--normal)",
 					"fontWeight": "400",
 					"lineHeight": "1.6"
 				},
@@ -459,9 +459,24 @@
 					"background": "var(--wp--custom--color--tertiary)"
 				}
 			},
+			"core/gallery": {
+				"spacing": {
+					"margin": {
+						"bottom": "var(--wp--custom--gap--vertical)"
+					}
+				}
+			},
+			"core/group": {
+				"spacing": {
+					"margin": {
+						"top": "var(--wp--custom--gap--vertical)",
+						"bottom": "var(--wp--custom--gap--vertical)"
+					}
+				}
+			},
 			"core/navigation": {
 				"typography": {
-					"fontSize": "18px"
+					"fontSize": "var(--wp--preset--font-size--normal)"
 				}
 			},
 			"core/post-title": {
@@ -513,7 +528,7 @@
 			},
 			"core/site-title": {
 				"typography": {
-					"fontSize": "18px",
+					"fontSize": "var(--wp--preset--font-size--normal)",
 					"fontWeight": 700,
 					"textTransform": "uppercase"
 				},
@@ -540,7 +555,7 @@
 				},
 				"citation": {
 					"typography": {
-						"fontSize": "15px",
+						"fontSize": "var(--wp--preset--font-size--tiny)",
 						"fontWeight": "400"
 					}
 				}
@@ -567,7 +582,7 @@
 			},
 			"core/query-pagination": {
 				"typography": {
-					"fontSize": "18px",
+					"fontSize": "var(--wp--preset--font-size--normal)",
 					"fontWeight": "500"
 				}
 			}
@@ -624,7 +639,7 @@
 					"fontFamily": "var(--wp--preset--font-family--dm-sans)",
 					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
 					"lineHeight": 1.4,
-					"fontSize": "20px"
+					"fontSize": "var(--wp--preset--font-size--large)"
 				},
 				"spacing": {
 					"margin": {
@@ -638,7 +653,7 @@
 					"fontFamily": "var(--wp--preset--font-family--dm-sans)",
 					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
 					"lineHeight": 1.4,
-					"fontSize": "18px"
+					"fontSize": "var(--wp--preset--font-size--normal)"
 				},
 				"spacing": {
 					"margin": {
@@ -652,7 +667,7 @@
 					"fontFamily": "var(--wp--preset--font-family--dm-sans)",
 					"fontWeight": "var(--wp--custom--heading--typography--font-weight)",
 					"lineHeight": 1.4,
-					"fontSize": "16px"
+					"fontSize": "var(--wp--preset--font-size--small)"
 				},
 				"spacing": {
 					"margin": {