From caffd32f52c4e6accd2e613e3d4e563d48519e0b Mon Sep 17 00:00:00 2001 From: Kelly Choyce-Dwan Date: Mon, 15 Feb 2021 18:54:02 +0000 Subject: [PATCH] Bundled Themes: Support font size option for code block. Adds font-size support to Twenty Fourteen, Twenty Sixteen, and Twenty Seventeen. Props poena, paaljoachim, peterwilsoncc. Fixes #52431. git-svn-id: https://develop.svn.wordpress.org/trunk@50347 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-content/themes/twentyfourteen/css/blocks.css | 4 ++++ src/wp-content/themes/twentyfourteen/css/editor-blocks.css | 4 ++++ src/wp-content/themes/twentyseventeen/assets/css/blocks.css | 4 ++++ .../themes/twentyseventeen/assets/css/editor-blocks.css | 4 ++++ src/wp-content/themes/twentysixteen/css/blocks.css | 6 ++++-- 5 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/wp-content/themes/twentyfourteen/css/blocks.css b/src/wp-content/themes/twentyfourteen/css/blocks.css index e0f0e231e7..d6ba5f050f 100644 --- a/src/wp-content/themes/twentyfourteen/css/blocks.css +++ b/src/wp-content/themes/twentyfourteen/css/blocks.css @@ -168,6 +168,10 @@ p.has-drop-cap:not(:focus)::first-letter { padding: 0; } +.wp-block-code code { + font-size: inherit; +} + /* Pullquote */ .wp-block-pullquote { diff --git a/src/wp-content/themes/twentyfourteen/css/editor-blocks.css b/src/wp-content/themes/twentyfourteen/css/editor-blocks.css index 8cc7c09368..a6d4cb37c7 100644 --- a/src/wp-content/themes/twentyfourteen/css/editor-blocks.css +++ b/src/wp-content/themes/twentyfourteen/css/editor-blocks.css @@ -357,6 +357,10 @@ p.has-drop-cap:not(:focus)::first-letter { padding: 0; } +.editor-styles-wrapper .wp-block-code code { + font-size: inherit; +} + /* Pullquote */ .wp-block-pullquote { diff --git a/src/wp-content/themes/twentyseventeen/assets/css/blocks.css b/src/wp-content/themes/twentyseventeen/assets/css/blocks.css index 06ef5ca25a..7aba715c8b 100644 --- a/src/wp-content/themes/twentyseventeen/assets/css/blocks.css +++ b/src/wp-content/themes/twentyseventeen/assets/css/blocks.css @@ -149,6 +149,10 @@ p.has-drop-cap:not(:focus)::first-letter { padding: 0; } +.wp-block-code code { + font-size: inherit; +} + /* Pullquote */ .wp-block-pullquote { diff --git a/src/wp-content/themes/twentyseventeen/assets/css/editor-blocks.css b/src/wp-content/themes/twentyseventeen/assets/css/editor-blocks.css index d820a8192b..6357aca713 100644 --- a/src/wp-content/themes/twentyseventeen/assets/css/editor-blocks.css +++ b/src/wp-content/themes/twentyseventeen/assets/css/editor-blocks.css @@ -622,6 +622,10 @@ html[lang="th"] .edit-post-visual-editor * { padding: 0; } +.editor-styles-wrapper .wp-block-code code { + font-size: inherit; +} + /* Classic */ .wp-block-freeform.block-library-rich-text__tinymce li, diff --git a/src/wp-content/themes/twentysixteen/css/blocks.css b/src/wp-content/themes/twentysixteen/css/blocks.css index bdc79a598d..72a6873660 100644 --- a/src/wp-content/themes/twentysixteen/css/blocks.css +++ b/src/wp-content/themes/twentysixteen/css/blocks.css @@ -145,12 +145,14 @@ p.has-drop-cap:not(:focus)::first-letter { .wp-block-code { border: 0; font-family: Inconsolata, monospace; - font-size: 16px; - font-size: 1rem; line-height: 1.75; padding: 0; } +.wp-block-code code { + font-size: inherit; +} + /* Pullquote */ .wp-block-pullquote {