Просмотр исходного кода

Block-canvas: adding fluid type in theme.json (#6507)

* Block-canvas: adding fluid type in theme.json
* Adjusted configuration to more fully use fluid type

Co-authored-by: Jason Crist <jcrist@pbking.com>
Matias Benedetto 2 лет назад
Родитель
Сommit
d836175530
2 измененных файлов с 18 добавлено и 21 удалено
  1. 2 2
      block-canvas/patterns/404.php
  2. 16 19
      block-canvas/theme.json

+ 2 - 2
block-canvas/patterns/404.php

@@ -7,8 +7,8 @@
 
 ?>
 
-<!-- wp:heading {"textAlign":"center","level":1,"fontSize":"medium"} -->
-<h1 class="has-text-align-center has-medium-font-size" id="oops-that-page-can-t-be-found"><?php echo esc_html__( 'Oops! That page can&rsquo;t be found.', 'block-canvas' ); ?></h1>
+<!-- wp:heading {"textAlign":"center","level":1,"fontSize":"x-large"} -->
+<h1 class="has-text-align-center has-x-large-font-size" id="oops-that-page-can-t-be-found"><?php echo esc_html__( 'Oops! That page can&rsquo;t be found.', 'block-canvas' ); ?></h1>
 <!-- /wp:heading -->
 
 <!-- wp:paragraph -->

+ 16 - 19
block-canvas/theme.json

@@ -86,25 +86,34 @@
                     "slug": "system-font"
                 }
            ],
+            "fluid": true,
             "fontSizes": [
                 {
                     "name": "Small",
-                    "size": "1rem",
+                    "size": "0.825rem",
                     "slug": "small"
                 },
-                {
+                {   
+                    "fluid": {
+                        "min": "1rem",
+                        "max": "1.25rem"
+                    },
                     "name": "Medium",
-                    "size": "1.5rem",
+                    "size": "1.125rem",
                     "slug": "medium"
                 },
                 {
+                    "fluid": false,
                     "name": "Large",
                     "size": "1.75rem",
                     "slug": "large"
                 },
                 {
+                    "fluid": {
+                        "max": "4rem"
+                    },
                     "name": "Extra Large",
-                    "size": "2rem",
+                    "size": "3rem",
                     "slug": "x-large"
                 }
             ]
@@ -165,12 +174,6 @@
 					"fontSize": "var(--wp--preset--font-size--large)"
 				}
 			},
-			"core/comment-content": {
-				"typography": {
-					"fontSize": "1.125rem",
-					"lineHeight": "1.6"
-				}
-			},
             "core/gallery": {
                 "spacing": {
                     "margin": {
@@ -191,11 +194,6 @@
                     }
                 }
             },
-            "core/navigation": {
-                "typography": {
-                    "fontSize": "1.125rem"
-                }
-            },
             "core/post-date": {
                 "color": {
                     "text": "var(--wp--preset--color--foreground)"
@@ -245,7 +243,6 @@
                     }
                 },
                 "typography": {
-                    "fontSize": "1.125rem",
                     "fontStyle": "normal"
                 }
             },
@@ -267,12 +264,12 @@
             },
             "core/site-tagline": {
                 "typography": {
-                    "fontSize": "0.825rem"
+					"fontSize": "var(--wp--preset--font-size--small)"
                 }
             },
             "core/site-title": {
                 "typography": {
-                    "fontSize": "1.125rem",
+                    "fontSize": "var(--wp--preset--font-size--medium)",
                     "fontWeight": "700",
                     "textDecoration": "none"
                 }
@@ -357,7 +354,7 @@
         },
         "typography": {
             "fontFamily": "var(--wp--preset--font-family--system-font)",
-            "fontSize": "1.125rem",
+            "fontSize": "var(--wp--preset--font-size--medium)",
             "lineHeight": "1.6"
         }
     },