I was trying to make a navbar transition animation where I want a background color to appear on screen when someone clicks on the hamburger menu button of the navbar. The animation I want is that it first gains a vertical height of 100vh and then gains a width of 100% but when i tried, both animations are working together making it look like its growing out from the top left corner of the screen, I want the vertical height transition to occur first and then the width transition. My code is below
The below code runs when I clicked the hidden checkbox just to trigger the transition effect
&__checkbox:checked ~ &__background--1 {
bottom: 0;
width: 100%;
}
And the below code is what I am trying to do to make the transition happen
&--1 {
background: red;
width: 1rem;
z-index: 15;
bottom: 100%;
transition: bottom .3s, width 1s;
transition-delay: width 1s;
}
I am just trying but its just not working :(