DEV Community

Cover image for Why you should Stop using CSS Frameworks
Uriel Bitton
Uriel Bitton

Posted on • Edited on

Why you should Stop using CSS Frameworks

Yes CSS frameworks can be useful and speed up web design time which is the main purpose of why they were created.

But the issue with using CSS frameworks is that:

  1. You will eventually forget css and not be able to use it when css frameworks are not an option
  2. Having custom styles is complicated (overriding issues) and will require multiple css files to be loaded.
  3. Designing custom styled apps and websites is awesome and very creative as well as challenging, why avoid this? (My main reason)
  4. Your designs will look generic, many people use bootstrap, material ui, etc. They all look the same.
  5. Create your own css framework to use as your own personal style, this is much more rewarding and can be reused for future projects.

There are many more reasons i dislike css frameworks. These are just the main ones.

Do you agree? Let me know your thoughts below!

Edit
To clarify, as some people got a little excited, this article is an opinion piece and not meant to change people's way of doings things. I am simply dicussing why i don't like CSS frameworks, if you like to use them then by all means please do. This article only suggests, it does not force you to stop using frameworks - the title is just provocative on purpose.

Latest comments (73)

Collapse
 
roblevintennis profile image
Rob Levin

You should use all the frameworks. Then you should build your own. Then you should use no frameworks. Then you should do all of this at the same time.

Seriously though, you can learn so much from code diving into these frameworks while also writing your own code. I'm the creator of AgnosticUI. But you know what. Feel free to not use a framework or snag a couple scripts you like in mine but add them to your own scripts. Learn core CSS. That's key I'd say. But yeah, I don't subscribe to the "never" or "always" or "use this not that" approach. Do it all 😄. It's like an athlete that never does drills. Or opposite only does drills and never gets match play in. You need it all. Figure out the balance that works for you. Learn the fundamentals. Build cool shit. There's no other way I can see that works ⭐ 💪 🙌

Collapse
 
lewiscarville profile image
lewiscarville • Edited

I found css frameworks useful when starting out as a dev. This changed as I got a few more projects under my belt, however. I got fed up with overriding CSS rules when trying to achieve the mission of pixel perfection while transferring designs from XD/Sketch/etc to a browser window. Redundant code introduced via unused rules or overrides from CSS frameworks hurt the performance of the app/website.

Dropping frameworks and writing clean and modular CSS (only the reset.scss would be copy/pasted across projects) to me was infinitely more rewarding and in my opinion made me a much better UI dev.

I understand that a lot of frontend devs have stronger foundations in JS and therefore CSS can be the least exciting part of a project, so in those situations I can see the big pro’s in using a CSS framework.

For me though, my favourite part of being a frontend dev is writing the styles/css. So for anyone else who shares similar sentiments to me and hasn’t tried creating a project without a CSS framework - I highly recommend giving it a go!

Collapse
 
kr4idle profile image
Pete Steven

CSS frameworks are helpful to automate the work, but it deals with code directly.

I think a better automation are nocode tools because it doesn't pollute the code and keeps it clean. For example with Desech Studio you can automate the design to code flow by importing directly from figma, sketch, adobexd, and then you integrate with react, angular, vue directly.

This way you stay in the visual realm when dealing with html/css, while at the same time, be able to link to programming data attributes and hooks.

Collapse
 
amiamigo97 profile image
Ami Amigo

You nailed it...That's why I am building my own CSS framework. One step at a time: monalidor.com/on-building-my-own-c...

 
urielbitton profile image
Uriel Bitton

Well if you're a web developer its a good idea to learn basics of web design :)

Collapse
 
urielbitton profile image
Uriel Bitton

I have modified the title of the article to be less aggressive and made some edits as to my intentions weren't to force my opinion but merely to suggest and recommend.

I apologize if i offended anyone, it wasn't my intention at all!

We're all in it to help each other out, one love!

Collapse
 
urielbitton profile image
Uriel Bitton

So why not create your own css framework and solve all the issues!

Collapse
 
ivan_jrmc profile image
Ivan Jeremic

I use ChakraUI for React no chance to forget CSS since all props look like css.

Collapse
 
mathcpepper profile image
Matheus

Sup!

I agree with some points but I still like the idea that I don't need to reinvent the wheel to do something simple. I'm not the guy who likes to use pre-styled frameworks Bootstrap or Material UI, but utility frameworks are always welcome.

Here on my team, we've started with Tailwind CSS for a small internal project and this is teaching us a lot about how to organize our CSS file for our main product and how we should make it easiest to use for those who are initiating with us.

Great points btw, keep doing we think, bro :)

Collapse
 
urielbitton profile image
Uriel Bitton

of course not that's why i always encourage to re-use your css code or even better create your own css framework!

Collapse
 
pmejna profile image
Przemyslaw Mejna • Edited

Great topic. I see lately a trend of "working with CSS frameworks is the way. Forget the CSS". It started to showing up on some YouTube channels recently. My personal stance on this is: you do what makes you happy and makes your job done. Some people are saying that CSS is slow and that's why they use frameworks. Personally I disagree. Working with SCSS you can maintain your style and make it faster and more custom than with libraries. Most of the time... Which means that there are exceptions. I wouldn't say stop using framework as I wouldn't say stop using vanilla CSS. I see the points what you (the author of article) pointed out: people ignore CSS and go straight into frameworks not knowing the CSS itself. If people start their adventure with frontend - learning frameworks with not knowing CSS is not a good way. But if you are really good with application logic and code and your work might be kinda nice looking and same time generic because of use of framework - this is acceptable in fast paced environment. Custom approach usually will bring better results - but this is not a rule. And if some Devs feels more comfortable working with frameworks - as long as they achieve desired look and targets - go for this guy's. I will stay with vanilla - I know CSS well enough so can work at least as fast as with frameworks but I can make less lines of styling with that and make all custom. Just My preference.

Some comments may only be visible to logged-in visitors. Sign in to view all comments.