diff --git a/packages/block-library/src/button/editor.scss b/packages/block-library/src/button/editor.scss index c24021d17e38e..8f64fdb0f708c 100644 --- a/packages/block-library/src/button/editor.scss +++ b/packages/block-library/src/button/editor.scss @@ -33,42 +33,3 @@ div[data-type="core/button"] { display: table; } -.editor-styles-wrapper .wp-block-button[style*="text-decoration"] .wp-block-button__link { - text-decoration: inherit; -} - -.editor-styles-wrapper .wp-block-button .wp-block-button__link { - // The following styles ensure a default border is applied when the user selects only a border color or style in the editor, - // but no width. They override the `border-width: 0;` applied by core's theme.json via the Elements API button. - &:where(.has-border-color) { - border-width: initial; - } - &:where([style*="border-top-color"]) { - border-top-width: initial; - } - &:where([style*="border-right-color"]) { - border-right-width: initial; - } - &:where([style*="border-bottom-color"]) { - border-bottom-width: initial; - } - &:where([style*="border-left-color"]) { - border-left-width: initial; - } - - &:where([style*="border-style"]) { - border-width: initial; - } - &:where([style*="border-top-style"]) { - border-top-width: initial; - } - &:where([style*="border-right-style"]) { - border-right-width: initial; - } - &:where([style*="border-bottom-style"]) { - border-bottom-width: initial; - } - &:where([style*="border-left-style"]) { - border-left-width: initial; - } -} diff --git a/packages/block-library/src/button/style.scss b/packages/block-library/src/button/style.scss index f441152107973..c3070e0b07bf2 100644 --- a/packages/block-library/src/button/style.scss +++ b/packages/block-library/src/button/style.scss @@ -34,6 +34,10 @@ $blocks-block__margin: 0.5em; padding: calc(0.667em + 2px) calc(1.333em + 2px); } +.wp-block-button[style*="text-transform"] .wp-block-button__link { + text-transform: inherit; +} + .wp-block-button[style*="text-decoration"] .wp-block-button__link { text-decoration: inherit; } diff --git a/packages/block-library/src/buttons/editor.scss b/packages/block-library/src/buttons/editor.scss index 018ca3b7e2f8e..1f964c32fa940 100644 --- a/packages/block-library/src/buttons/editor.scss +++ b/packages/block-library/src/buttons/editor.scss @@ -54,12 +54,6 @@ $blocks-block__margin: 0.5em; margin-bottom: 0; } } - - .editor-styles-wrapper &.has-custom-font-size { - .wp-block-button__link { - font-size: inherit; - } - } } .wp-block[data-align="center"] > .wp-block-buttons {