From e54d54d2150fdf052a995b3513c9e26252e352be Mon Sep 17 00:00:00 2001 From: laurelfulford Date: Wed, 2 Jan 2019 03:53:53 +0000 Subject: [PATCH] Bundled Themes: Make sure button blocks respect settings. When the original block editor styles were added to the existing default themes, the button blocks were styled to match how each theme styled the `button` tag. However, the styles should respect the block editor's default style, "Rounded", and allow switching to the other styles, like "Outlined" and "Square". Fixes #45541. Built from https://develop.svn.wordpress.org/trunk@44381 git-svn-id: http://core.svn.wordpress.org/trunk@44211 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- css/blocks.css | 9 +++++++-- css/editor-blocks.css | 11 +++++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/css/blocks.css b/css/blocks.css index a03cef640..5a645daf8 100644 --- a/css/blocks.css +++ b/css/blocks.css @@ -246,7 +246,6 @@ pre.wp-block-code { .wp-block-button .wp-block-button__link { border: 1px solid #d2d2d2; - border-radius: 3px; font-family: inherit; font-size: 11px; font-size: 0.785714286rem; @@ -262,6 +261,12 @@ pre.wp-block-code { color: #7c7c7c; } +.wp-block-button.is-style-outline .wp-block-button__link, +.wp-block-button.is-style-outline .wp-block-button__link:visited { + background-color: inherit; + border-color: inherit; +} + .entry-content .wp-block-button__link:hover, .entry-content .wp-block-button__link:visited:hover, .entry-content .wp-block-button__link:focus { @@ -274,7 +279,7 @@ pre.wp-block-code { color: #757575; } -.wp-block-button__link:not(.has-background) { +.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background) { background-repeat: repeat-x; background-image: -moz-linear-gradient(top, #f4f4f4, #e6e6e6); background-image: -ms-linear-gradient(top, #f4f4f4, #e6e6e6); diff --git a/css/editor-blocks.css b/css/editor-blocks.css index 99be72d4d..bd5313b46 100644 --- a/css/editor-blocks.css +++ b/css/editor-blocks.css @@ -234,8 +234,7 @@ p.has-drop-cap:not(:focus)::first-letter { text-decoration: underline; } -.wp-block-file .wp-block-file__button, -.wp-block-button .wp-block-file__button:hover { +.wp-block-file .wp-block-file__button { background-color: #e6e6e6; background-repeat: repeat-x; background-image: -moz-linear-gradient(top, #f4f4f4, #e6e6e6); @@ -342,7 +341,6 @@ p.has-drop-cap:not(:focus)::first-letter { .wp-block-button .wp-block-button__link { border: 1px solid #d2d2d2; - border-radius: 3px; font-family: inherit; font-size: 11px; font-weight: normal; @@ -358,7 +356,12 @@ p.has-drop-cap:not(:focus)::first-letter { box-shadow: 0 1px 2px rgba(64, 64, 64, 0.1); } -.wp-block-button .wp-block-button__link:not(.has-background) { +.wp-block-button.is-style-outline .wp-block-button__link { + background-color: inherit; + border-color: inherit; +} + +.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background) { background-image: -moz-linear-gradient(top, #f4f4f4, #e6e6e6); background-image: -ms-linear-gradient(top, #f4f4f4, #e6e6e6); background-image: -webkit-linear-gradient(top, #f4f4f4, #e6e6e6);