DEV Community

Adam Crockett πŸŒ€
Adam Crockett πŸŒ€

Posted on

Nobody needs your library

I don't have much use for a grid system these days, actually it's rare that I write any CSS at all, but today like most days, I think back to all the cool stuff I have wrote in my years of development.

One thing that stuck, I once read an article with the heading "nobody needs your grid system"... I will let that sink in... strong stuff right? This statement is about as true as any library β™Ž but also a sad fact, once somebody made the tool we technically don't need your spin on it, unless it is "better", I use the airquotes here because who is measuring?

I think that adoption is seen as the true metric for success, yet it doesn't actually mean that some less well known library isn't technically; better, faster, harder, stronger. So that's the crux of why we duplicate efforts?

Well we do, and we don't, the fork concept is supposed to allow you to take some code and sprinkle yourself all over it, modernise it, make it "better", make it inadvertently "worse", again, who's measuring? It's a highly subjective matter of opinion.

Speed of technology, Its fast but not always, sometimes it takes years for innovation to drop. In my day we used floats and display hacks, you kids and your flexible boxes and grids πŸ‘΄... Haha okay I'm kidding, I waited a few years then when browser support was good, I dropped floats and learned flex, then grid (a bit), as time goes on my efforts to understand 100% of the specification have tapered off, because Google, my point here is all of my libraries from back then apart from a few exceptions, well they became defunct.

Your library will become defunct, and your efforts to write that library will be large! Even if done to a standard that can be used by others. So why bother?

Why bother?

Because you learn stuff and the key thing is "we don't need your library", "we like your library", alot, it's great, keep going at it.

So back to the point, today I wrote a library, a grid system of all things, with a million to choose from and flexbox around, why did I do that? Because I'm forgetting how to do basic stuff in CSS and I think I can take the old float method and sprinkle some modern features onto it, CSS variable as I have said in the past can be nested in calc, calc can also be nested in calc, so it's actually now trivial to write a grid system that is calculated at run-time, kind of interesting to set a single variable at each breakpoint to resize everything, or just dynamically change the number of grid columns on the fly.

In conclusion, it's fun, you learn stuff, scratch itches and gain confidence. Don't do it for fame, do it for you.

Top comments (3)

Collapse
 
abhinav1217 profile image
Abhinav Kulshreshtha

3 functions in Sass and you have highly customizable css framework with grid system. These days I am trying to learn using flexbox and grid but few years back, this was what I preferred over bloated bootstrap and foundation.

Collapse
 
nandoblanco profile image
Nando

so... where's the library?!

Collapse
 
adam_cyclones profile image
Adam Crockett πŸŒ€

This library is so exclusive, you have to write it yourself πŸ˜‚