Flex and Grid are the future, get on board

So how many of you are still using floats to design web layouts? I am assuming quite a number of us, bogged down by the comfort of familiarity and our addiction to our favorite frameworks. Most of the time we are cautious of any new technology especially when our old way still works, if it isn’t broken don’t fix it mentality. Well the catch is the old way has always been broken. Floats were never meant to design web layouts; they are simply a hack that the design world developed to solve an immediate problem.
Floats create multiple layout problems including bloated code, no vertical centering and those annoying clearing hacks for everything to sit pretty. Flex-box and CSS grid are the modern standards we should adopt to build our layouts. It affords us the power to create complex grid systems and layouts with very little code in a straight forward manner. Investing some time and resources to educate yourself on these two technologies is essential.
Now the major issue when it comes to adopting web tech is browser compatibility. The omnipotent threat of IE breaking your design and your soul all at the same time is a constant constrain. So adoption must be guided by context. Currently the global chorus is focused on CSS grid as the go to technology. caniuse.com gives a global grid usage of 84% but only 34% usage in Kenya. On the other hand, Flex box usage is at 94% globally and 85% in Kenya. From where I sit flex-box is basically the starting point as we wait for a wider adoption for Grid locally. We shouldn’t let users who won’t let go of IE8 to hold new ideas hostage.
There are a host of great tutorial resources on the internet to learn about flexbox, so get learning and start flexing.

Share This

| April 7, 2018