Files
2013-11-01 09:02:11 -05:00

158 lines
3.1 KiB
SCSS

/**
* Tabs
*
* A navigation bar with any number of tab items supported.
*/
.tabs {
@include display-flex();
@include flex-direction(horizontal);
@include tab-style($tabs-default-bg, $tabs-default-border-color, $gray-dark);
position: fixed;
bottom: 0;
z-index: 5;
width: 100%;
height: $tabs-height;
border-style: solid;
border-top-width: 1px;
line-height: $tabs-height;
&.tabs-default {
@include tab-style($tabs-default-bg, $tabs-default-border-color, $gray-dark);
}
&.tabs-secondary {
@include tab-style($tabs-secondary-bg, $tabs-secondary-border-color, $gray-dark);
}
&.tabs-primary {
@include tab-style($tabs-primary-bg, $tabs-primary-border-color, $white);
}
&.tabs-success {
@include tab-style($tabs-success-bg, $tabs-success-border-color, $white);
}
&.tabs-info {
@include tab-style($tabs-info-bg, $tabs-info-border-color, $white);
}
&.tabs-warning {
@include tab-style($tabs-warning-bg, $tabs-warning-border-color, $white);
}
&.tabs-danger {
@include tab-style($tabs-danger-bg, $tabs-danger-border-color, $white);
}
&.tabs-dark {
@include tab-style($tabs-danger-bg, $tabs-danger-border-color, $white);
}
background-size: 0;
@media (min--moz-device-pixel-ratio: 1.5),
(-webkit-min-device-pixel-ratio: 1.5),
(min-device-pixel-ratio: 1.5),
(min-resolution: 144dpi),
(min-resolution: 1.5dppx) {
padding-top: 2px;
border-top: none !important;
border-bottom: none !important;
background-position: top;
background-size: 100% 1px;
background-repeat: no-repeat;
}
}
.tabs-top {
top: $bar-height;
}
.tab-item {
@include flex(1);
display: inline-block;
overflow: hidden;
box-sizing: border-box;
margin: auto;
height: 100%;
color: inherit;
text-align: center;
text-decoration: none;
text-overflow: ellipsis;
white-space: nowrap;
font-weight: 400;
font-size: $tabs-text-font-size;
font-family: $light-sans-font-family;
opacity: 0.7;
}
.tabs-icon-top .tab-item,
.tabs-icon-bottom .tab-item {
font-size: $tabs-text-with-icon-font-size;
line-height: $tabs-text-font-size;
}
.tab-item i,
.tab-item .icon {
display: block;
margin: 0 auto;
height: $tabs-icon-size;
font-size: $tabs-icon-size;
}
.tabs-icon-left .tab-item,
.tabs-icon-right .tab-item {
font-size: $tabs-text-with-icon-font-size;
i, .icon {
font-size: $tabs-icon-size - 8;
display: inline-block;
vertical-align: top;
line-height: $tabs-height;
}
}
.tabs-icon-only i,
.tabs-icon-only .icon {
line-height: inherit;
}
/* Navigational tab */
/* Active state for tab */
.tab-item.active, .tab-item:active {
opacity: 1;
&.tab-item-default {
color: $brand-default;
}
&.tab-item-secondary {
color: $brand-secondary;
}
&.tab-item-primary {
color: $brand-primary;
}
&.tab-item-success {
color: $brand-success;
}
&.tab-item-danger {
color: $brand-danger;
}
&.tab-item-warning {
color: $brand-warning;
}
&.tab-item-dark {
color: $brand-dark;
}
}
.item.tabs {
@include display-flex();
padding: 0;
i, .icon {
position: relative;
}
}