DEV Community

Discussion on: Vanilla CSS VS CSS Frameworks

Collapse
 
roblevintennis profile image
Rob Levin

The framework vs. vanilla css discussion for learning sake is an interesting one. I agree that overly relying on a framework as a crutch severely hinders one's own growth. But, it also typically means inefficient use of the framework too! The norm unfortunately. Most folks (I'd wager 99%) just drop in href="path/to/all/of/bootstrap.css". In fact, Bootstrap provides mechanisms for being used via its SCSS modules; it's stated and instructions are provided in their docs.

If you're in a SCSS env, you can literally start with:
github.com/twbs/bootstrap/blob/mai...

Just comment out the things you aren't using 💪 ⭐ 🍰

Also, BS's code is pretty solid and quite good for folks learning if they're a bit strategic in how they go about things. Rather then building an entire framework, start with your buttons.css. Maybe try on your own and see how you did. Then cross-reference BS and others. Then ask "hrm, why did they use that aria role? Let me google it." etc. and you will learn a ton. "Why do they chain their classes like that?" Then go read about SMACSS or look for Mark Otto's post on CSS chaining; and check out OOCSS. Then contrast that to BEM and others and decide pros/cons. Lots of great learning there.

I agree that if you build you're own framework it IS the ultimate in learning! I too have built a framework and continue to learn a great deal from that endeavor. But at work, I came into a codebase where they've already decided to use BS5 and so I also do that. But I learn from their ideas too. I think you should do both (use frameworks + write custom CSS). That's the ultimate imo 😄

Shubam, I checked out Ease. Overall nice project and good work! I have some suggestions (I know, you didn't ask haha). But fire up Lighthouse against some of your components. On the Buttons your contrast should be tweaked as it has contrast: "Background and foreground colors do not have a sufficient contrast ratio." — don't worry about it though; it's an easy fix and you can just play around with the colors. But your users will greatly benefit Shubam! Also, I'd recommend working out the margins/padding in a couple of places. The input areas feel to tight to the edge. Also, minor tweak :-) I hope you don't mind me chiming in...overall it's a huge accomplishment and you're definitely doing a lot of really nice things. Oh, I like the transitions you have. Very slick and smooth! Maybe check out mine too and give me your feedback. It's in my profile.

Overall, I would end that I wish JavaScript developers would take CSS a bit more seriously and stop being afraid of the cascade; and realize that no, CSS is not this easy thing that you can just slap on your features and pages. It requires some rigor and focused learning. But you can do it! 💥 🍰 💪 ⭐