diff --git a/blocks/library/button/editor.scss b/blocks/library/button/editor.scss index 2dda2a862b1027..1a7551cee2194c 100644 --- a/blocks/library/button/editor.scss +++ b/blocks/library/button/editor.scss @@ -26,3 +26,36 @@ $blocks-button__height: 46px; cursor: text; } } + +.blocks-button__inline-link { + background: #fff; + width: 280px; + display: flex; + flex-wrap: wrap; + align-items: center; + font-family: $default-font; + font-size: $default-font-size; + line-height: $default-line-height; + + .blocks-url-input { + width: auto; + } + + .dashicon { + color: $dark-gray-100; + } + + .blocks-url-input input[type=text]::placeholder { + color: $dark-gray-100; + } + + [data-align="center"] & { + margin-left: auto; + margin-right: auto; + } + + [data-align="right"] & { + margin-left: auto; + margin-right: 0; + } +} diff --git a/blocks/library/button/index.js b/blocks/library/button/index.js index 0d20661df9b294..666e244d4e0629 100644 --- a/blocks/library/button/index.js +++ b/blocks/library/button/index.js @@ -2,7 +2,7 @@ * WordPress dependencies */ import { __ } from '@wordpress/i18n'; -import { IconButton, PanelBody } from '@wordpress/components'; +import { Dashicon, IconButton, PanelBody } from '@wordpress/components'; /** * Internal dependencies @@ -93,17 +93,6 @@ registerBlockType( 'core/button', { } } keepPlaceholderOnFocus /> - { focus && -
event.preventDefault() }> - setAttributes( { url: value } ) } - /> - - - } { focus && @@ -130,6 +119,18 @@ registerBlockType( 'core/button', { } , + focus && ( +
event.preventDefault() }> + + setAttributes( { url: value } ) } + /> + + + ), ]; }, diff --git a/blocks/library/button/style.scss b/blocks/library/button/style.scss index d15e984118e65c..3e5f72b55a63ed 100644 --- a/blocks/library/button/style.scss +++ b/blocks/library/button/style.scss @@ -1,10 +1,8 @@ $blocks-button__height: 46px; .wp-block-button { - font-family: $default-font; display: inline-block; text-decoration: none; - font-size: $big-font-size; margin: 0; padding: 0 24px; height: $blocks-button__height; @@ -12,11 +10,14 @@ $blocks-button__height: 46px; cursor: default; border-radius: $blocks-button__height / 2; white-space: nowrap; - background: $blue-medium-400; - color: $white; + background: currentColor; vertical-align: top; position: relative; + > div { + color: $white; + } + a { box-shadow: none !important; color: $white; @@ -24,10 +25,6 @@ $blocks-button__height: 46px; text-decoration: none !important; } - &:hover { - color: $white; - } - &.aligncenter { display: inline-block; }