mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 15:07:13 +08:00
196 lines
4.2 KiB
SCSS
196 lines
4.2 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, $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-primary {
|
|
@include tab-style($tabs-primary-bg, $tabs-primary-border-color, $tabs-primary-text);
|
|
}
|
|
&.tabs-secondary {
|
|
@include tab-style($tabs-secondary-bg, $tabs-secondary-border-color, $tabs-secondary-text);
|
|
}
|
|
&.tabs-tertiary {
|
|
@include tab-style($tabs-tertiary-bg, $tabs-tertiary-border-color, $tabs-tertiary-text);
|
|
}
|
|
&.tabs-positive {
|
|
@include tab-style($tabs-positive-bg, $tabs-positive-border-color, $tabs-positive-text);
|
|
}
|
|
&.tabs-calm {
|
|
@include tab-style($tabs-calm-bg, $tabs-calm-border-color, $tabs-calm-text);
|
|
}
|
|
&.tabs-assertive {
|
|
@include tab-style($tabs-assertive-bg, $tabs-assertive-border-color, $tabs-assertive-text);
|
|
}
|
|
&.tabs-balanced {
|
|
@include tab-style($tabs-balanced-bg, $tabs-balanced-border-color, $tabs-balanced-text);
|
|
}
|
|
&.tabs-energized {
|
|
@include tab-style($tabs-energized-bg, $tabs-energized-border-color, $tabs-energized-text);
|
|
}
|
|
&.tabs-royle {
|
|
@include tab-style($tabs-royle-bg, $tabs-royle-border-color, $tabs-royle-text);
|
|
}
|
|
&.tabs-pure {
|
|
@include tab-style($tabs-pure-bg, $tabs-pure-border-color, $tabs-pure-text);
|
|
}
|
|
&.tabs-subdued-light {
|
|
@include tab-style($tabs-subdued-light-bg, $tabs-subdued-light-border-color, $tabs-subdued-light-text);
|
|
}
|
|
&.tabs-subdued {
|
|
@include tab-style($tabs-subdued-bg, $tabs-subdued-border-color, $tabs-subdued-text);
|
|
}
|
|
&.tabs-subdued-dark {
|
|
@include tab-style($tabs-subdued-dark-bg, $tabs-subdued-dark-border-color, $tabs-subdued-dark-text);
|
|
}
|
|
&.tabs-dark {
|
|
@include tab-style($tabs-dark-bg, $tabs-dark-border-color, $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-primary {
|
|
color: $primary;
|
|
}
|
|
&.tab-item-secondary {
|
|
color: $secondary;
|
|
}
|
|
&.tab-item-tertiary {
|
|
color: $tertiary;
|
|
}
|
|
&.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-royle {
|
|
color: $royle;
|
|
}
|
|
&.tab-item-pure {
|
|
color: $pure;
|
|
}
|
|
&.tab-item-subdued-light {
|
|
color: $subdued-light;
|
|
}
|
|
&.tab-item-subdued {
|
|
color: $subdued;
|
|
}
|
|
&.tab-item-subdued-dark {
|
|
color: $subdued-dark;
|
|
}
|
|
&.tab-item-dark {
|
|
color: $dark;
|
|
}
|
|
}
|
|
|
|
.item.tabs {
|
|
@include display-flex();
|
|
padding: 0;
|
|
|
|
.icon {
|
|
position: relative;
|
|
}
|
|
}
|