@import 'constants'; #WRAPPER > #MENU-SIDE{ /* [1] Elements du menu =========================================================*/ & > span{ display: block; position: relative; width: calc( 100% - 2*1em - 2*1.5em ); padding: .8em 1.5em; padding-left: calc( 1.5em + 2*1em ); border-bottom: 1px solid transparent; background: url('/src/static/menu-side/sub.svg@aaaaaa') right 1.5em center no-repeat; background-size: .5em .5em; color: #666; font-size: .85em; @include transition( color .2s ease-in-out, background .2s ease-in-out, box-shadow .2s ease-in-out, border .2s ease-in-out ); cursor: pointer; /* (1) Icone svg */ & > svg, & > svg *{ position: absolute; top: calc( 50% - 1em/2 ); left: 1.5em; width: 1em; height: 1em; fill: $dark-fg !important; @include transition( fill .2s ease-in-out ); } /* (2) Animation de @hover */ &:not(.active):hover{ background-image: url('/src/static/menu-side/sub.svg@000000'); color: #000; & > svg, & > svg *{ fill: #000 !important; } } /* (3) Animation quand .active */ &.active{ border-bottom-color: darken($theme-fg-primary, 5); // box-shadow: inset 0 0 1em darken($dark-bg-primary, 1); background-color: $theme-fg-primary; background-image: url('/src/static/menu-side/sub-active.svg@ffffff'); color: $dark-fg-primary; & > svg, & > svg *{ fill: #fff !important; } } } /* [2] Gestion du menu deroulant =========================================================*/ /* (1) Quand le menu est deroule */ & > span:not(.icon) + div.sub>span{ display: block; position: relative; width: calc( 100% - 1.5em - 2.5em ); padding: .5em 1.5em; padding-left: 2.5em; background: #eee url('/src/static/menu-side/sub.svg@777777') 1.5em center no-repeat;; background-size: .5em; color: #777777; font-size: .85em; cursor: pointer; @include transition( color .2s ease-in-out ); // Animation de @hover ou .active &:hover, &.active{ color: #000; background-image: url('/src/static/menu-side/sub.svg@000000'); } } & > span:not(.icon):not(.active) + div.sub>span{ display: none; } }