@pikapikamart
Posted
Hey, great work on this .Your solutions is somewhat different compared to other as well as mine. You made like a selection which colored the container and gets resized, so points for creativity.
Functions and responds well when toggling and changing the browser's width.
Regarding your query.
I looked into your js, it is somewhat cluttered because of the multiple stylings right. Personally, I hate doing or I don't really use javascript to apply a direct styling just to override some styles. Because that is the job of the css right. I think it will be better that, instead of applying those style, apply only the needed classes to that element. Then just declare on the css on what will happen based on that applied class. This way, you have created some abstraction between js and css.
I am referring to the second part of your function, which directly overrode the css.
But still, you did a good job and that creativity^^