.nav-icon { width: 35px; height: 30px; position: relative; cursor: pointer; @include rotate(0deg); @include transition-duration(0.5s); @include transition-timing-function(ease-in-out); span { display: block; position: absolute; height: 6px; width: 100%; background: $color__link; border-radius: 6px; opacity: 1; left: 0; @include rotate(0deg); @include transition-duration(0.25s); @include transition-timing-function(ease-in-out); &:nth-child(1) { top: 0px; } &:nth-child(2), &:nth-child(3) { top: 12px; } &:nth-child(4) { top: 24px; } } &.open { span { &:nth-child(1) { top: 12px; width: 0%; left: 50%; } &:nth-child(2) { @include rotate(45deg); } &:nth-child(3) { @include rotate(-45deg); } &:nth-child(4) { top: 12px; width: 0%; left: 50%; } } } }