Skip to content

Commit

Permalink
Fix 2021 frontend and avoid revert all
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Mar 25, 2021
1 parent 862f571 commit 595aba1
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 17 deletions.
14 changes: 13 additions & 1 deletion packages/block-library/src/reset.scss
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,18 @@
textarea,
button {
font-family: system-ui;
all: revert;
font-size: revert;
font-weight: revert;
border-radius: revert;
border: revert;
background: revert;
color: revert;
padding: revert;
margin: revert;
line-height: revert;
min-height: revert;
box-shadow: revert;
box-sizing: revert;
}

// For these I prefer to only override the WP-Admin defined styles and not "all"
Expand Down Expand Up @@ -132,6 +143,7 @@
border: revert;
box-shadow: revert;
outline: revert;
padding: revert;
}
}
}
28 changes: 13 additions & 15 deletions packages/block-library/src/search/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,21 +149,19 @@ export default function SearchEdit( {
) }

{ ! buttonUseIcon && (
// This rule only makes sense for UI not blocks.
// eslint-disable-next-line react/forbid-elements
<button type="submit" className="wp-block-search__button">
<RichText
tagName="span"
style={ { display: 'inline-block' } }
aria-label={ __( 'Button text' ) }
placeholder={ __( 'Add button text…' ) }
withoutInteractiveFormatting
value={ buttonText }
onChange={ ( html ) =>
setAttributes( { buttonText: html } )
}
/>
</button>
<RichText
type="submit"
className="wp-block-search__button"
tagName="button"
style={ { display: 'inline-block' } }
aria-label={ __( 'Button text' ) }
placeholder={ __( 'Add button text…' ) }
withoutInteractiveFormatting
value={ buttonText }
onChange={ ( html ) =>
setAttributes( { buttonText: html } )
}
/>
) }
</>
);
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/search/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
width: 100%;
}

.wp-block-search__input[type="search"] {
.wp-block-search__input {
flex-grow: 1;
min-width: 3em;
border: 1px solid $gray-600;
Expand Down

0 comments on commit 595aba1

Please sign in to comment.