Files
ionic-framework/src/components/tabs/tabs.scss
2016-09-13 16:52:47 -05:00

147 lines
2.2 KiB
SCSS

@import "../../themes/ionic.globals";
// Tabs
// --------------------------------------------------
.tabbar {
position: absolute;
bottom: 0;
left: 0;
z-index: $z-index-toolbar;
display: flex;
width: 100%;
// default to hidden until ready
opacity: 0;
}
.tabbar.show-tabbar {
opacity: 1;
}
[tabsPlacement=top] > .tabbar {
top: 0;
bottom: auto;
}
.tab-button {
position: relative;
z-index: 0;
display: flex;
overflow: hidden;
flex: 1;
flex-direction: column;
align-items: center;
align-self: center;
justify-content: center;
margin: 0;
border: 0;
border-radius: 0;
text-align: center;
text-decoration: none;
background: none;
cursor: pointer;
user-select: none;
}
.tab-disabled {
pointer-events: none;
}
.tab-disabled ion-badge,
.tab-disabled ion-icon,
.tab-disabled span {
opacity: .4;
}
.tab-button-text {
margin-top: 3px;
margin-bottom: 2px;
}
.tab-button-text,
.tab-button-icon {
display: none;
overflow: hidden;
align-self: center;
min-width: 26px;
max-width: 100%;
text-overflow: ellipsis;
white-space: nowrap;
}
.has-icon .tab-button-icon,
.has-title .tab-button-text {
display: block;
}
.has-title-only .tab-button-text {
white-space: normal;
}
[tabsLayout=icon-bottom] .tab-button .tab-button-icon {
order: 10;
}
[tabsLayout=icon-left] .tab-button,
[tabsLayout=icon-right] .tab-button {
flex-direction: row;
}
[tabsLayout=icon-left] .tab-button .tab-button-icon {
padding-right: 8px;
text-align: right;
}
[tabsLayout=icon-right] .tab-button .tab-button-icon {
order: 10;
padding-left: 8px;
text-align: left;
}
.tab-hidden,
.tab-highlight,
[tabsLayout=icon-hide] .tab-button-icon,
[tabsLayout=title-hide] .tab-button-text {
display: none;
}
// Tab Badges
// --------------------------------------------------
.tab-badge {
position: absolute;
top: 6%;
right: 4%;
right: calc(50% - 50px);
padding: 1px 6px;
height: auto;
font-size: 12px;
line-height: 16px;
}
.has-icon .tab-badge {
right: calc(50% - 30px);
}
[tabsLayout=icon-bottom] .tab-badge,
[tabsLayout=icon-left] .tab-badge,
[tabsLayout=icon-right] .tab-badge {
right: calc(50% - 50px);
}