mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 19:57:22 +08:00
102 lines
2.0 KiB
SCSS
102 lines
2.0 KiB
SCSS
|
|
// Tabs
|
|
// --------------------------------------------------
|
|
|
|
$tab-bar-background-color: #f7f7f8 !default;
|
|
|
|
$tab-bar-item-padding: 10px !default;
|
|
$tab-bar-item-min-width: 80px !default;
|
|
$tab-bar-item-max-width: 160px !default;
|
|
|
|
|
|
.tabs {
|
|
@include flex-display();
|
|
@include flex-direction(column);
|
|
height: 100%;
|
|
}
|
|
|
|
[tab-bar-placement="top"] > .tab-bar-container {
|
|
@include flex-order($flex-order-tab-bar-top);
|
|
}
|
|
|
|
[tab-bar-placement="bottom"] > .tab-bar-container {
|
|
@include flex-order($flex-order-tab-bar-bottom);
|
|
}
|
|
|
|
.tab-bar {
|
|
@include flex-display();
|
|
@include flex-justify-content(center);
|
|
overflow: hidden;
|
|
background: $tab-bar-background-color;
|
|
}
|
|
|
|
.tab-bar-item {
|
|
@include flex-display();
|
|
@include flex-justify-content(center);
|
|
@include flex-direction(column);
|
|
@include flex(1);
|
|
@include flex-align-self(center);
|
|
@include flex-align-items(center);
|
|
|
|
padding: $tab-bar-item-padding;
|
|
min-width: $tab-bar-item-min-width;
|
|
max-width: $tab-bar-item-max-width;
|
|
|
|
text-align: center;
|
|
cursor: pointer;
|
|
@include user-select(none);
|
|
|
|
border: 0;
|
|
background: none;
|
|
}
|
|
|
|
[tab-bar-icons="bottom"] > .tab-bar-container .tab-bar-item {
|
|
.tab-bar-item-icon {
|
|
@include flex-order(10);
|
|
}
|
|
}
|
|
|
|
[tab-bar-icons="left"] > .tab-bar-container .tab-bar-item {
|
|
@include flex-direction(row);
|
|
|
|
.tab-bar-item-icon {
|
|
text-align: right;
|
|
padding-right: 5px;
|
|
}
|
|
}
|
|
|
|
[tab-bar-icons="right"] > .tab-bar-container .tab-bar-item {
|
|
@include flex-direction(row);
|
|
|
|
.tab-bar-item-icon {
|
|
@include flex-order(10);
|
|
text-align: left;
|
|
padding-left: 5px;
|
|
}
|
|
}
|
|
|
|
.tab-bar-item-text,
|
|
.tab-bar-item-icon {
|
|
@include flex-align-self(center);
|
|
|
|
min-width: 26px;
|
|
max-width: 100%;
|
|
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.tab-bar-icon-only .tab-bar-item-text,
|
|
.tab-bar-text-only .tab-bar-item-icon {
|
|
display: none;
|
|
}
|
|
|
|
.tab-bar-item:hover {
|
|
opacity: 0.6;
|
|
}
|
|
|
|
.tab-bar-item[aria-selected="true"] {
|
|
color: red;
|
|
}
|