Become a 2018 ready Web Developer By Learning Flexbox and CSS Grid

A collection of resources to learn tomorrow’s technologies today.

Although I’ve referred to them as tomorrow’s technologies, Flexbox and Grid are supported by nearly all modern browsers. What makes these seem futurisitic is that very few web developers are aware of them. Even fewer use these while designing websites, instead relying on css frameworks like bootstrap, foundation and materialize. This despite many advantages offered over the frameworks.

Stock Photo; pexels.com

The 3 layout Options

  1. Box Model
  2. Flexbox
  3. CSS Grid

Box Model and Flexbox are useful for reasoning about laying out smaller components in a single direction. An example of this would be navigation items inside a navbar. Whereas CSS grid is used for laying out elements of the webpage along two axes. Think laying out navbar, main section and footer responsively.

Flexbox offfers the following benfites compared to tradtional methods like Box Model

  1. Easy to get started : Most Basic layouts can be achieved by using only three properties approprtiately: display, justify-content and align-items
  2. Painless vertical and horizontal centering of items
  3. You can manipulate inline elements easily.

You can read more about advantages of flexbox at bitsfoco.de.

Resources to Learn Flexbox

Kill Zombies while learning Flexbox

Handy refrence : MDN flexbox Docs

Pre-requisites:

  1. HTML Basics.
  2. CSS syntax and selectors
  3. CSS Values and Units
  4. Cascade and Inheritance
  5. Box Model

The Action Plan

  1. Understand flexbox through GIFS
  2. Your first visit to MDN docs : Get a high level overview by reading this page
  3. Get a more hands-on high level overview from this another brilliant medium article and build a music app over 90 minutes
  4. Fight off zombies while learning flexbox. I can’t recommend flexbox zombies enoguh!
  5. Alternatively if you prefer a tutorial with no bloodshed, help some frogs with your flexbox skills
  6. If you prefer video courses and want to learn from a brilliant instructor, check out Wes Bos’s WTF(What the Flexbox?!)

All the above resources are completely free. Once you are comfortable with flexbox, you can start learning CSS grid.

CSS Grid: What it is and How to learn

Carrots are good for your eyes, but don’t stare at screens for too long!

A grid is simply a collection of horizontal and vertical lines creating a pattern against which we can line up our design elements. They help us to create designs where elements don’t jump around or change width as we move from page to page, providing greater consistency on our websites.A grid will typically have columns, rows, and then gaps between each row and column — commonly referred to as gutters.

CSS Grid is one of a few new specifications for CSS — essentially, a guideline that defines a new way of implementing grid based layout without using 3rd party frameworks. It offers something new (and improved) in the way of layout control and works on top of existing layout tools like Flexbox.If Flexbox works from the content out, Grid works from the content grid in.

It is a very new technology with the following benefits

  1. Lighter websites : you only include the css that’s required, not all the extra features that come with a heavy framework.
  2. Easier to customise than frameworks. Your websites will be much more distinguished.
  3. Easier to reason about layout. No more memorizing and sprinkling around quirky class names.
  4. Unless you need to support older versions of I.E, you can start using it today.
  5. It allows for both complete control over layout placement, or you can let the browser do the work.

This article explain further how Grid will reduce a lot of issues we web developers face

Pre-requisites:

  1. Everything upto flexbox
  2. Media Queries

The Action Plan

  1. Utilize Paretto’s principle: Learn the 20% essential to master the remaining 80% of css grid by dedicating 25 miutes to this medium post
  2. Back to MDN: time for some high level overview
  3. A more visual overview in this beautiful guide
  4. Grow carrots while learning grid
  5. Video time, this youtube series by the always excellent net ninja.
  6. Enroll to this awesome scrimba course (video + interactive)

As with flexbox, the above resources are completely free. Take a moment to appreciate all the wonderful folks who dedicate their time and efforts to create such wonderful works and release it for free.

There is one benefit common to both Flexbox and CSS grid in addition to being future-proof.

While learning and using these technologies, you will not have any framework to hide behind. You will have to really know your CSS and why each element gets laid out the way it does. This is what will distinguish you from an average developer who has mastered her framework of choice.

Do share in the responses if you know of more wonderful resources.