This post was published 9 years ago

There's a chance things are out of date or no longer reflect my views today

Why you should roll your own framework

There are many opinions against rolling your own CSS framework. To the extent, it can make you think, let’s get bootstrap (or another) and see what happens.I genuinely believe there is no harm in making your own. I started one a couple of years ago and have just got back to it recently (as I have been focused more on designing lately). It isn’t in too bad shape, but it’s made me evaluate it and begin refining it again. There’s value in creating your own if you use it regularly and keep it up to date.

161 views

Why you should roll your own framework (featured image)

There are many opinions against rolling your own CSS framework. To the extent, it can make you think, let’s get bootstrap (or another) and see what happens.

I genuinely believe there is no harm in making your own. I started one a couple of years ago and have just got back to it recently (as I have been focused more on designing lately). It isn’t in too bad shape, but it’s made me evaluate it and begin refining it again. There’s value in creating your own if you use it regularly and keep it up to date.

Why to roll your own

The biggest reason to roll your own is you write every line of code. This is your code, you learn the ins and outs. It’s valuable because while other frameworks are well documented, you get to learn, test and update the code.

Testing

Testing is comes for free as part of frameworks, it’s a big reason to use one, and not having to worry about those bugs lets you focus on other things. I agree, though I argue, there is value in knowing, encountering and understanding the solution to them yourself. You can’t be too sure you’ll always be able to use the framework every time.

There is and always will be many inconsistencies between browsers. Just take a look at flexbox. It’s good to have a handle on solving those. A framework won’t be free of those either.

Using newer CSS properties

If you wait for a framework to find a way of implementing it, you’ll be waiting a long time. You’re missing out on gaining understanding as soon as you can use it.

You’ll know what to include and exclude

A framework is handy for all its utility. For me, I want one that I can get rid of the contents I don’t use. They do consider that, but having an understanding of your own, makes this easier.

It’s important to serve as little of everything you can in helping performance. Though it’s less important of a matter, which I never thought I would encounter, is the IE selector limit. This isn’t something you should have to deal with.

No solution to writing CSS is perfect

There are so many methodologies for writing CSS that they all have advantages and disadvantages that compete against each other. Why not find a scalable approach suitable to you?

Finding an approach that works for you, in turn, may help others. If one framework reigns supreme, who’s to say that opinion will always be right.

Above all, it will help you write CSS faster.

If a framework is written with a methodology like OOCSS or BEM, you won’t really understand the principles. If you don’t write and add your own CSS often enough you’ll only be carrying out the act of adding class names to your HTML.

You have your own style

The use of frameworks makes it difficult, to want to, change the style they enforce. In your own, you will add your own style to it. You’ll get to choose the individual states of buttons, form elements and everything else.

I have never used a popular framework because of this. I want my own design on it, sure I could customise it. That doesn’t really save time, and you have already made enough changes, to warrant your own.

Finishing thoughts

It doesn’t mean you have to release it to the public. However, there’s nothing stopping you from. It serves as a learning experience. From writing my own, I have been able to better identify, my ideal way of handling form styles, button states, media queries and colour.

View on Github