position + hover

This commit is contained in:
Silke Pisulla 2017-01-05 09:39:18 +01:00
commit 4a6674ad6f
2 changed files with 59 additions and 32 deletions

View file

@ -7,10 +7,10 @@
#dokuwiki__aside.main-sidebar { #dokuwiki__aside.main-sidebar {
counter-reset: nav-counter; counter-reset: nav-counter;
/* + + + + + nav main + + + + + */ /* + + + + + nav main + + + + + */
.nav-main { .nav-main {
> ul { > ul {
@icon-size: 2rem; @icon-size: 2rem;
margin: 0; margin: 0;
@ -38,19 +38,31 @@
/* + + + first level + + + */ /* + + + first level + + + */
> li { > li {position: relative;
list-style-type: none; list-style-type: none;
border-bottom: solid 1px @color-border;
margin: 0; margin: 0;
padding: 0 0 .3rem 0; padding: 0 0 .3rem 0;
counter-increment: nav-counter; counter-increment: nav-counter;
> .li { //background-color: pink;// hier activ !!! &::after {
content: '';
position: absolute;
left: 0;
bottom: 0px;
display: block;
width: 100%;
height: 1px;
background-color: @color-border;
transition: @transition background-color;
}
> .li {
position: relative; position: relative;
z-index: 1;
padding: .5rem 0 .5rem (@icon-size + 1); padding: .5rem 0 .5rem (@icon-size + 1);
margin-top: -1px;
&::before { &::before {
//background-color: @color-link;
color: @color-nav; color: @color-nav;
content: counter(nav-counter); content: counter(nav-counter);
position: absolute; position: absolute;
@ -81,20 +93,25 @@
transition: @transition background-color; transition: @transition background-color;
} }
&.opened, &.closed{ &.opened,
&.closed {
padding: 0; padding: 0;
&::before, &::after{
&::before,
&::after {
display: none; display: none;
} }
a { a {
display: block;
position: relative; position: relative;
padding: .5rem 0 .8rem (@icon-size + 1); display: block;
margin-bottom: -.3rem;
border: 1px solid transparent; border: 1px solid transparent;
border-radius: 2px;
margin-bottom: -.3rem;
padding: .6rem 0 .7rem (@icon-size + 1);
transition: @transition color, @transition background-color, @transition border-color;
&::before { &::before {
//background-color: @color-link;
color: @color-nav;
content: counter(nav-counter); content: counter(nav-counter);
position: absolute; position: absolute;
top: -.1rem; top: -.1rem;
@ -108,6 +125,7 @@
height: 100%; height: 100%;
width: @icon-size; width: @icon-size;
overflow: hidden; overflow: hidden;
color: @color-nav;
text-align: center; text-align: center;
margin-top: auto; margin-top: auto;
margin-bottom: auto; margin-bottom: auto;
@ -123,46 +141,55 @@
background-color: @color-border; background-color: @color-border;
transition: @transition background-color; transition: @transition background-color;
} }
&:hover, &:focus, &:active{
text-decoration: none; &:hover,
&:focus,
&:active {
background-color: #fff; background-color: #fff;
border-color: @color-link; border-color: @color-link;
color: @color-link; color: @color-link;
text-decoration: none;
} }
} }
} }
&.opened { &.opened {
a { a {
background-color: @color-link; background-color: @color-link;
color: #fff; color: #fff;
&::after, &::before{
&::after,
&::before{
color: #fff; color: #fff;
border-color: #fff; border-color: #fff;
} }
&:hover, &:focus, &:active{
text-decoration: none; &:hover,
&:focus,
&:active {
background-color: #fff; background-color: #fff;
border-color: @color-link; border-color: @color-link;
color: @color-link; color: @color-link;
&::after, &::before{ text-decoration: none;
&::after,
&::before {
color: inherit; color: inherit;
border-color: inherit; border-color: inherit;
} }
} }
} }
} }
+ ul { + ul {
height: auto; height: auto;
overflow: hidden; overflow: hidden;
} }
&.closed + ul { &.closed + ul {
height: 0; height: 0;
} }
} }
} }
} }
} }

View file

@ -160,7 +160,7 @@
.btn-usertools-num () { .btn-usertools-num () {
.num { .num {
position: absolute; position: absolute;
right: -.4em; right: -.5em;
top: -.4em; top: -.4em;
background-color: @button_color; background-color: @button_color;
border-radius: 2px; border-radius: 2px;
@ -168,7 +168,7 @@
font-size: .6rem; font-size: .6rem;
font-weight: 400; font-weight: 400;
text-align: center; text-align: center;
line-height: 100%; line-height: 1;
padding: .2em .3em .1em; padding: .2em .3em .1em;
transition: @transition color, @transition background-color; transition: @transition color, @transition background-color;
} }
@ -189,8 +189,8 @@
.fontello(); .fontello();
.hide-text-show-before(); .hide-text-show-before();
color: @color-nav; color: inherit;
font-size: 1rem; font-size: 1.3em;
margin-top: .2rem; margin-top: .2rem;
} }