Forráskód Böngészése

Blockbase: Remove code block CSS (#4562)

Ben Dwyer 3 éve
szülő
commit
d01df558f1

+ 4 - 7
blockbase/assets/ponyfill.css

@@ -342,10 +342,6 @@ input[type=checkbox] + label {
 	margin-bottom: 0;
 }
 
-.wp-block-code code {
-	font-family: var(--wp--custom--code--typography--font-family);
-}
-
 .wp-block-gallery .blocks-gallery-image figcaption,
 .wp-block-gallery .blocks-gallery-item figcaption {
 	font-size: var(--wp--custom--gallery--caption--font-size);
@@ -357,12 +353,13 @@ input[type=checkbox] + label {
 }
 
 .wp-block-image {
-	/* 
+	/*
 	From what I can tell the below are styles regularly used by themes
 	to fix the image block.  I believe these should go into the block's
-	default styles.  It's difficult to say how this will land, however 
-	based on discussion found in (many) related issues here: 
+	default styles.  It's difficult to say how this will land, however
+	based on discussion found in (many) related issues here:
 	https://github.com/WordPress/gutenberg/issues/28923
+	https://github.com/WordPress/gutenberg/issues/29506
 	*/
 	text-align: center;
 }

+ 0 - 4
blockbase/sass/blocks/_code.scss

@@ -1,4 +0,0 @@
-// TODO: This can be removed when Gutenberg applies fontFamily correcly to .wp-block-code code.
-.wp-block-code code {
-	font-family: var(--wp--custom--code--typography--font-family); // See https://github.com/WordPress/gutenberg/issues/31135
-}

+ 1 - 2
blockbase/sass/ponyfill.scss

@@ -10,7 +10,6 @@
 // - These styles replace key Gutenberg Block styles for fonts, colors, and
 //   spacing with CSS-variables overrides
 @import "blocks/button";
-@import "blocks/code";
 @import "blocks/gallery";
 @import "blocks/html";
 @import "blocks/image";
@@ -29,4 +28,4 @@
 @import "blocks/table";
 @import "blocks/video";
 @import "blocks/columns";
-@import "post/meta";
+@import "post/meta";

+ 8 - 10
blockbase/theme.json

@@ -103,11 +103,6 @@
 					"lineHeight": 2
 				}
 			},
-			"code": {
-				"typography": {
-					"fontFamily": "monospace"
-				}
-			},
 			"color": {
 				"foreground": "var(--wp--preset--color--foreground)",
 				"background": "var(--wp--preset--color--background)",
@@ -383,6 +378,12 @@
 				}
 			},
 			"core/code": {
+				"border": {
+					"color": "#CCCCCC",
+					"radius": "0px",
+					"style": "solid",
+					"width": "2px"
+				},
 				"spacing": {
 					"padding": {
 						"left": "var(--wp--custom--gap--horizontal)",
@@ -391,11 +392,8 @@
 						"bottom": "var(--wp--custom--gap--vertical)"
 					}
 				},
-				"border": {
-					"color": "#CCCCCC",
-					"radius": "0px",
-					"style": "solid",
-					"width": "2px"
+				"typography": {
+					"fontFamily": "monospace"
 				}
 			},
 			"core/navigation": {

+ 10 - 14
geologist/theme.json

@@ -106,11 +106,6 @@
 					"lineHeight": 2
 				}
 			},
-			"code": {
-				"typography": {
-					"fontFamily": "monospace"
-				}
-			},
 			"color": {
 				"foreground": "var(--wp--preset--color--primary)",
 				"background": "var(--wp--preset--color--background)",
@@ -444,6 +439,12 @@
 				}
 			},
 			"core/code": {
+				"border": {
+					"color": "#CCCCCC",
+					"radius": "0px",
+					"style": "solid",
+					"width": "0px"
+				},
 				"spacing": {
 					"padding": {
 						"left": "var(--wp--custom--gap--horizontal)",
@@ -452,19 +453,14 @@
 						"bottom": "var(--wp--custom--gap--vertical)"
 					}
 				},
-				"border": {
-					"color": "#CCCCCC",
-					"radius": "0px",
-					"style": "solid",
-					"width": "0px"
-				},
-				"color": {
-					"background": "var(--wp--custom--color--secondary)"
-				},
 				"typography": {
+					"fontFamily": "monospace",
 					"fontSize": "20px",
 					"fontWeight": "400",
 					"lineHeight": "1.6"
+				},
+				"color": {
+					"background": "var(--wp--custom--color--secondary)"
 				}
 			},
 			"core/navigation": {

+ 8 - 10
mayland-blocks/theme.json

@@ -111,11 +111,6 @@
 					"lineHeight": 2
 				}
 			},
