add better tab styles
add animation for active tab
This commit is contained in:
parent
f68136bd79
commit
b49e5f3075
2 changed files with 30 additions and 7 deletions
|
@ -57,20 +57,27 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Tabs */
|
||||||
|
|
||||||
nav.sub-header
|
nav.sub-header
|
||||||
{
|
{
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
padding: 0 0 $spacing-vertical;
|
|
||||||
max-width: $width-page-constrained;
|
max-width: $width-page-constrained;
|
||||||
margin-left: auto;
|
margin-bottom: 40px;
|
||||||
margin-right: auto;
|
border-bottom: var(--divider);
|
||||||
> a
|
> a
|
||||||
{
|
{
|
||||||
|
height: 38px;
|
||||||
|
line-height: 38px;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: 600;
|
||||||
|
text-transform: uppercase;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin: 0 15px;
|
vertical-align: baseline;
|
||||||
padding: 0 5px;
|
margin: 0 8px;
|
||||||
line-height:calc(var(--header-height) - $spacing-vertical - var(--tab-border-size));
|
padding: 0 8px;
|
||||||
color: var(--tab-color);
|
color: var(--tab-color);
|
||||||
|
position: relative;
|
||||||
|
|
||||||
&:first-child
|
&:first-child
|
||||||
{
|
{
|
||||||
|
@ -82,8 +89,19 @@ nav.sub-header
|
||||||
}
|
}
|
||||||
&.sub-header-selected
|
&.sub-header-selected
|
||||||
{
|
{
|
||||||
border-bottom: var(--tab-border);
|
|
||||||
color: var(--tab-active-color);
|
color: var(--tab-active-color);
|
||||||
|
&:before {
|
||||||
|
width: 100%;
|
||||||
|
height: var(--tab-border-size);
|
||||||
|
background: var(--tab-active-color);
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
content: '';
|
||||||
|
animation-name: activeTab;
|
||||||
|
animation-duration: 0.3s;
|
||||||
|
animation-timing-function: cubic-bezier(.55,0,.1,1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
&:hover
|
&:hover
|
||||||
{
|
{
|
||||||
|
@ -91,3 +109,8 @@ nav.sub-header
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@keyframes activeTab {
|
||||||
|
from {width: 0;}
|
||||||
|
to {width: 100%;}
|
||||||
|
}
|
||||||
|
|
0
ui/scss/component/_tabs.scss
Normal file
0
ui/scss/component/_tabs.scss
Normal file
Loading…
Add table
Reference in a new issue