DEV Community

Discussion on: Best CSS Frameworks in 2022

Collapse
 
roblevintennis profile image
Rob Levin

I do like the stats and bundlephobia research and what not. I always double check against bundlephobia though because sometimes it assumes I'm going to reference the wrong dist file.

I would say reading many of the comments there's a mix of folks that say don't use a framework at all vs. those that feel it's beneficial. I would definitely say that the grid and layout part of things should probably be learned via CSS's own flexbox and grid at this point. It's prolific and well supported and you're really just replacing it with a whole new DSL. I've heard Tailwind doesn't include a grid and I have to imagine this is because they figured, well they can just use CSS grid/flexbox for such things.

Open props is an interesting approach I've come to discover. It uses CSS custom properties similar to how a utilities framework would but seems liberating a bit. You could certainly look at that code and create your own custom custom props utilities quite easily.

I created AgnosticUI which is a component-based framework probably similar in many respects to Bootstrap as I use SMACSS or class chaining, but I sprinkle some utilities in there minimally. I had a huge Flexbox based grid abstraction that I gutted because I agree that in 2022 it's time for folks to just use platform CSS for this stuff.

Btw, we should also use logical properties! replace margin-left with margin-inline-start. If you don't know why or haven't heard of these things I strongly suggest googling it! Global writing modes for free. IE11 will EOL June 15. No need to worry about it! Embrace the platform and use CSS frameworks intelligently and only import modules you actually use or fork the project and create your own custom system. The creators will not be offended (unless you repurpose it as a framework of course lol).

And lastly, of course you must learn some CSS whichever way you go but you can do it!! 💪 ⭐ 🙌