Css Variables and Css Grid Sliding Menu

Hi, I just finished this sliding menu.
Do you guys have some toughts or improvement to share?
Is it written in a readable manner?

Thank you, I really need some feedback! :slightly_smiling_face:

1 Like

Thank you very much @camperextraordinaire for your insight!
I just changed my code where you suggested.

You said that it was confusing at first because you didn’t know where to click, so I added an arrow-up icon above the “click” text. Do you think is it enough?

Then I made two functions (toggleAnimation, removeAnimation) to keep my code DRY.

I forced the j counter to start from the beginning at the end of the array so the animation keeps looping.

Now I am trying to figure out how to change the if/else statement to reduce the length of my code.

Thank you!

Wow, you are so helpful!!

You made me realize a lot of things that I completely overlooked!
I forgot to declare all the variables! I am definitely a noob :joy:
The code you have reworked is so much cleaner.

You truly gave me a lot of topics to think about.
Now I will study the code and the concepts you posted in your last answer and will implement in my pen!