Merge pull request woocommerce/woocommerce-admin#1223 from woocommerce/fix/search-css-tags

Fix/search css tags
This commit is contained in:
Paul Sealock 2019-01-02 15:54:06 +13:00 committed by GitHub
commit ede9adda32
4 changed files with 20 additions and 9 deletions

View File

@ -107,11 +107,6 @@
display: block; display: block;
} }
} }
.woocommerce-tag {
margin-top: 1px;
margin-bottom: 1px;
}
} }
.woocommerce-filters-advanced__rule { .woocommerce-filters-advanced__rule {

View File

@ -158,7 +158,9 @@ class Search extends Component {
const shouldRenderTags = this.shouldRenderTags(); const shouldRenderTags = this.shouldRenderTags();
return ( return (
<div className={ classnames( 'woocommerce-search', className ) }> <div className={ classnames( 'woocommerce-search', className, {
'has-inline-tags': inlineTags,
} ) }>
<Gridicon className="woocommerce-search__icon" icon="search" size={ 18 } /> <Gridicon className="woocommerce-search__icon" icon="search" size={ 18 } />
<Autocomplete <Autocomplete
completer={ autocompleter } completer={ autocompleter }

View File

@ -5,12 +5,26 @@
.woocommerce-search__icon { .woocommerce-search__icon {
position: absolute; position: absolute;
top: 50%; top: 10px;
left: 10px; left: 10px;
fill: $core-grey-light-900; fill: $core-grey-light-900;
}
.woocommerce-tag {
margin: 8px 6px 0 0;
}
&.has-inline-tags {
.woocommerce-search__icon {
top: 50%;
transform: translateY(-50%); transform: translateY(-50%);
} }
.woocommerce-tag {
margin: initial;
}
}
.woocommerce-search__inline-container { .woocommerce-search__inline-container {
width: 100%; width: 100%;
padding: 4px 2px 4px 36px; padding: 4px 2px 4px 36px;

View File

@ -2,7 +2,7 @@
.woocommerce-tag { .woocommerce-tag {
display: inline-flex; display: inline-flex;
margin: 0 4px 0 0; margin: 1px 4px 1px 0;
overflow: hidden; overflow: hidden;
vertical-align: middle; vertical-align: middle;