Skip to content

Commit

Permalink
Fixed background grey of the Shortcode block placeholder screen (Word…
Browse files Browse the repository at this point in the history
…Press#14719)

* Changed the background grey of the shortcode block to match all the other placeholder setup screens on other blocks. Fixes WordPress#14718

* Restyled shortcode block to match placeholder block styling.

* Rebased and force pushed to catch up with changes made to this file since @gziolo made some changes.
  • Loading branch information
mapk authored Apr 10, 2019
1 parent c29f0be commit 17f8d86
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/block-library/src/shortcode/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ const ShortcodeEdit = ( { attributes, setAttributes, instanceId } ) => {
const inputId = `blocks-shortcode-input-${ instanceId }`;

return (
<div className="wp-block-shortcode">
<label htmlFor={ inputId }>
<div className="wp-block-shortcode components-placeholder">
<label htmlFor={ inputId } className="components-placeholder__label">
<Dashicon icon="shortcode" />
{ __( 'Shortcode' ) }
</label>
Expand Down
8 changes: 5 additions & 3 deletions packages/block-library/src/shortcode/editor.scss
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
.wp-block-shortcode {
display: flex;
flex-direction: row;
flex-direction: column;
padding: $block-padding;
background-color: $light-gray-100;
background-color: $dark-opacity-light-200;
font-size: $default-font-size;
font-family: $default-font;

label {
display: flex;
align-items: center;
margin-right: $grid-size;
white-space: nowrap;
font-weight: 600;
flex-shrink: 0;
}

.block-editor-plain-text {
flex-grow: 1;
line-height: 1;
max-height: 30px;
width: 80%;
}

.dashicon {
Expand Down

0 comments on commit 17f8d86

Please sign in to comment.