MOBILE-3814 menu: Fix badges overflow and resize menu to 56px on tablet
parent
4c1e277e41
commit
df1f910ee2
|
@ -1,50 +1,74 @@
|
|||
@import "~theme/globals";
|
||||
|
||||
:host{
|
||||
:host {
|
||||
ion-tabs {
|
||||
--menutabbar-size: var(--bottom-tabs-size);
|
||||
}
|
||||
|
||||
ion-tab-bar {
|
||||
ion-tabs.placement-side {
|
||||
--menutabbar-size: var(--side-tabs-size);
|
||||
}
|
||||
|
||||
--network-margin-bottom: 0px;
|
||||
--network-message-background: transparent;
|
||||
--network-message-offline: none;
|
||||
--network-message-online: none;
|
||||
--network-message-height: 16px;
|
||||
}
|
||||
|
||||
:host-context(.core-online),
|
||||
:host-context(.core-offline) {
|
||||
.core-network-message {
|
||||
visibility: visible;
|
||||
height: var(--network-message-height);
|
||||
padding-bottom: calc(var(--ion-safe-area-bottom, 0px) + var(--network-message-height));
|
||||
}
|
||||
}
|
||||
|
||||
:host-context(.core-online) {
|
||||
--network-margin-bottom: 8px;
|
||||
|
||||
--network-message-background: var(--success);
|
||||
--network-message-online: block;
|
||||
}
|
||||
|
||||
:host-context(.core-offline) {
|
||||
--network-margin-bottom: 8px;
|
||||
|
||||
--network-message-background: var(--danger);
|
||||
--network-message-offline: block;
|
||||
}
|
||||
|
||||
ion-tab-bar {
|
||||
height: var(--menutabbar-size);
|
||||
}
|
||||
|
||||
@if ($core-always-show-main-menu) {
|
||||
ion-tabs.placement-bottom ion-tab-bar {
|
||||
height: var(--menutabbar-size) !important;
|
||||
visibility: visible !important;
|
||||
transform: translateY(0) !important;
|
||||
core-user-menu-button {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
} @else {
|
||||
ion-tabs.tabshidden.placement-bottom ion-tab-bar {
|
||||
pointer-events: none;
|
||||
|
||||
ion-tab-button {
|
||||
height: auto;
|
||||
}
|
||||
&.tab-selected {
|
||||
background: var(--background-selected);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ion-tab-button ion-icon.core-tab-icon {
|
||||
ion-icon.core-tab-icon {
|
||||
text-overflow: unset;
|
||||
overflow: visible;
|
||||
text-align: center;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
ion-tab-button.ios ion-icon.core-tab-icon {
|
||||
font-size: 25px;
|
||||
}
|
||||
|
||||
ion-tab-button.md ion-badge.core-tab-badge {
|
||||
ion-badge.core-tab-badge {
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
border-radius: 10px;
|
||||
padding-left: 6px;
|
||||
padding-right: 6px;
|
||||
line-height: 14px;
|
||||
}
|
||||
|
||||
ion-tab-button.tab-selected {
|
||||
background: var(--background-selected);
|
||||
--background: var(--core-bottom-tabs-badge-color);
|
||||
--color: var(--core-bottom-tabs-badge-text-color);
|
||||
}
|
||||
|
||||
ion-icon.core-tab-badge {
|
||||
|
@ -58,24 +82,42 @@
|
|||
position: absolute;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
ion-badge.core-tab-badge {
|
||||
--background: var(--core-bottom-tabs-badge-color);
|
||||
--color: var(--core-bottom-tabs-badge-text-color);
|
||||
}
|
||||
}
|
||||
|
||||
ion-tabs.placement-bottom ion-tab-button {
|
||||
ion-tabs.placement-bottom {
|
||||
ion-tab-button {
|
||||
ion-icon.core-tab-icon {
|
||||
margin-bottom: var(--network-margin-bottom);
|
||||
transition: margin 500ms ease-in-out, transform 300ms ease-in-out;
|
||||
}
|
||||
|
||||
ion-icon.core-tab-badge,
|
||||
ion-badge.core-tab-badge {
|
||||
top: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
ion-tabs.placement-side {
|
||||
@if ($core-always-show-main-menu) {
|
||||
ion-tab-bar {
|
||||
height: var(--menutabbar-size) !important;
|
||||
visibility: visible !important;
|
||||
transform: translateY(0) !important;
|
||||
}
|
||||
} @else {
|
||||
&.tabshidden ion-tab-bar {
|
||||
pointer-events: none;
|
||||
|
||||
ion-tab-button {
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ion-tabs.placement-side {
|
||||
flex-direction: row;
|
||||
|
||||
ion-tab-bar {
|
||||
order: -1;
|
||||
width: var(--menutabbar-size);
|
||||
|
@ -87,6 +129,15 @@
|
|||
|
||||
@include padding(var(--ion-safe-area-top), 0px, var(--ion-safe-area-bottom), var(--ion-safe-area-left));
|
||||
|
||||
ion-tab-button {
|
||||
--padding-start: 0;
|
||||
--padding-end: 0;
|
||||
ion-badge.core-tab-badge {
|
||||
@include position(null, 1px, null, auto);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ion-tab-button, core-user-menu-button {
|
||||
width: 100%;
|
||||
min-height: var(--menutabbar-size);
|
||||
|
@ -98,16 +149,11 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
core-user-menu-button {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.core-network-message {
|
||||
--network-message-height: 16px;
|
||||
.core-network-message {
|
||||
background: var(--network-message-background);
|
||||
pointer-events: none;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
|
@ -121,41 +167,12 @@
|
|||
transition: all 500ms ease-in-out;
|
||||
opacity: .8;
|
||||
z-index: 12;
|
||||
|
||||
.core-online {
|
||||
display: var(--network-message-online);
|
||||
}
|
||||
|
||||
.core-online-message,
|
||||
.core-offline-message {
|
||||
display: none;
|
||||
.core-offline {
|
||||
display: var(--network-message-offline);
|
||||
}
|
||||
}
|
||||
|
||||
:host-context(.core-online),
|
||||
:host-context(.core-offline) {
|
||||
ion-tabs.placement-bottom ion-tab-button ion-icon.core-tab-icon {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
ion-tabs.placement-bottom ion-tab-button.ios ion-icon.core-tab-icon {
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
.core-network-message {
|
||||
visibility: visible;
|
||||
height: var(--network-message-height);
|
||||
padding-bottom: calc(var(--ion-safe-area-bottom, 0px) + var(--network-message-height));
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
:host-context(.core-offline) .core-offline-message,
|
||||
:host-context(.core-online) .core-online-message {
|
||||
display: block;
|
||||
}
|
||||
|
||||
:host-context(.core-online) .core-network-message {
|
||||
background: var(--success);
|
||||
}
|
||||
|
||||
:host-context(.core-offline) .core-network-message {
|
||||
background: var(--danger);
|
||||
}
|
||||
|
|
|
@ -117,6 +117,7 @@
|
|||
--core-bottom-tabs-badge-color: var(--brand);
|
||||
--core-bottom-tabs-badge-text-color: var(--brand-contrast);
|
||||
--bottom-tabs-size: 48px;
|
||||
--side-tabs-size: 56px;
|
||||
ion-tab-bar.mainmenu-tabs {
|
||||
--background: var(--core-bottom-tabs-background);
|
||||
--color: var(--core-bottom-tabs-color);
|
||||
|
|
Loading…
Reference in New Issue