Files
2013-10-31 11:06:02 -05:00

151 lines
2.7 KiB
SCSS

/**
* Tabs
*
* A navigation bar with any number of tab items supported.
*/
.tabs {
@include box-orient(horizontal);
@include tab-style($tabs-default-bg, $tabs-default-border-color, $gray-dark);
position: fixed;
bottom: 0;
z-index: 5;
display: -webkit-box;
display: box;
width: 100%;
height: $tabs-height;
border-style: solid;
border-top-width: 1px;
font-size: 16px;
&.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);
}
}
.tabs-top {
top: $bar-height;
}
.tab-item {
@include box-flex(1);
display: block;
overflow: hidden;
box-sizing: border-box;
padding-top: 4px;
// Required to force box elements to be the same size;
width: 0;
height: 100%;
color: inherit;
text-align: center;
text-decoration: none;
text-overflow: ellipsis;
white-space: nowrap;
font-weight: 400;
font-size: 14px;
font-family: $light-sans-font-family;
opacity: 0.7;
}
.tabs-icon-top .tab-item,
.tabs-icon-right .tab-item,
.tabs-icon-bottom .tab-item,
.tabs-icon-left .tab-item {
position: relative;
padding-top: 0;
font-size: 10px;
}
.tabs-icon-left .tab-item i {
position: absolute;
left: 4px;
display: flex;
height: 100%;
align-items: center;
}
.tabs-icon-right .tab-item i {
position: absolute;
right: 4px;
display: flex;
height: 100%;
align-items: center;
}
/* Icon for tab */
.tab-item i {
display: block;
margin: 1px auto -3px auto;
font-size: $tabs-icon-size;
}
/* 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;
}
}
/* Label for tab */
.tab-label {
margin-top: 1px;
color: #fff;
font-weight: bold;
font-size: 10px;
}