From 7ce916cc7ce84eb39e057f307985a1e9c6d4128d Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Tue, 8 Oct 2019 19:42:59 -0400 Subject: [PATCH] fix(searchbar): update alignment of chips and other elements in toolbar (#19596) fixes #19495 fixes #19502 --- .../components/searchbar/searchbar.ios.scss | 9 ++++++++ .../searchbar/test/toolbar/index.html | 5 +++++ core/src/components/toolbar/toolbar.ios.scss | 21 +++++++++---------- 3 files changed, 24 insertions(+), 11 deletions(-) diff --git a/core/src/components/searchbar/searchbar.ios.scss b/core/src/components/searchbar/searchbar.ios.scss index f1f2a4a98d..d4e4821d7d 100644 --- a/core/src/components/searchbar/searchbar.ios.scss +++ b/core/src/components/searchbar/searchbar.ios.scss @@ -155,6 +155,15 @@ } } +// Searchbar in Toolbar +// ----------------------------------------- + +:host-context(ion-toolbar) { + @include padding(1px, null, 15px, null); + + height: 52px; +} + // Searchbar in Toolbar Color // ----------------------------------------- diff --git a/core/src/components/searchbar/test/toolbar/index.html b/core/src/components/searchbar/test/toolbar/index.html index cebf95934a..7521fa3f09 100644 --- a/core/src/components/searchbar/test/toolbar/index.html +++ b/core/src/components/searchbar/test/toolbar/index.html @@ -33,6 +33,11 @@ Clear + + + + Chip + diff --git a/core/src/components/toolbar/toolbar.ios.scss b/core/src/components/toolbar/toolbar.ios.scss index 642fe16f64..dcc675a73e 100644 --- a/core/src/components/toolbar/toolbar.ios.scss +++ b/core/src/components/toolbar/toolbar.ios.scss @@ -41,20 +41,19 @@ @include padding(0, null); } -// TODO - important is needed because searchbar is scoped -: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) { +:host(.toolbar-searchbar) ::slotted(*) { 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 // --------------------------------------------------