Files
2015-12-10 22:52:55 -06:00

139 lines
2.8 KiB
SCSS

@import "../../globals.ios";
@import "./tabs";
// iOS Tabs
// --------------------------------------------------
$tabbar-ios-background: $toolbar-ios-background !default;
$tabbar-ios-item-padding: 0px 10px !default;
$tabbar-ios-item-font-size: 10px !default;
$tabbar-ios-item-icon-size: 32px !default;
$tabbar-ios-height: 49px !default;
$tab-button-ios-min-width: 80px !default;
$tab-button-ios-max-width: 240px !default;
$tab-button-ios-active-color: $toolbar-ios-active-color !default;
$tab-button-ios-inactive-color: $toolbar-ios-inactive-color !default;
tabbar {
border-top: 1px solid $toolbar-ios-border-color;
background: $tabbar-ios-background;
}
ion-tabs[tabbarPlacement=top] tabbar {
border-top: none;
border-bottom: 1px solid $toolbar-ios-border-color;
}
.tab-button {
padding: $tabbar-ios-item-padding;
min-width: $tab-button-ios-min-width;
max-width: $tab-button-ios-max-width;
min-height: $tabbar-ios-height;
color: $tab-button-ios-inactive-color;
}
.tab-button:hover:not(.disable-hover),
.tab-button[aria-selected=true] {
color: $tab-button-ios-active-color;
}
.tab-button-text {
margin-bottom: 0;
min-height: $tabbar-ios-item-font-size + 1;
font-size: $tabbar-ios-item-font-size;
}
.has-title-only .tab-button-text {
font-size: $tabbar-ios-item-font-size + 2;
}
.tab-button-icon {
font-size: $tabbar-ios-item-icon-size;
height: $tabbar-ios-item-icon-size;
min-width: $tabbar-ios-item-icon-size + 5;
&:before {
vertical-align: top;
}
}
[tabbarIcons=right] .tab-button,
[tabbarIcons=left] .tab-button {
.tab-button-text {
font-size: 1.4rem;
line-height: 1.1;
margin-top: 0;
margin-bottom: 0;
}
icon {
min-width: 24px;
height: 26px;
font-size: 24px;
}
}
[tabbarIcons=hide] .tab-button-text {
font-size: 1.4rem;
line-height: 1.1;
}
.tab-button.has-title-only {
min-height: $tabbar-ios-height - 8;
.tab-button-text {
font-size: 1.4rem;
line-height: 1.1;
}
}
.tab-button.icon-only {
min-height: $tabbar-ios-height - 8;
}
&.hairlines ion-tabs {
tabbar {
border-top-width: 0.55px;
}
&[tabbarPlacement="top"] tabbar {
border-bottom-width: 0.55px;
}
}
// iOS Tabbar Color Mixin
// --------------------------------------------------
@mixin tabbar-ios($color-name, $color-value) {
tabbar[#{$color-name}] {
border-color: darken($color-value, 10%);
background-color: $color-value;
.tab-button {
color: inverse($color-value);
}
.tab-button:hover:not(.disable-hover),
.tab-button[aria-selected=true] {
color: inverse($color-value);
}
}
}
// iOS Tabbar Color Generation
// --------------------------------------------------
@each $color-name, $color-value in $colors-ios {
@include tabbar-ios($color-name, $color-value);
}