It seems that these days, at times of React (and similar frameworks), CSS receives less attention. However, I remember a not-so-distant past, perhaps, five years ago, when using CSS for simple UI elements was the desired approach. True, it has its limitations. But I don’t think we can discard CSS completely and rely on JavaScript driving even the most trivial elements of UI.

By applying (or at least trying to apply) the CSS-first approach, we can achieve some great results without necessarily relying on JavaScript. Such UI elements as tabs (one and two), carousels, navigation menus (one and two), and a lot more - can be built with CSS only. Check out CSSUI for some inspiration. Moreover, because this is all just CSS, responsiveness is “built-in”, and developers and designers can get creative and accommodate different scenarios.

I recently discovered this amazing blog post from Ahmad Shadeed - CSS :has() Interactive Guide. Just look at all those use cases they pointed out for a single pseudo-class! So much can be achieved with CSS only.

In my opinion, in 2024, despite all the recent developments in JS, we should still keep an eye on CSS capabilities.