VOOZH about

URL: https://www.geeksforgeeks.org/css/primer-css-layout-column-gutter/

⇱ Primer CSS Layout Column Gutter - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Primer CSS Layout Column Gutter

Last Updated : 23 Jul, 2025

Primer CSS is a free and open-source CSS framework that is built using the GitHub design system for providing support to the broad spectrum of GitHub websites. It helps in creating the foundation of the basic style elements such as spacing, components, typography, color, etc.

Primer CSS Gutter styles add padding to the left and right side of each column of layouts and apply a negative margin to the container so that the content inside each column lines up with content outside of the grid. Column Gutter helps in setting the gap (gutter) between elements layout columns i.e, between the main layout and sidebar layout. In this article, we will learn about Primer CSS Layout Column Gutter.

Primer CSS Layout Column Gutter Classes used:

  • default: This is not a class but for creating a default column gutter, the gap is (md: 16px, lg: 24px) between the main component and sidebar.
  • Layout--gutter-none: This class is used to add a gap of 0px between the layout main component and sidebar.
  • Layout--gutter-condensed: This class is used to add a gap of 16px between the layout main component and sidebar.
  • Layout--gutter-spacious: This class is used to add a gap of (md: 16px, lg: 32px, xl: 40px) between the layout main component and sidebar.

Syntax:

<div class="Layout Layout--gutter-none">
 <div class="Layout-main border">
 ...
 </div>

 <div class="Layout-sidebar border">
 ...
 </div>
</div>

Example 1: Below example demonstrates the default column gutter.

Output:

👁 Image
 

Example 2: Below example demonstrates the column gutter none using the Layout--gutter-none class.

Output:

👁 Image
 

Example 3: Below example demonstrates the column gutter condensed using the Layout--gutter-condensed class.

Output:

👁 Image
 

Example 4: Below example demonstrates the column gutter spacious using the Layout--gutter-spacious class.

Output:

👁 Image
 

Reference: https://primer.style/#column-gutter

Comment