A CSS framework might not be the best idea
Tags: css, framework, frontend, web
Published: 2021-05-18 16:25:44

CSS is one of the main building blocks of the modern web frontend alongside JavaScript and HTML, it's for this reason that's important for you to learn it and being able to use it without restraints, or at least being comfortable with it.
 
##CSS Frameworks: avoid excess.
While the benefits of CSS frameworks are real and contribute to develop a product or a page fast, take into account that they're not always the best option.
One case could be on bigger projects where you need to fine-tune your UI/UX and simply going with a framework most of the time will mean making hacks and workarounds when it could be more straightforward using pure CSS (even more if you use a pre-processor).
##Lightweight CSS files.
In most cases with a framework you have to use the entire library even if you just used a few components, this will add loading time to your site, and yes most of the frameworks can be compiled to suit specifically the components and styles that you're going to use, but this process is sometimes troublesome and adds time and work that's supposed to be reduced by using a framework on the first time defeating thus the purpose.
##Backend perspective.
Yes even If your frot is backend you still should know your way around CSS, while a framework could be a great choice for someone focused on the backend, you can still draw benefits from knowing CSS, sometimes a framework is just overkill for simple styles, and can be as fast as a framework to just use CSS in that case.
##The dangers of a CSS framework.
This a personal story, I was developing a personal project for counting calories in recipes, I finished the backend and jumped right into developing the frontend, I thought "I should use a CSS framework to get this done, I can customize it later", after spending some days on it and finished the frontend functionality I was ready to start fine-tuning it to make it look unique.
It turned out that to customize that framework I must use stylus, I went into setting it up in Next.js only to get hit with a wall apparently stylus is not that used, and I couldn't make it work on Next.js without spending a lot of effort into it. After days of searching and trying, I gave up and instead shifted to use SASS without any framework.
Were I started without a framework and I could've finished the styling part two times faster than I did.
##Final thoughts
As useful as frameworks can be, they have drawbacks and I don't think you should use them without a second thought on any project. In my opinion, frameworks work best when you need to get a product fast where a unique design and styles aren't necessary, on the other hand, if you want to dive into making a special and unique design I think you should consider it twice to use a framework and instead try to just use CSS (this includes preprocessor).


Photo by <a href="https://unsplash.com/@halacious?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">HalGatewood.com</a> on <a href="https://unsplash.com/s/photos/web?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>