Holy Grail Layout

Vanilla CSS Design System

Basic Holy Grail Layout

A classic web layout pattern with header, footer, main content area, and two sidebars.

Header
Main Content
Footer
<div class="holy-grail-layout">
	<header>Header</header>
	<div class="holy-grail-body">
		<nav>Navigation</nav>
		<div role="main">Main Content</div>
		<aside>Sidebar</aside>
	</div>
	<footer>Footer</footer>
</div>

Responsive Holy Grail Layout

The layout adapts to different screen sizes, stacking elements on mobile.

Header

Main Content

This is a responsive version of the Holy Grail layout. The sidebars will stack on mobile devices.

Footer
<div class="holy-grail-layout-responsive color-swatch-yellow">
	<header>Header</header>
	<div class="holy-grail-body">
		<nav>Navigation</nav>
		<div role="main">
			<h3>Main Content</h3>
			<p>This is a responsive version of the Holy Grail layout.
			The sidebars will stack on mobile devices.</p>
		</div>
		<aside>Sidebar</aside>
	</div>
	<footer>Footer</footer>
</div>

Class Descriptions:

Note: The Holy Grail layout classes (.holy-grail-layout, .holy-grail-body) in this design system are designed to create a flexible, responsive layout. The content within .holy-grail-body can be substituted, but it will consistently maintain the grid structure of [25%, 1fr, 25%], where "1fr" represents the middle column. 1fr will take 1 fraction of the available space.

Necessary workaround for making dark mode work with PurgeCSS. You can move this item but not delete it. Necessary workaround for making helix mode work with PurgeCSS. You can move this item but not delete it.