From 73d5648cb09f74ef97f5f0d992b11b71d8d2b324 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Thu, 31 Mar 2022 10:14:41 +0200 Subject: [PATCH] MOBILE-3833 tabs: Reduce tabs layouts --- .../tabs-outlet/core-tabs-outlet.html | 65 +++++++------ src/core/components/tabs/core-tabs.html | 64 +++++++------ src/core/components/tabs/tabs.scss | 92 ++++++++++--------- 3 files changed, 113 insertions(+), 108 deletions(-) diff --git a/src/core/components/tabs-outlet/core-tabs-outlet.html b/src/core/components/tabs-outlet/core-tabs-outlet.html index 7d0b9e925..ff4c3f825 100644 --- a/src/core/components/tabs-outlet/core-tabs-outlet.html +++ b/src/core/components/tabs-outlet/core-tabs-outlet.html @@ -1,37 +1,36 @@ - + - - - - - - - - - - - - {{ tab.title | translate}} - - {{ tab.badge }} - - {{ tab.badgeA11yText | translate: {$a : tab.badge } }} - - - - - - - - - - - - + + + + + + + + + + + {{ tab.title | translate}} + + {{ tab.badge }} + + {{ tab.badgeA11yText | translate: {$a : tab.badge } }} + + + + + + + + + + + diff --git a/src/core/components/tabs/core-tabs.html b/src/core/components/tabs/core-tabs.html index ced60ce60..89e426368 100644 --- a/src/core/components/tabs/core-tabs.html +++ b/src/core/components/tabs/core-tabs.html @@ -1,37 +1,35 @@ - + - - - - - - - - - - - - {{ tab.title | translate}} - - {{ tab.badge }} - - {{ tab.badgeA11yText | translate: {$a : tab.badge } }} - - - - - - - - - - - - + + + + + + + + + + + {{ tab.title | translate}} + + {{ tab.badge }} + + {{ tab.badgeA11yText | translate: {$a : tab.badge } }} + + + + + + + + + + +
diff --git a/src/core/components/tabs/tabs.scss b/src/core/components/tabs/tabs.scss index 8aa6e50c8..69d09150f 100644 --- a/src/core/components/tabs/tabs.scss +++ b/src/core/components/tabs/tabs.scss @@ -14,7 +14,7 @@ position: relative; } - ion-tab-bar.core-tabs-bar { + ion-tab-bar { position: relative; background: var(--tabs-background); @include safe-area-padding-end(null, 0px); @@ -22,57 +22,65 @@ color: var(--tabs-color); border-bottom: 1px solid var(--stroke); display: flex; - align-items: flex-end; + flex-direction: row; + justify-content: space-between; flex-shrink: 0; - ion-row { - width: 100%; + ion-spinner { + flex-grow: 1; } - .tab-slide { - border-bottom: 2px solid transparent; - min-width: 100px; - min-height: var(--height); - cursor: pointer; - overflow: hidden; - - ion-tab-button { - max-width: 100%; - ion-label { - font-size: 14px; - font-weight: 400; - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; - word-wrap: break-word; - max-width: 100%; - line-height: 1.2em; - margin-top: 16px; - margin-bottom: 16px; - } - } - - &[aria-selected=true], - &.selected { - color: var(--color-active); - border-bottom-color: var(--border-color-active); - ion-tab-button { - color: var(--color-active); - ion-label { - font-weight: var(--font-weight-active); - } - } + ion-button.arrow-button { + flex-shrink: 1; + margin: 0; + padding: 0; + --padding-start: 0; + --padding-end: 0; + min-width: 30px; + height: var(--height); + --border-radius: 0; + ion-icon { + font-size: 16px; } } - ion-col { + ion-slides { text-align: center; line-height: 1.6rem; + flex-grow: 1; - &.col-with-arrow { - display: flex; - justify-content: center; - align-items: center; + ion-slide { + border-bottom: 2px solid transparent; + min-width: 100px; + height: var(--height); + cursor: pointer; + overflow: hidden; + + ion-tab-button { + max-width: 100%; + ion-label { + font-size: 14px; + font-weight: 400; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + word-wrap: break-word; + max-width: 100%; + line-height: 1.2em; + } + } + + &[aria-selected=true], + &.selected { + color: var(--color-active); + border-bottom-color: var(--border-color-active); + ion-tab-button { + color: var(--color-active); + ion-label { + font-weight: var(--font-weight-active); + } + } + } } }