_sass/components/_sidebar.scss in ovh-jekyll-doc-theme-0.1.8 vs _sass/components/_sidebar.scss in ovh-jekyll-doc-theme-0.1.9
- old
+ new
@@ -1,8 +1,26 @@
$sidebar-color-main: $oui-color-zodiac;
$sidebar-color-secondary: $oui-color-rhino;
+@keyframes openNavEntry {
+ from {
+ left: -25%;
+ }
+ to {
+ left: 0
+ }
+}
+
+@keyframes selectedNavEntry {
+ from {
+ transform: rotate(0);
+ }
+ to {
+ transform: rotate(90);
+ }
+}
+
.navbar {
min-height: 0;
padding: 0;
border: none;
margin-bottom: 0;
@@ -84,10 +102,15 @@
position: relative;
overflow-y: auto;
&--active {
height: auto;
+
+ .navbar__link--lvl-2 {
+ animation: openNavEntry .2s ease-in .1s;
+ left: 0;
+ }
}
}
&__entry {
list-style-type: none;
@@ -102,10 +125,12 @@
color: white;
&--lvl {
&-2 {
padding-left: $space-l2;
+ position: relative;
+ left: -25%;
background-color: $sidebar-color-secondary;
}
}
&:hover,
@@ -119,9 +144,13 @@
&-chevron {
margin-right: .8rem;
font-size: .8rem;
color: white;
opacity: .6;
+
+ &--active {
+ animation: selectedNavEntry .1s ease-in .1s;
+ }
}
&-active {
font-weight: 600;