<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mukudzei Makepeace Mangena</title>
    <description>The latest articles on DEV Community by Mukudzei Makepeace Mangena (@mkdz_online).</description>
    <link>https://dev.to/mkdz_online</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F253769%2F0dc602b0-9386-4df2-b55f-cb1153e6e919.jpg</url>
      <title>DEV Community: Mukudzei Makepeace Mangena</title>
      <link>https://dev.to/mkdz_online</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mkdz_online"/>
    <language>en</language>
    <item>
      <title>Introduction to compound CSS grids.</title>
      <dc:creator>Mukudzei Makepeace Mangena</dc:creator>
      <pubDate>Mon, 15 May 2023 08:30:15 +0000</pubDate>
      <link>https://dev.to/mkdz_online/introduction-to-compound-css-grids-2hfp</link>
      <guid>https://dev.to/mkdz_online/introduction-to-compound-css-grids-2hfp</guid>
      <description>&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;Grids are a system for organizing and aligning content layouts on a page. Grids originated in print design. Now they are used in web design.&lt;/p&gt;

&lt;p&gt;In this article, the reader will learn about common grid types and how to create compound grids and their benefits.&lt;/p&gt;

&lt;p&gt;Responsive web design is complex, and user attention is limited. Grids help solve these problems. Compound grids can be a powerful tool for creating responsive and accessible websites.&lt;/p&gt;

&lt;h2&gt;
  
  
  Contents
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;A brief look at grids.&lt;/li&gt;
&lt;li&gt;What is a compound grid?&lt;/li&gt;
&lt;li&gt;How to create a compound grid?&lt;/li&gt;
&lt;li&gt;Benefits of compound grids.&lt;/li&gt;
&lt;li&gt;Example of a compound grid.&lt;/li&gt;
&lt;li&gt;Conclusion.&lt;/li&gt;
&lt;li&gt;Further reading.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  A brief look at grids.
&lt;/h2&gt;

&lt;p&gt;Grids have several parts: (1) Margin. (2) Content. (3) Spatial zones. (4) Rows. (5) Columns, and (6) Gutters.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--n9k6I3YL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bqkiovx25cctr41ulnln.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--n9k6I3YL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bqkiovx25cctr41ulnln.png" alt="Image description" width="800" height="706"&gt;&lt;/a&gt;&lt;br&gt;
                  &lt;em&gt;Anatomy of a grid layout&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Most web designers use traditional 12 or 16-column grids. There are four common grid types: column, modular, hierarchical, and manuscript grids. Each grid type has a different purpose.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mkicRUEK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/afa8tgcvsjs4cd4rde6w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mkicRUEK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/afa8tgcvsjs4cd4rde6w.png" alt="Image description" width="800" height="706"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a compound grid?
&lt;/h2&gt;

&lt;p&gt;Compound grids are a combination of two or more grids combined into a single grid layout. &lt;/p&gt;

&lt;p&gt;Grids are laid on top of each other to form a compound grid. Columns for each grid type should be the same size. Gutters must be equal size.&lt;/p&gt;

&lt;p&gt;See the example of a 2-column + 3-column grid below. The resulting grid is a 6-column compound grid.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dbHEn9ZU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tl6ktl2mxca0oekmpd8q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dbHEn9ZU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tl6ktl2mxca0oekmpd8q.png" alt="Image description" width="800" height="706"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can use equally sized columns and rows to create a consistent layout. &lt;/p&gt;

&lt;p&gt;The interplay between two or more grids produces a rhythmic pattern. The pattern alters the visual aspect and mental model of using grids. For example:&lt;br&gt;
2 + 3 columns result in pattern 2 1 1 2.&lt;br&gt;
3 + 4 columns result in pattern 3 1 2 2 1 3.&lt;br&gt;
4 + 5 columns result in pattern 6 1 4 3 3 4 1 6.&lt;br&gt;
and so on. &lt;/p&gt;

&lt;p&gt;The pattern represents each column's proportion in relation to the total available space excluding column gutters.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example of a compound CSS grid.
&lt;/h2&gt;

&lt;p&gt;Below is a real-world example of a desktop user interface created using a compound CSS grid. If you look closely, you can see six columns that form a 3 1 2 2 1 3 layout pattern.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--azj6rhxi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8gb32wsmryqfsv2bftxv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--azj6rhxi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8gb32wsmryqfsv2bftxv.png" alt="Image description" width="800" height="438"&gt;&lt;/a&gt;&lt;br&gt;
        &lt;em&gt;Example of a 3 1 2 2 1 grid layout pattern&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The pattern layout is ideal for wide screens. The &lt;code&gt;body&lt;/code&gt; element is wrapped inside a media query and is the target element for the CSS grid layout. This help to switch between wide and narrow screens. The fractional unit &lt;code&gt;fr&lt;/code&gt; simplifies creating CSS compound grid layouts.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Yr9dnDpL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2cqbuvgb5kn23b98jph5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Yr9dnDpL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2cqbuvgb5kn23b98jph5.png" alt="Image description" width="641" height="113"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For narrow screens, the &lt;code&gt;body&lt;/code&gt; element is a flex-box container.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7ex3-w2s--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o2z0drhal3vi627jynlq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7ex3-w2s--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o2z0drhal3vi627jynlq.png" alt="Image description" width="641" height="74"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Benefits of compound grids.
&lt;/h2&gt;

&lt;p&gt;Compound grids combine multiple grid types into a single design layout. They provide a flexible design with a clear hierarchy. This results in an accessible and easy-to-use web page. &lt;/p&gt;

&lt;p&gt;Compound grids give you much control over the layout, which makes your design decision-making process fast. With compound grids, you can design complex responsive layouts that adapt to different screen sizes and browsers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;As we have seen in this article, compound grids can be a powerful tool for creating responsive and accessible websites and applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  Further Reading.
&lt;/h2&gt;

&lt;p&gt;1.&lt;a href="https://juliannakunstler.com/vislit_grids.html"&gt;Grids in Graphic Design&lt;/a&gt;&lt;br&gt;
2.&lt;a href="https://stuffandnonsense.co.uk/blog/using-a-4-5-compound-grid"&gt;Using a 4 + 5 Compound Grid&lt;/a&gt;&lt;br&gt;
3.&lt;a href="https://stuffandnonsense.co.uk/blog/using-a-4-5-compound-grid"&gt;Inspired Design Decisions&lt;/a&gt;&lt;/p&gt;

</description>
      <category>cssgrids</category>
      <category>compoundgrids</category>
      <category>webdev</category>
      <category>webdesign</category>
    </item>
  </channel>
</rss>
