diff --git a/core/src/components/badge/test/hint/index.html b/core/src/components/badge/test/hint/index.html index fba0d6e73ff..2840eccee0a 100644 --- a/core/src/components/badge/test/hint/index.html +++ b/core/src/components/badge/test/hint/index.html @@ -366,6 +366,63 @@ + + + Inside Tab Button - Only Icon + + +
+ + + + + + + + + + + + + + + + 999 + + + + + + + +
+
+ + + + + + + + + + + + + + + + 999 + + + + + + + +
+
+ Inside Button - Top Placement diff --git a/core/src/components/tab-button/tab-button.ionic.scss b/core/src/components/tab-button/tab-button.ionic.scss index d3751e58625..b628f4a51ef 100644 --- a/core/src/components/tab-button/tab-button.ionic.scss +++ b/core/src/components/tab-button/tab-button.ionic.scss @@ -7,6 +7,10 @@ :host { --focus-ring-color: #{globals.$ion-border-focus-default}; --focus-ring-width: #{globals.$ion-border-radius-025}; + --padding-top: #{globals.$ion-space-100}; + --padding-end: #{globals.$ion-space-400}; + --padding-bottom: #{globals.$ion-space-100}; + --padding-start: #{globals.$ion-space-400}; @include globals.typography(globals.$ion-body-action-xs); @@ -48,6 +52,7 @@ .button-native { min-width: globals.$ion-scale-1200; + min-height: globals.$ion-scale-1200; overflow: visible; @@ -102,22 +107,23 @@ :host ::slotted(ion-badge) { @include globals.position(null, null, null, calc(50% + globals.$ion-scale-300)); + @include globals.transform(translate(-50%, -50%)); } :host ::slotted(ion-badge.badge-vertical-top) { - @include globals.position(-2px); + @include globals.position(globals.$ion-scale-150); } :host ::slotted(ion-badge.badge-vertical-top:empty) { - @include globals.position(calc(globals.$ion-scale-100 * -1)); + @include globals.position(globals.$ion-scale-050, null, null, calc(50% + globals.$ion-scale-250)); } -:host ::slotted(ion-badge.badge-vertical-bottom) { - @include globals.position(calc(50% - globals.$ion-scale-200)); +:host(.tab-layout-icon-top) ::slotted(ion-badge.badge-vertical-bottom) { + @include globals.position(calc(50% - (globals.$ion-scale-050))); } -:host ::slotted(ion-badge.badge-vertical-bottom:empty) { - @include globals.position(calc(50% - globals.$ion-scale-100)); +:host(.tab-layout-icon-top) ::slotted(ion-badge.badge-vertical-bottom:empty) { + @include globals.position(50%, null, null, calc(50% + globals.$ion-scale-250)); } :host ::slotted(ion-badge[vertical]:not(:empty)) { @@ -130,13 +136,19 @@ } :host(.tab-layout-icon-bottom) ::slotted(ion-badge.badge-vertical-top) { - @include globals.position(calc(50% - globals.$ion-scale-100)); + @include globals.position(calc(50% + globals.$ion-scale-100)); } -:host(.tab-layout-icon-bottom) ::slotted(ion-badge.badge-vertical-bottom) { - @include globals.position(calc(50% + globals.$ion-scale-100)); +:host(.tab-layout-icon-bottom) ::slotted(ion-badge.badge-vertical-top:empty) { + @include globals.position(50%); +} + +:host(.tab-layout-icon-bottom) ::slotted(ion-badge.badge-vertical-bottom), +:host(.tab-layout-label-hide) ::slotted(ion-badge.badge-vertical-bottom) { + @include globals.position(calc(100% - globals.$ion-scale-100)); } -:host(.tab-layout-icon-bottom) ::slotted(ion-badge.badge-vertical-bottom:empty) { - @include globals.position(calc(50% + 14px)); +:host(.tab-layout-icon-bottom) ::slotted(ion-badge.badge-vertical-bottom:empty), +:host(.tab-layout-label-hide) ::slotted(ion-badge.badge-vertical-bottom:empty) { + @include globals.position(calc(100% - globals.$ion-scale-050), null, null, calc(50% + globals.$ion-scale-250)); }