fix(searchbar): update alignment of chips and other elements in toolbar (#19596)

fixes #19495 fixes #19502
This commit is contained in:
Brandy Carney
2019-10-08 19:42:59 -04:00
committed by GitHub
parent 3c4e65ba97
commit 7ce916cc7c
3 changed files with 24 additions and 11 deletions

View File

@ -155,6 +155,15 @@
} }
} }
// Searchbar in Toolbar
// -----------------------------------------
:host-context(ion-toolbar) {
@include padding(1px, null, 15px, null);
height: 52px;
}
// Searchbar in Toolbar Color // Searchbar in Toolbar Color
// ----------------------------------------- // -----------------------------------------

View File

@ -33,6 +33,11 @@
<ion-button>Clear</ion-button> <ion-button>Clear</ion-button>
</ion-buttons> </ion-buttons>
</ion-toolbar> </ion-toolbar>
<ion-toolbar>
<ion-back-button default-href="#" slot="start"></ion-back-button>
<ion-searchbar translucent></ion-searchbar>
<ion-chip slot="end" outline>Chip</ion-chip>
</ion-toolbar>
</ion-header> </ion-header>
<ion-content id="content" fullscreen> <ion-content id="content" fullscreen>

View File

@ -41,20 +41,19 @@
@include padding(0, null); @include padding(0, null);
} }
// TODO - important is needed because searchbar is scoped :host(.toolbar-searchbar) ::slotted(*) {
:host(.toolbar-searchbar) ::slotted(ion-searchbar) {
/* stylelint-disable */
height: 52px !important;
padding-top: 1px !important;
padding-bottom: 15px !important;
/* stylelint-enable */
}
:host(.toolbar-searchbar) ::slotted(ion-buttons) {
align-self: start; align-self: start;
} }
:host(.toolbar-searchbar) ::slotted(ion-chip) {
@include margin(3px, null, null, null);
}
:host(.toolbar-searchbar) ::slotted(ion-back-button) {
height: 38px;
}
// iOS Toolbar Slot Placement // iOS Toolbar Slot Placement
// -------------------------------------------------- // --------------------------------------------------