main nav effects

This commit is contained in:
Jana Deutschländer 2017-01-04 17:37:57 +01:00
commit c39e94e4e3
4 changed files with 142 additions and 1 deletions

View file

@ -80,7 +80,89 @@
background-color: @color-border;
transition: @transition background-color;
}
&.opened, &.closed{
padding: 0;
&::before, &::after{
display: none;
}
a{
display: block;
position: relative;
padding: .5rem 0 .8rem (@icon-size + 1);
margin-bottom: -.3rem;
border: 1px solid transparent;
&::before {
//background-color: @color-link;
color: @color-nav;
content: counter(nav-counter);
position: absolute;
top: -.1rem;
left: 0;
display: flex;
display: -webkit-flex;
flex-direction: column;
-webkit-flex-direction: column;
justify-content: center;
-webkit-justify-content: center;
height: 100%;
width: @icon-size;
overflow: hidden;
text-align: center;
margin-top: auto;
margin-bottom: auto;
}
&::after {
content: '';
position: absolute;
top: 15%;
bottom: 15%;
width: 1px;
left: (@icon-size + .5);
background-color: @color-border;
transition: @transition background-color;
}
&:hover, &:focus, &:active{
text-decoration: none;
background-color: #fff;
border-color: @color-link;
color: @color-link;
}
}
}
&.opened{
a{
background-color: @color-link;
color: #fff;
&::after, &::before{
color: #fff;
border-color: #fff;
}
&:hover, &:focus, &:active{
text-decoration: none;
background-color: #fff;
border-color: @color-link;
color: @color-link;
&::after, &::before{
color: inherit;
border-color: inherit;
}
}
}
}
+ ul{
height: auto;
overflow: hidden;
}
&.closed + ul{
height: 0;
}
}
}
}
}