mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 15:07:13 +08:00
166 lines
3.3 KiB
SCSS
166 lines
3.3 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, $tabs-default-text);
|
|
position: absolute;
|
|
bottom: 0;
|
|
z-index: 5;
|
|
width: 100%;
|
|
height: $tabs-height;
|
|
border-style: solid;
|
|
|
|
border-top-width: 1px;
|
|
|
|
background-size: 0;
|
|
line-height: $tabs-height;
|
|
|
|
&.tabs-light {
|
|
@include tab-style($tabs-light-bg, $tabs-light-border, $tabs-light-text);
|
|
}
|
|
&.tabs-stable {
|
|
@include tab-style($tabs-stable-bg, $tabs-stable-border, $tabs-stable-text);
|
|
}
|
|
&.tabs-positive {
|
|
@include tab-style($tabs-positive-bg, $tabs-positive-border, $tabs-positive-text);
|
|
}
|
|
&.tabs-calm {
|
|
@include tab-style($tabs-calm-bg, $tabs-calm-border, $tabs-calm-text);
|
|
}
|
|
&.tabs-assertive {
|
|
@include tab-style($tabs-assertive-bg, $tabs-assertive-border, $tabs-assertive-text);
|
|
}
|
|
&.tabs-balanced {
|
|
@include tab-style($tabs-balanced-bg, $tabs-balanced-border, $tabs-balanced-text);
|
|
}
|
|
&.tabs-energized {
|
|
@include tab-style($tabs-energized-bg, $tabs-energized-border, $tabs-energized-text);
|
|
}
|
|
&.tabs-royal {
|
|
@include tab-style($tabs-royal-bg, $tabs-royal-border, $tabs-royal-text);
|
|
}
|
|
&.tabs-dark {
|
|
@include tab-style($tabs-dark-bg, $tabs-dark-border, $tabs-dark-text);
|
|
}
|
|
@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: $font-family-light-sans-serif;
|
|
|
|
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 .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;
|
|
|
|
.icon {
|
|
display: inline-block;
|
|
vertical-align: top;
|
|
font-size: $tabs-icon-size - 8;
|
|
line-height: $tabs-height;
|
|
}
|
|
}
|
|
|
|
.tabs-icon-only .icon {
|
|
line-height: inherit;
|
|
}
|
|
|
|
/* Navigational tab */
|
|
|
|
/* Active state for tab */
|
|
.tab-item.active, .tab-item:active {
|
|
opacity: 1;
|
|
|
|
&.tab-item-light {
|
|
color: $light;
|
|
}
|
|
&.tab-item-stable {
|
|
color: $stable;
|
|
}
|
|
&.tab-item-positive {
|
|
color: $positive;
|
|
}
|
|
&.tab-item-calm {
|
|
color: $calm;
|
|
}
|
|
&.tab-item-assertive {
|
|
color: $assertive;
|
|
}
|
|
&.tab-item-balanced {
|
|
color: $balanced;
|
|
}
|
|
&.tab-item-energized {
|
|
color: $energized;
|
|
}
|
|
&.tab-item-royal {
|
|
color: $royal;
|
|
}
|
|
&.tab-item-dark {
|
|
color: $dark;
|
|
}
|
|
}
|
|
|
|
.item.tabs {
|
|
@include display-flex();
|
|
padding: 0;
|
|
|
|
.icon {
|
|
position: relative;
|
|
}
|
|
}
|