-			"code": {
-				"typography": {
-					"fontFamily": "monospace"
-				}
-			},
 			"color": {
 				"foreground": "var(--wp--preset--color--foreground)",
 				"background": "var(--wp--preset--color--background)",
@@ -412,6 +407,12 @@
 				}
 			},
 			"core/code": {
+				"border": {
+					"color": "#CCCCCC",
+					"radius": "0px",
+					"style": "solid",
+					"width": "2px"
+				},
 				"spacing": {
 					"padding": {
 						"left": "var(--wp--custom--gap--horizontal)",
@@ -420,11 +421,8 @@
 						"bottom": "var(--wp--custom--gap--vertical)"
 					}
 				},
-				"border": {
-					"color": "#CCCCCC",
-					"radius": "0px",
-					"style": "solid",
-					"width": "2px"
+				"typography": {
+					"fontFamily": "monospace"
 				}
 			},
 			"core/navigation": {

+ 10 - 14
quadrat/theme.json

@@ -101,11 +101,6 @@
 					"lineHeight": 2
 				}
 			},
-			"code": {
-				"typography": {
-					"fontFamily": "monospace"
-				}
-			},
 			"color": {
 				"foreground": "var(--wp--preset--color--primary)",
 				"background": "var(--wp--preset--color--background)",
@@ -439,6 +434,12 @@
 				}
 			},
 			"core/code": {
+				"border": {
+					"color": "#CCCCCC",
+					"radius": "0px",
+					"style": "solid",
+					"width": "0px"
+				},
 				"spacing": {
 					"padding": {
 						"left": "var(--wp--custom--gap--horizontal)",
@@ -447,19 +448,14 @@
 						"bottom": "var(--wp--custom--gap--vertical)"
 					}
 				},
-				"border": {
-					"color": "#CCCCCC",
-					"radius": "0px",
-					"style": "solid",
-					"width": "0px"
-				},
-				"color": {
-					"background": "var(--wp--custom--color--secondary)"
-				},
 				"typography": {
+					"fontFamily": "monospace",
 					"fontSize": "20px",
 					"fontWeight": "400",
 					"lineHeight": "1.6"
+				},
+				"color": {
+					"background": "var(--wp--custom--color--secondary)"
 				}
 			},
 			"core/navigation": {

+ 8 - 10
seedlet-blocks/theme.json

@@ -144,11 +144,6 @@
 					"lineHeight": 2
 				}
 			},
-			"code": {
-				"typography": {
-					"fontFamily": "monospace"
-				}
-			},
 			"color": {
 				"foreground": "var(--wp--preset--color--foreground)",
 				"background": "var(--wp--preset--color--background)",
@@ -441,6 +436,12 @@
 				}
 			},
 			"core/code": {
+				"border": {
+					"color": "#CCCCCC",
+					"radius": "0px",
+					"style": "solid",
+					"width": "2px"
+				},
 				"spacing": {
 					"padding": {
 						"left": "var(--wp--custom--gap--horizontal)",
@@ -449,11 +450,8 @@
 						"bottom": "var(--wp--custom--gap--vertical)"
 					}
 				},
-				"border": {
-					"color": "#CCCCCC",
-					"radius": "0px",
-					"style": "solid",
-					"width": "2px"
+				"typography": {
+					"fontFamily": "monospace"
 				}
 			},
 			"core/navigation": {

+ 8 - 10
skatepark/theme.json

@@ -138,11 +138,6 @@
 					"lineHeight": 2
 				}
 			},
-			"code": {
-				"typography": {
-					"fontFamily": "monospace"
-				}
-			},
 			"color": {
 				"foreground": "var(--wp--preset--color--primary)",
 				"background": "var(--wp--preset--color--background)",
@@ -440,6 +435,12 @@
 				}
 			},
 			"core/code": {
+				"border": {
+					"color": "#CCCCCC",
+					"radius": "0px",
+					"style": "solid",
+					"width": "2px"
+				},
 				"spacing": {
 					"padding": {
 						"left": "var(--wp--custom--gap--horizontal)",
@@ -448,11 +449,8 @@
 						"bottom": "var(--wp--custom--gap--vertical)"
 					}
 				},
-				"border": {
-					"color": "#CCCCCC",
-					"radius": "0px",
-					"style": "solid",
-					"width": "2px"
+				"typography": {
+					"fontFamily": "monospace"
 				}
 			},
 			"core/navigation": {