瀏覽代碼

Pre and code block style fixes.

Jeffrey Pearce 6 年之前
父節點
當前提交
cb9849a088

+ 18 - 0
stratford/sass/_extra-child-theme.scss

@@ -32,6 +32,7 @@ $font_size_base: #{map-deep-get($config-global, "font", "size", "base")};
 $font_size_lg: #{map-deep-get($config-global, "font", "size", "lg")};
 $font_size_xl: #{map-deep-get($config-global, "font", "size", "xl")};
 $font_family_secondary: #{map-deep-get($config-global, "font", "family", "secondary")};
+$font_family_code: #{map-deep-get($config-global, "font", "family", "code")};
 $font_line_height_body: #{map-deep-get($config-global, "font", "line-height", "body")};
 $button_line_height: #{map-deep-get($config-button, "font", "line-height")};
 $button_font_weight: #{map-deep-get($config-button, "font", "weight")};
@@ -391,6 +392,23 @@ input[type="submit"],
 	}
 }
 
+
+/**
+ * 6.9. Code, Pre Blocks
+ */
+.wp-block-code {
+	code {
+		font-family: $font_family_code;
+		font-size: $font_size_base;
+	}
+}
+
+.wp-block-preformatted, 
+.wp-block-verse {
+	font-family: $font_family_code;
+	font-size: $font_size_base;
+}
+
 //DEBUG Styles
 body {
 	// &.home {

+ 9 - 1
stratford/sass/style-child-theme-editor.scss

@@ -160,12 +160,20 @@ h6 {
 }
 
 /**
- * 2.4. Pre Block and Verse Block
+ * 2.4. Pre Block, Code Block and Verse Block
  */
 .wp-block-preformatted,
 .wp-block-verse {
 	pre {
 		font-family: $font_family_code;
+		font-size: $font_size_base;
+	}
+}
+
+.wp-block-code {
+	.block-editor-plain-text {
+		font-family: $font_family_code;
+		font-size: $font_size_base;
 	}
 }
 

+ 7 - 1
stratford/style-editor.css

@@ -961,11 +961,17 @@ h6 {
 }
 
 /**
- * 2.4. Pre Block and Verse Block
+ * 2.4. Pre Block, Code Block and Verse Block
  */
 .wp-block-preformatted pre,
 .wp-block-verse pre {
 	font-family: "Inconsolata", monospace;
+	font-size: 1rem;
+}
+
+.wp-block-code .block-editor-plain-text {
+	font-family: "Inconsolata", monospace;
+	font-size: 1rem;
 }
 
 /**

+ 13 - 0
stratford/style-rtl.css

@@ -3728,3 +3728,16 @@ input[type="submit"].has-background:visited,
 	font-size: 1.728rem;
 	margin-bottom: .857em;
 }
+
+/**
+ * 6.9. Code, Pre Blocks
+ */
+.wp-block-code code {
+	font-family: "Inconsolata", monospace;
+	font-size: 1rem;
+}
+
+.wp-block-preformatted {
+	font-family: "Inconsolata", monospace;
+	font-size: 1rem;
+}

+ 14 - 0
stratford/style.css

@@ -3733,3 +3733,17 @@ input[type="submit"].has-background:visited,
 	font-size: 1.728rem;
 	margin-bottom: .857em;
 }
+
+/**
+ * 6.9. Code, Pre Blocks
+ */
+.wp-block-code code {
+	font-family: "Inconsolata", monospace;
+	font-size: 1rem;
+}
+
+.wp-block-preformatted,
+.wp-block-verse {
+	font-family: "Inconsolata", monospace;
+	font-size: 1rem;
+}