Things to think about with a grid system for layout

When developing a frontend layout template, a popular solution is using a grid system. Grids were initially developed to aid in designing print layouts, but quickly caught on as a tool to help with thinking and communicating about web design, especially for responsive web design.

A grid system is generally composed of Columns, Gutters, and Margins. Columns are the vertical dividers that page components are aligned on, gutters are the spaces between columns, and margins are the space to the left and right of your primary content. Material.io does a fantastic job of going into further detail as to what these mean.

Goals of a grid:

  1. Reduce the complexity that goes into handling how a page reacts for different responsive sizes
  2. Enforce consistency between pages
  3. Align components on the page
  4. Give a common language between designer and developer for layout intent (and reduce pixel pushing)

There are many ways to technically implement a grid, but before you implement it your design and development teams should work together to align on some guidelines for the grid system.

Questions to answer

Examples of how these could be answered to build a design system:

Option 1 - Highly opinionated

This is the most reliable and simple to use, but it is not flexible, and you'll end up with many discussions when the design doesn't fit perfectly on the grid, and the design will have to shift

Option 2 - Highly flexible

This option is easy to use, but you'll also run into a lot of edge cases when implementing where something will be too small on the edge of the breakpoint, and you have to tweak back and forth to determine how many columns wide something should be

Option 3 - Middle ground

References: