metro4
Version:
The front-end framework for Build responsive, mobile-first projects on the web with the first front-end component library in Metro Style
128 lines (111 loc) • 2.43 kB
text/less
@import (once) "include/vars";
@import (once) "include/mixins";
.tabs-material {
margin: 0;
padding: 0 52px;
position: fixed;
height: auto;
display: flex;
flex-flow: row nowrap;
overflow: auto;
overflow-y: hidden;
width: 100%;
z-index: @zindex-fixed;
background-color: @white;
color: @dark;
white-space: nowrap;
list-style: none inside;
line-height: 1;
.hideScrollBars();
li {
flex-shrink: 0;
position: relative;
display: block;
height: 48px;
cursor: pointer;
opacity: .6;
text-align: center;
margin: 0;
overflow: hidden;
max-width: 360px;
min-width: 90px;
background-color: inherit;
color: inherit;
a {
display: block;
position: relative;
padding: 16px 16px;
background-color: inherit;
color: inherit;
text-decoration: none;
font-weight: 500;
white-space: nowrap;
font-size: 14px;
text-transform: uppercase;
line-height: 20px;
width: 100%;
}
.icon {
width: 24px;
height: 24px;
line-height: 24px;
font-size: 22px;
display: block;
}
}
&::after {
content: " ";
min-width: 52px;
}
&.with-icons {
li {
height: 72px;
}
}
li {
&.active, &:hover {
opacity: 1;
transition: .3s linear;
}
}
.tab-marker {
display: block;
position: absolute;
height: 2px;
bottom: 0;
left: 0;
color: transparent;
opacity: 1;
z-index: 1;
background-color: @dark;
}
.tab-badge {
position: absolute;
top: 8px;
right: 8px;
padding: 4px;
}
}
.tabs-material {
&.deep {
z-index: @zindex-fixed - 1;
}
&.fixed-tabs {
overflow-x: hidden;
padding: 0;
li {
flex-basis: 0;
flex-grow: 1;
}
&::after {
content: "";
min-width: 0;
}
}
}
.head-bar ~ .fixed-tabs, .tabs-material.app-bar-present {
top: 56px;
}
.head-bar.more ~ .fixed-tabs, .tabs-material.app-bar-present-more {
top: 112px;
}