As an aside but still relevant question, why is CSS preferred over JS when these days it can do lots of things like JavaScript and probably uses similar resources.
You can do layouts with javascript?
Couldn't imagine ever wanting skip grid and flexbox for whatever has been concocted up for JS.
CSS and JavaScript specialize in two very different areas and are commonly used in tandem