Files
mhartington ae6e140fbf feat(ionTabs): hide tabs by default with MD
Closes #229. Closes #236
Squashed commit of the following:

commit f566321e54937b8d31a8d1f85948ab5d984b9e37
Author: mhartington <mikehartington@gmail.com>
Date:   Fri Oct 2 11:03:50 2015 -0400

    feat(ionTabs): organize code and clean font sizes

commit 9ee1e28f0b01e9e195bc24a65066a57d66e5ec50
Author: mhartington <mikehartington@gmail.com>
Date:   Fri Oct 2 10:51:36 2015 -0400

    feat(ionTabs): move scss to tabs.scss

commit 3eba74c27c8eefe6e61f8f3ac12742edb7181772
Author: mhartington <mikehartington@gmail.com>
Date:   Thu Oct 1 16:23:37 2015 -0400

    feat(ionTabs): add test

commit 34f61431d41283fc8e5ed2f64e0874659072660b
Author: mhartington <mikehartington@gmail.com>
Date:   Thu Oct 1 16:13:05 2015 -0400

    feat(ionTabs): reuse tabBarIcons

commit 8c6f0edb17bcc6ff0c5f8b7be66f2be8a6775d48
Author: mhartington <mikehartington@gmail.com>
Date:   Thu Oct 1 15:56:29 2015 -0400

    feat(ionTabs): hide tab icon for md
2015-10-02 11:45:35 -04:00

161 lines
2.7 KiB
SCSS

// Tabs
// --------------------------------------------------
$tab-bar-background-color: $toolbar-background-color !default;
$tab-button-text-color: $toolbar-text-color !default;
$tab-button-active-color: $toolbar-active-color !default;
$tab-button-inactive-color: $toolbar-inactive-color !default;
$tab-button-padding: 10px !default;
$tab-button-min-width: 80px !default;
$tab-button-max-width: 240px !default;
ion-tabs {
display: flex;
flex-direction: column;
overflow: hidden;
width: 100%;
height: 100%;
max-width: 100%;
max-height: 100%;
margin: 0;
padding: 0;
}
ion-tab {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
overflow: hidden;
flex-direction: column;
display: none;
&.show-view {
display: flex;
}
}
ion-tabs > .navbar-container {
order: $flex-order-tab-bar-navbar;
}
.tab-bar-container {
position: relative;
order: $flex-order-tab-bar-bottom;
}
[tab-bar-placement=top] .tab-bar-container {
order: $flex-order-tab-bar-top;
}
tab-bar {
position: relative;
display: flex;
justify-content: center;
overflow: hidden;
background: $tab-bar-background-color;
}
.tab-button {
position: relative;
z-index: 0;
overflow: hidden;
display: flex;
flex-direction: column;
justify-content: center;
flex: 1;
align-self: center;
align-items: center;
margin: 0;
padding: $tab-button-padding;
min-width: $tab-button-min-width;
max-width: $tab-button-max-width;
text-align: center;
cursor: pointer;
@include user-select-none();
color: $tab-button-inactive-color;
border: 0;
border-radius: 0;
background: none;
&:hover:not(.disable-hover) {
color: $tab-button-active-color;
}
}
.tab-button-text {
margin-top: 3px;
margin-bottom: 2px;
}
.tab-button-text,
.tab-button-icon {
align-self: center;
min-width: 26px;
max-width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
display: none;
}
.has-icon .tab-button-icon,
.has-title .tab-button-text {
display: block;
}
.has-title-only .tab-button-text {
white-space: normal;
}
.tab-button[aria-selected=true] {
color: $tab-button-active-color;
}
tab-highlight {
display: none;
}
[tab-bar-icons=bottom] .tab-button {
.tab-button-icon {
order: 10;
}
}
[tab-bar-icons=left] .tab-button {
flex-direction: row;
.tab-button-icon {
text-align: right;
padding-right: 8px;
}
}
[tab-bar-icons=right] .tab-button {
flex-direction: row;
.tab-button-icon {
order: 10;
text-align: left;
padding-left: 8px;
}
}
[tab-bar-icons=hide] .tab-button-icon {
display: none;
}