08 / 30
All 30 in 30 Tailwind CSS Grid Layouts
- 01Tailwind Full-Bleed Article Layout for Long-Form Editorial
- 02Tailwind Docs Layout with Sticky Table of Contents
- 03Tailwind Photo Gallery Grid with auto-fill and Real Images
- 04Tailwind Holy Grail Page Layout for a News Site
- 05Tailwind Data Table with Subgrid Rows and Status Pills
- 06Tailwind Overlapping Card Hero for a Case Study
- 07Tailwind Help Center Layout with Fixed Sidebars
- 08Tailwind 12 Column Grid System for Marketing Pages
- 09Tailwind Bento Grid for a Product Feature Section
- 10Tailwind Magazine Spread Layout with Overlapping Headline
- 11Tailwind Responsive Card Grid for an Integrations Directory
- 12Tailwind CMS Category Grid that Compacts Itself with has()
- 13Tailwind Masonry Layout for a Saved Ideas Board
- 14Tailwind Hexagon Team Grid with clip-path Avatars
- 15Tailwind Subgrid Cards with Perfectly Aligned Buttons
- 16Tailwind Analytics Dashboard Layout with Grid App Shell
- 17Tailwind Pricing Table with Subgrid and a Featured Plan
- 18Tailwind Kanban Board with Scroll Snap Columns
- 19Tailwind Video Thumbnail Grid with Zero Layout Shift
- 20Tailwind Container Query Card for Reusable Article Teasers
- 21Tailwind Diagonal Section Band with skewY Counter-Skew
- 22Tailwind Asymmetric Poster Hero with Layered Grid Regions
- 23Tailwind Mosaic Photo Wall with a Designed Span Sequence
- 24Tailwind Dense Grid Packing for a Mixed-Size Asset Library
- 25Tailwind Onboarding Stepper with CSS Counters
- 26Tailwind macOS Window Layout with Vibrancy Sidebar
- 27Tailwind Scroll Snap Carousel with Peeking Slides
- 28Tailwind Status Map UI with Grid Coordinate Pins
- 29Tailwind Logo Wall with 1px Gap Hairline Dividers
- 30Tailwind Periodic Table Layout with Grid Coordinates
Tailwind 12 Column Grid System for Marketing Pages
A landing page assembled from a real 12-column system — hero, article, sidebar, three features, split CTA — with the design-tool column overlay rendered live behind the content so you can see every span land on its tracks.
Untitled UI Pro: 5,000+ React + Tailwind CSS v4 components · from $349 one-time
Untitled UI React · Affiliate link
The code
<section class="tgx-08 w-full min-h-svh bg-tgx08-paper font-tgx08-sans p-6">
<div class="flex items-center justify-between gap-3 flex-wrap mb-3">
<p class="font-tgx08-mono text-[0.68rem] tracking-[0.1em] uppercase text-tgx08-mut">Lumen · landing page skeleton</p>
<p class="font-tgx08-mono text-[0.68rem] text-tgx08-mut">12 tracks · gap 12px · overlay on</p>
</div>
<div class="relative rounded-xl border border-tgx08-edge p-[var(--tgx08-gap)] bg-[repeating-linear-gradient(90deg,var(--tgx08-overlay)_0_calc((100%_+_var(--tgx08-gap))/12_-_var(--tgx08-gap)),transparent_calc((100%_+_var(--tgx08-gap))/12_-_var(--tgx08-gap))_calc((100%_+_var(--tgx08-gap))/12))] bg-origin-content bg-clip-content">
<div class="grid grid-cols-12 gap-[var(--tgx08-gap)]">
<div class="col-span-12 rounded-xl bg-tgx08-hero text-white p-6 flex flex-col gap-2.5">
<p class="font-tgx08-mono text-[0.64rem] tracking-[0.16em] uppercase text-tgx08-herodim">span 12 · hero</p>
<h2 class="text-[clamp(1.4rem,3.4vw,2.1rem)] leading-[1.1] font-semibold tracking-[-0.015em] text-balance">Ship the layout, not the framework</h2>
<p class="text-[0.88rem] leading-[1.6] text-tgx08-herodim max-w-[54ch]">Twelve tracks, span utilities, and nothing else. The pink ruler behind this page is the same arithmetic your design tool draws.</p>
</div>
<article class="col-span-8 max-sm:col-span-12 rounded-xl bg-white border border-tgx08-blockedge p-5 flex flex-col gap-2">
<p class="font-tgx08-mono text-[0.62rem] uppercase tracking-[0.12em] text-tgx08-indigo">span 8 · article</p>
<h3 class="text-[1.02rem] font-semibold text-tgx08-ink">Why spans beat breakpoints</h3>
<p class="text-[0.84rem] leading-[1.6] text-tgx08-mut">A span is a statement about proportion. A breakpoint is a guess about a device. Write the proportion, let the container decide when it stops working, and add exactly one variant.</p>
</article>
<aside class="col-span-4 max-sm:col-span-12 rounded-xl bg-tgx08-block border border-tgx08-blockedge p-5 flex flex-col gap-2">
<p class="font-tgx08-mono text-[0.62rem] uppercase tracking-[0.12em] text-tgx08-indigo">span 4 · sidebar</p>
<p class="text-[0.84rem] leading-[1.6] text-tgx08-mut">8 + 4 = 12. The row is full, so the next block starts a new one.</p>
</aside>
<div class="col-span-4 max-sm:col-span-6 rounded-xl bg-white border border-tgx08-blockedge p-4 flex flex-col gap-1.5">
<span class="size-7 grid place-items-center rounded-lg bg-tgx08-block text-tgx08-indigo font-tgx08-mono text-[0.8rem]">↯</span>
<h4 class="text-[0.9rem] font-semibold text-tgx08-ink">Fast by default</h4>
<p class="text-[0.78rem] leading-[1.55] text-tgx08-mut">No runtime, no layout thrash.</p>
</div>
<div class="col-span-4 max-sm:col-span-6 rounded-xl bg-white border border-tgx08-blockedge p-4 flex flex-col gap-1.5">
<span class="size-7 grid place-items-center rounded-lg bg-tgx08-block text-tgx08-indigo font-tgx08-mono text-[0.8rem]">◫</span>
<h4 class="text-[0.9rem] font-semibold text-tgx08-ink">Readable spans</h4>
<p class="text-[0.78rem] leading-[1.55] text-tgx08-mut">The layout is in the markup.</p>
</div>
<div class="col-span-4 max-sm:col-span-12 rounded-xl bg-white border border-tgx08-blockedge p-4 flex flex-col gap-1.5">
<span class="size-7 grid place-items-center rounded-lg bg-tgx08-block text-tgx08-indigo font-tgx08-mono text-[0.8rem]">⇲</span>
<h4 class="text-[0.9rem] font-semibold text-tgx08-ink">One gap token</h4>
<p class="text-[0.78rem] leading-[1.55] text-tgx08-mut">Rhythm and ruler stay in sync.</p>
</div>
<div class="col-span-6 max-sm:col-span-12 rounded-xl bg-tgx08-block border border-tgx08-blockedge p-5 flex flex-col gap-2">
<h4 class="text-[0.95rem] font-semibold text-tgx08-ink">Start with the grid</h4>
<p class="text-[0.8rem] leading-[1.55] text-tgx08-mut">Copy the twelve-track container and build inward.</p>
</div>
<div class="col-span-6 max-sm:col-span-12 rounded-xl bg-tgx08-indigo text-white p-5 flex flex-col gap-2 justify-between">
<h4 class="text-[0.95rem] font-semibold">Get the starter</h4>
<a href="#0" class="w-fit inline-flex items-center min-h-11 px-4 rounded-lg bg-white text-tgx08-indigo text-[0.82rem] font-semibold no-underline transition-colors hover:bg-tgx08-block focus-visible:outline-2 focus-visible:outline-white focus-visible:outline-offset-2">Download</a>
</div>
</div>
</div>
</section><section class="tgx-08 w-full min-h-svh bg-tgx08-paper font-tgx08-sans p-6">
<div class="flex items-center justify-between gap-3 flex-wrap mb-3">
<p class="font-tgx08-mono text-[0.68rem] tracking-[0.1em] uppercase text-tgx08-mut">Lumen · landing page skeleton</p>
<p class="font-tgx08-mono text-[0.68rem] text-tgx08-mut">12 tracks · gap 12px · overlay on</p>
</div>
<div class="relative rounded-xl border border-tgx08-edge p-[var(--tgx08-gap)] bg-[repeating-linear-gradient(90deg,var(--tgx08-overlay)_0_calc((100%_+_var(--tgx08-gap))/12_-_var(--tgx08-gap)),transparent_calc((100%_+_var(--tgx08-gap))/12_-_var(--tgx08-gap))_calc((100%_+_var(--tgx08-gap))/12))] bg-origin-content bg-clip-content">
<div class="grid grid-cols-12 gap-[var(--tgx08-gap)]">
<div class="col-span-12 rounded-xl bg-tgx08-hero text-white p-6 flex flex-col gap-2.5">
<p class="font-tgx08-mono text-[0.64rem] tracking-[0.16em] uppercase text-tgx08-herodim">span 12 · hero</p>
<h2 class="text-[clamp(1.4rem,3.4vw,2.1rem)] leading-[1.1] font-semibold tracking-[-0.015em] text-balance">Ship the layout, not the framework</h2>
<p class="text-[0.88rem] leading-[1.6] text-tgx08-herodim max-w-[54ch]">Twelve tracks, span utilities, and nothing else. The pink ruler behind this page is the same arithmetic your design tool draws.</p>
</div>
<article class="col-span-8 max-sm:col-span-12 rounded-xl bg-white border border-tgx08-blockedge p-5 flex flex-col gap-2">
<p class="font-tgx08-mono text-[0.62rem] uppercase tracking-[0.12em] text-tgx08-indigo">span 8 · article</p>
<h3 class="text-[1.02rem] font-semibold text-tgx08-ink">Why spans beat breakpoints</h3>
<p class="text-[0.84rem] leading-[1.6] text-tgx08-mut">A span is a statement about proportion. A breakpoint is a guess about a device. Write the proportion, let the container decide when it stops working, and add exactly one variant.</p>
</article>
<aside class="col-span-4 max-sm:col-span-12 rounded-xl bg-tgx08-block border border-tgx08-blockedge p-5 flex flex-col gap-2">
<p class="font-tgx08-mono text-[0.62rem] uppercase tracking-[0.12em] text-tgx08-indigo">span 4 · sidebar</p>
<p class="text-[0.84rem] leading-[1.6] text-tgx08-mut">8 + 4 = 12. The row is full, so the next block starts a new one.</p>
</aside>
<div class="col-span-4 max-sm:col-span-6 rounded-xl bg-white border border-tgx08-blockedge p-4 flex flex-col gap-1.5">
<span class="size-7 grid place-items-center rounded-lg bg-tgx08-block text-tgx08-indigo font-tgx08-mono text-[0.8rem]">↯</span>
<h4 class="text-[0.9rem] font-semibold text-tgx08-ink">Fast by default</h4>
<p class="text-[0.78rem] leading-[1.55] text-tgx08-mut">No runtime, no layout thrash.</p>
</div>
<div class="col-span-4 max-sm:col-span-6 rounded-xl bg-white border border-tgx08-blockedge p-4 flex flex-col gap-1.5">
<span class="size-7 grid place-items-center rounded-lg bg-tgx08-block text-tgx08-indigo font-tgx08-mono text-[0.8rem]">◫</span>
<h4 class="text-[0.9rem] font-semibold text-tgx08-ink">Readable spans</h4>
<p class="text-[0.78rem] leading-[1.55] text-tgx08-mut">The layout is in the markup.</p>
</div>
<div class="col-span-4 max-sm:col-span-12 rounded-xl bg-white border border-tgx08-blockedge p-4 flex flex-col gap-1.5">
<span class="size-7 grid place-items-center rounded-lg bg-tgx08-block text-tgx08-indigo font-tgx08-mono text-[0.8rem]">⇲</span>
<h4 class="text-[0.9rem] font-semibold text-tgx08-ink">One gap token</h4>
<p class="text-[0.78rem] leading-[1.55] text-tgx08-mut">Rhythm and ruler stay in sync.</p>
</div>
<div class="col-span-6 max-sm:col-span-12 rounded-xl bg-tgx08-block border border-tgx08-blockedge p-5 flex flex-col gap-2">
<h4 class="text-[0.95rem] font-semibold text-tgx08-ink">Start with the grid</h4>
<p class="text-[0.8rem] leading-[1.55] text-tgx08-mut">Copy the twelve-track container and build inward.</p>
</div>
<div class="col-span-6 max-sm:col-span-12 rounded-xl bg-tgx08-indigo text-white p-5 flex flex-col gap-2 justify-between">
<h4 class="text-[0.95rem] font-semibold">Get the starter</h4>
<a href="#0" class="w-fit inline-flex items-center min-h-11 px-4 rounded-lg bg-white text-tgx08-indigo text-[0.82rem] font-semibold no-underline transition-colors hover:bg-tgx08-block focus-visible:outline-2 focus-visible:outline-white focus-visible:outline-offset-2">Download</a>
</div>
</div>
</div>
</section>@import "tailwindcss";
@theme {
--color-tgx08-paper: #f7f6fc;
--color-tgx08-paper: oklch(0.97 0.008 280);
--color-tgx08-edge: #ded9ee;
--color-tgx08-edge: oklch(0.89 0.02 280);
--color-tgx08-block: #edeafa;
--color-tgx08-block: oklch(0.94 0.02 280);
--color-tgx08-blockedge: #cdc6ec;
--color-tgx08-blockedge: oklch(0.83 0.05 280);
--color-tgx08-indigo: #5236b8;
--color-tgx08-indigo: oklch(0.45 0.19 280);
--color-tgx08-hero: #241a4d;
--color-tgx08-hero: oklch(0.26 0.1 285);
--color-tgx08-herodim: #c3bade;
--color-tgx08-herodim: oklch(0.82 0.04 285);
--color-tgx08-ink: #2c2545;
--color-tgx08-ink: oklch(0.29 0.05 285);
--color-tgx08-mut: #5f5880;
--color-tgx08-mut: oklch(0.48 0.05 285);
--font-tgx08-sans: 'Inter Tight', system-ui, sans-serif;
--font-tgx08-mono: 'JetBrains Mono', ui-monospace, monospace;
}
.tgx-08 {
width: 100%;
min-height: 100svh;
--tgx08-gap: 12px;
--tgx08-overlay: oklch(0.65 0.24 350 / 0.14);
}@import "tailwindcss";
@theme {
--color-tgx08-paper: #f7f6fc;
--color-tgx08-paper: oklch(0.97 0.008 280);
--color-tgx08-edge: #ded9ee;
--color-tgx08-edge: oklch(0.89 0.02 280);
--color-tgx08-block: #edeafa;
--color-tgx08-block: oklch(0.94 0.02 280);
--color-tgx08-blockedge: #cdc6ec;
--color-tgx08-blockedge: oklch(0.83 0.05 280);
--color-tgx08-indigo: #5236b8;
--color-tgx08-indigo: oklch(0.45 0.19 280);
--color-tgx08-hero: #241a4d;
--color-tgx08-hero: oklch(0.26 0.1 285);
--color-tgx08-herodim: #c3bade;
--color-tgx08-herodim: oklch(0.82 0.04 285);
--color-tgx08-ink: #2c2545;
--color-tgx08-ink: oklch(0.29 0.05 285);
--color-tgx08-mut: #5f5880;
--color-tgx08-mut: oklch(0.48 0.05 285);
--font-tgx08-sans: 'Inter Tight', system-ui, sans-serif;
--font-tgx08-mono: 'JetBrains Mono', ui-monospace, monospace;
}
.tgx-08 {
width: 100%;
min-height: 100svh;
--tgx08-gap: 12px;
--tgx08-overlay: oklch(0.65 0.24 350 / 0.14);
}Setup — do this once per project
Skip this if your project already runs Tailwind v4.
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>Compiles in the browser — perfect for a CodePen or a quick test, not for production.
npm install tailwindcss @tailwindcss/vite
npm install tailwindcss @tailwindcss/vite// vite.config.js ("type": "module" in package.json)
import { defineConfig } from 'vite'
import tailwindcss from '@tailwindcss/vite'
export default defineConfig({
plugins: [tailwindcss()],
})// vite.config.js ("type": "module" in package.json)
import { defineConfig } from 'vite'
import tailwindcss from '@tailwindcss/vite'
export default defineConfig({
plugins: [tailwindcss()],
})Any v4 setup works — Vite, PostCSS or the CLI. Nothing in this demo is bundler-specific.
@import "tailwindcss";
@theme {
--color-tgx08-paper: #f7f6fc;
--color-tgx08-paper: oklch(0.97 0.008 280);
--color-tgx08-edge: #ded9ee;
--color-tgx08-edge: oklch(0.89 0.02 280);
--color-tgx08-block: #edeafa;
--color-tgx08-block: oklch(0.94 0.02 280);
--color-tgx08-blockedge: #cdc6ec;
--color-tgx08-blockedge: oklch(0.83 0.05 280);
--color-tgx08-indigo: #5236b8;
--color-tgx08-indigo: oklch(0.45 0.19 280);
--color-tgx08-hero: #241a4d;
--color-tgx08-hero: oklch(0.26 0.1 285);
--color-tgx08-herodim: #c3bade;
--color-tgx08-herodim: oklch(0.82 0.04 285);
--color-tgx08-ink: #2c2545;
--color-tgx08-ink: oklch(0.29 0.05 285);
--color-tgx08-mut: #5f5880;
--color-tgx08-mut: oklch(0.48 0.05 285);
--font-tgx08-sans: 'Inter Tight', system-ui, sans-serif;
--font-tgx08-mono: 'JetBrains Mono', ui-monospace, monospace;
}
.tgx-08 {
width: 100%;
min-height: 100svh;
--tgx08-gap: 12px;
--tgx08-overlay: oklch(0.65 0.24 350 / 0.14);
}@import "tailwindcss";
@theme {
--color-tgx08-paper: #f7f6fc;
--color-tgx08-paper: oklch(0.97 0.008 280);
--color-tgx08-edge: #ded9ee;
--color-tgx08-edge: oklch(0.89 0.02 280);
--color-tgx08-block: #edeafa;
--color-tgx08-block: oklch(0.94 0.02 280);
--color-tgx08-blockedge: #cdc6ec;
--color-tgx08-blockedge: oklch(0.83 0.05 280);
--color-tgx08-indigo: #5236b8;
--color-tgx08-indigo: oklch(0.45 0.19 280);
--color-tgx08-hero: #241a4d;
--color-tgx08-hero: oklch(0.26 0.1 285);
--color-tgx08-herodim: #c3bade;
--color-tgx08-herodim: oklch(0.82 0.04 285);
--color-tgx08-ink: #2c2545;
--color-tgx08-ink: oklch(0.29 0.05 285);
--color-tgx08-mut: #5f5880;
--color-tgx08-mut: oklch(0.48 0.05 285);
--font-tgx08-sans: 'Inter Tight', system-ui, sans-serif;
--font-tgx08-mono: 'JetBrains Mono', ui-monospace, monospace;
}
.tgx-08 {
width: 100%;
min-height: 100svh;
--tgx08-gap: 12px;
--tgx08-overlay: oklch(0.65 0.24 350 / 0.14);
}<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap">What changed in the port
Which parts became utilities, which stayed CSS, and why.
- Labelled grey boxes became a page you could actually ship: hero, article + sidebar, three features, split CTA. The span labels survive only where a block exists to demonstrate them.
- 12 = 8 + 4 and 12 = 4 + 4 + 4 are now visible as real compositions rather than as a list of spans, which is what makes the wrapping rule (span 8 after span 6 leaves a hole) intuitive.
- Product upgrade: added a dark hero and an indigo CTA so the ruler reads against both light and dark blocks, and the overlay legend moved into a header line.
Here's a working CSS demo from CodeFronts. Use it as-is or adapt to your framework. All classes are scoped under a unique prefix so the code won't collide with your existing styles. MIT licensed.
Demo: Tailwind 12 Column Grid System for Marketing Pages
Source: https://codefronts.com/layouts/tailwind-css-grid-layouts/tailwind-12-column-grid-system-marketing-pages/
A landing page assembled from a real 12-column system — hero, article, sidebar, three features, split CTA — with the design-tool column overlay rendered live behind the content so you can see every span land on its tracks.
## HTML
```html
<section class="tgx-08 w-full min-h-svh bg-tgx08-paper font-tgx08-sans p-6">
<div class="flex items-center justify-between gap-3 flex-wrap mb-3">
<p class="font-tgx08-mono text-[0.68rem] tracking-[0.1em] uppercase text-tgx08-mut">Lumen · landing page skeleton</p>
<p class="font-tgx08-mono text-[0.68rem] text-tgx08-mut">12 tracks · gap 12px · overlay on</p>
</div>
<div class="relative rounded-xl border border-tgx08-edge p-[var(--tgx08-gap)] bg-[repeating-linear-gradient(90deg,var(--tgx08-overlay)_0_calc((100%_+_var(--tgx08-gap))/12_-_var(--tgx08-gap)),transparent_calc((100%_+_var(--tgx08-gap))/12_-_var(--tgx08-gap))_calc((100%_+_var(--tgx08-gap))/12))] bg-origin-content bg-clip-content">
<div class="grid grid-cols-12 gap-[var(--tgx08-gap)]">
<div class="col-span-12 rounded-xl bg-tgx08-hero text-white p-6 flex flex-col gap-2.5">
<p class="font-tgx08-mono text-[0.64rem] tracking-[0.16em] uppercase text-tgx08-herodim">span 12 · hero</p>
<h2 class="text-[clamp(1.4rem,3.4vw,2.1rem)] leading-[1.1] font-semibold tracking-[-0.015em] text-balance">Ship the layout, not the framework</h2>
<p class="text-[0.88rem] leading-[1.6] text-tgx08-herodim max-w-[54ch]">Twelve tracks, span utilities, and nothing else. The pink ruler behind this page is the same arithmetic your design tool draws.</p>
</div>
<article class="col-span-8 max-sm:col-span-12 rounded-xl bg-white border border-tgx08-blockedge p-5 flex flex-col gap-2">
<p class="font-tgx08-mono text-[0.62rem] uppercase tracking-[0.12em] text-tgx08-indigo">span 8 · article</p>
<h3 class="text-[1.02rem] font-semibold text-tgx08-ink">Why spans beat breakpoints</h3>
<p class="text-[0.84rem] leading-[1.6] text-tgx08-mut">A span is a statement about proportion. A breakpoint is a guess about a device. Write the proportion, let the container decide when it stops working, and add exactly one variant.</p>
</article>
<aside class="col-span-4 max-sm:col-span-12 rounded-xl bg-tgx08-block border border-tgx08-blockedge p-5 flex flex-col gap-2">
<p class="font-tgx08-mono text-[0.62rem] uppercase tracking-[0.12em] text-tgx08-indigo">span 4 · sidebar</p>
<p class="text-[0.84rem] leading-[1.6] text-tgx08-mut">8 + 4 = 12. The row is full, so the next block starts a new one.</p>
</aside>
<div class="col-span-4 max-sm:col-span-6 rounded-xl bg-white border border-tgx08-blockedge p-4 flex flex-col gap-1.5">
<span class="size-7 grid place-items-center rounded-lg bg-tgx08-block text-tgx08-indigo font-tgx08-mono text-[0.8rem]">↯</span>
<h4 class="text-[0.9rem] font-semibold text-tgx08-ink">Fast by default</h4>
<p class="text-[0.78rem] leading-[1.55] text-tgx08-mut">No runtime, no layout thrash.</p>
</div>
<div class="col-span-4 max-sm:col-span-6 rounded-xl bg-white border border-tgx08-blockedge p-4 flex flex-col gap-1.5">
<span class="size-7 grid place-items-center rounded-lg bg-tgx08-block text-tgx08-indigo font-tgx08-mono text-[0.8rem]">◫</span>
<h4 class="text-[0.9rem] font-semibold text-tgx08-ink">Readable spans</h4>
<p class="text-[0.78rem] leading-[1.55] text-tgx08-mut">The layout is in the markup.</p>
</div>
<div class="col-span-4 max-sm:col-span-12 rounded-xl bg-white border border-tgx08-blockedge p-4 flex flex-col gap-1.5">
<span class="size-7 grid place-items-center rounded-lg bg-tgx08-block text-tgx08-indigo font-tgx08-mono text-[0.8rem]">⇲</span>
<h4 class="text-[0.9rem] font-semibold text-tgx08-ink">One gap token</h4>
<p class="text-[0.78rem] leading-[1.55] text-tgx08-mut">Rhythm and ruler stay in sync.</p>
</div>
<div class="col-span-6 max-sm:col-span-12 rounded-xl bg-tgx08-block border border-tgx08-blockedge p-5 flex flex-col gap-2">
<h4 class="text-[0.95rem] font-semibold text-tgx08-ink">Start with the grid</h4>
<p class="text-[0.8rem] leading-[1.55] text-tgx08-mut">Copy the twelve-track container and build inward.</p>
</div>
<div class="col-span-6 max-sm:col-span-12 rounded-xl bg-tgx08-indigo text-white p-5 flex flex-col gap-2 justify-between">
<h4 class="text-[0.95rem] font-semibold">Get the starter</h4>
<a href="#0" class="w-fit inline-flex items-center min-h-11 px-4 rounded-lg bg-white text-tgx08-indigo text-[0.82rem] font-semibold no-underline transition-colors hover:bg-tgx08-block focus-visible:outline-2 focus-visible:outline-white focus-visible:outline-offset-2">Download</a>
</div>
</div>
</div>
</section>
```
## CSS
```css
@import "tailwindcss";
@theme {
--color-tgx08-paper: #f7f6fc;
--color-tgx08-paper: oklch(0.97 0.008 280);
--color-tgx08-edge: #ded9ee;
--color-tgx08-edge: oklch(0.89 0.02 280);
--color-tgx08-block: #edeafa;
--color-tgx08-block: oklch(0.94 0.02 280);
--color-tgx08-blockedge: #cdc6ec;
--color-tgx08-blockedge: oklch(0.83 0.05 280);
--color-tgx08-indigo: #5236b8;
--color-tgx08-indigo: oklch(0.45 0.19 280);
--color-tgx08-hero: #241a4d;
--color-tgx08-hero: oklch(0.26 0.1 285);
--color-tgx08-herodim: #c3bade;
--color-tgx08-herodim: oklch(0.82 0.04 285);
--color-tgx08-ink: #2c2545;
--color-tgx08-ink: oklch(0.29 0.05 285);
--color-tgx08-mut: #5f5880;
--color-tgx08-mut: oklch(0.48 0.05 285);
--font-tgx08-sans: 'Inter Tight', system-ui, sans-serif;
--font-tgx08-mono: 'JetBrains Mono', ui-monospace, monospace;
}
.tgx-08 {
width: 100%;
min-height: 100svh;
--tgx08-gap: 12px;
--tgx08-overlay: oklch(0.65 0.24 350 / 0.14);
}
```Here's a working CSS demo from CodeFronts. Use it as-is or adapt to your framework. All classes are scoped under a unique prefix so the code won't collide with your existing styles. MIT licensed.
Demo: Tailwind 12 Column Grid System for Marketing Pages
Source: https://codefronts.com/layouts/tailwind-css-grid-layouts/tailwind-12-column-grid-system-marketing-pages/
A landing page assembled from a real 12-column system — hero, article, sidebar, three features, split CTA — with the design-tool column overlay rendered live behind the content so you can see every span land on its tracks.
## HTML
```html
<section class="tgx-08 w-full min-h-svh bg-tgx08-paper font-tgx08-sans p-6">
<div class="flex items-center justify-between gap-3 flex-wrap mb-3">
<p class="font-tgx08-mono text-[0.68rem] tracking-[0.1em] uppercase text-tgx08-mut">Lumen · landing page skeleton</p>
<p class="font-tgx08-mono text-[0.68rem] text-tgx08-mut">12 tracks · gap 12px · overlay on</p>
</div>
<div class="relative rounded-xl border border-tgx08-edge p-[var(--tgx08-gap)] bg-[repeating-linear-gradient(90deg,var(--tgx08-overlay)_0_calc((100%_+_var(--tgx08-gap))/12_-_var(--tgx08-gap)),transparent_calc((100%_+_var(--tgx08-gap))/12_-_var(--tgx08-gap))_calc((100%_+_var(--tgx08-gap))/12))] bg-origin-content bg-clip-content">
<div class="grid grid-cols-12 gap-[var(--tgx08-gap)]">
<div class="col-span-12 rounded-xl bg-tgx08-hero text-white p-6 flex flex-col gap-2.5">
<p class="font-tgx08-mono text-[0.64rem] tracking-[0.16em] uppercase text-tgx08-herodim">span 12 · hero</p>
<h2 class="text-[clamp(1.4rem,3.4vw,2.1rem)] leading-[1.1] font-semibold tracking-[-0.015em] text-balance">Ship the layout, not the framework</h2>
<p class="text-[0.88rem] leading-[1.6] text-tgx08-herodim max-w-[54ch]">Twelve tracks, span utilities, and nothing else. The pink ruler behind this page is the same arithmetic your design tool draws.</p>
</div>
<article class="col-span-8 max-sm:col-span-12 rounded-xl bg-white border border-tgx08-blockedge p-5 flex flex-col gap-2">
<p class="font-tgx08-mono text-[0.62rem] uppercase tracking-[0.12em] text-tgx08-indigo">span 8 · article</p>
<h3 class="text-[1.02rem] font-semibold text-tgx08-ink">Why spans beat breakpoints</h3>
<p class="text-[0.84rem] leading-[1.6] text-tgx08-mut">A span is a statement about proportion. A breakpoint is a guess about a device. Write the proportion, let the container decide when it stops working, and add exactly one variant.</p>
</article>
<aside class="col-span-4 max-sm:col-span-12 rounded-xl bg-tgx08-block border border-tgx08-blockedge p-5 flex flex-col gap-2">
<p class="font-tgx08-mono text-[0.62rem] uppercase tracking-[0.12em] text-tgx08-indigo">span 4 · sidebar</p>
<p class="text-[0.84rem] leading-[1.6] text-tgx08-mut">8 + 4 = 12. The row is full, so the next block starts a new one.</p>
</aside>
<div class="col-span-4 max-sm:col-span-6 rounded-xl bg-white border border-tgx08-blockedge p-4 flex flex-col gap-1.5">
<span class="size-7 grid place-items-center rounded-lg bg-tgx08-block text-tgx08-indigo font-tgx08-mono text-[0.8rem]">↯</span>
<h4 class="text-[0.9rem] font-semibold text-tgx08-ink">Fast by default</h4>
<p class="text-[0.78rem] leading-[1.55] text-tgx08-mut">No runtime, no layout thrash.</p>
</div>
<div class="col-span-4 max-sm:col-span-6 rounded-xl bg-white border border-tgx08-blockedge p-4 flex flex-col gap-1.5">
<span class="size-7 grid place-items-center rounded-lg bg-tgx08-block text-tgx08-indigo font-tgx08-mono text-[0.8rem]">◫</span>
<h4 class="text-[0.9rem] font-semibold text-tgx08-ink">Readable spans</h4>
<p class="text-[0.78rem] leading-[1.55] text-tgx08-mut">The layout is in the markup.</p>
</div>
<div class="col-span-4 max-sm:col-span-12 rounded-xl bg-white border border-tgx08-blockedge p-4 flex flex-col gap-1.5">
<span class="size-7 grid place-items-center rounded-lg bg-tgx08-block text-tgx08-indigo font-tgx08-mono text-[0.8rem]">⇲</span>
<h4 class="text-[0.9rem] font-semibold text-tgx08-ink">One gap token</h4>
<p class="text-[0.78rem] leading-[1.55] text-tgx08-mut">Rhythm and ruler stay in sync.</p>
</div>
<div class="col-span-6 max-sm:col-span-12 rounded-xl bg-tgx08-block border border-tgx08-blockedge p-5 flex flex-col gap-2">
<h4 class="text-[0.95rem] font-semibold text-tgx08-ink">Start with the grid</h4>
<p class="text-[0.8rem] leading-[1.55] text-tgx08-mut">Copy the twelve-track container and build inward.</p>
</div>
<div class="col-span-6 max-sm:col-span-12 rounded-xl bg-tgx08-indigo text-white p-5 flex flex-col gap-2 justify-between">
<h4 class="text-[0.95rem] font-semibold">Get the starter</h4>
<a href="#0" class="w-fit inline-flex items-center min-h-11 px-4 rounded-lg bg-white text-tgx08-indigo text-[0.82rem] font-semibold no-underline transition-colors hover:bg-tgx08-block focus-visible:outline-2 focus-visible:outline-white focus-visible:outline-offset-2">Download</a>
</div>
</div>
</div>
</section>
```
## CSS
```css
@import "tailwindcss";
@theme {
--color-tgx08-paper: #f7f6fc;
--color-tgx08-paper: oklch(0.97 0.008 280);
--color-tgx08-edge: #ded9ee;
--color-tgx08-edge: oklch(0.89 0.02 280);
--color-tgx08-block: #edeafa;
--color-tgx08-block: oklch(0.94 0.02 280);
--color-tgx08-blockedge: #cdc6ec;
--color-tgx08-blockedge: oklch(0.83 0.05 280);
--color-tgx08-indigo: #5236b8;
--color-tgx08-indigo: oklch(0.45 0.19 280);
--color-tgx08-hero: #241a4d;
--color-tgx08-hero: oklch(0.26 0.1 285);
--color-tgx08-herodim: #c3bade;
--color-tgx08-herodim: oklch(0.82 0.04 285);
--color-tgx08-ink: #2c2545;
--color-tgx08-ink: oklch(0.29 0.05 285);
--color-tgx08-mut: #5f5880;
--color-tgx08-mut: oklch(0.48 0.05 285);
--font-tgx08-sans: 'Inter Tight', system-ui, sans-serif;
--font-tgx08-mono: 'JetBrains Mono', ui-monospace, monospace;
}
.tgx-08 {
width: 100%;
min-height: 100svh;
--tgx08-gap: 12px;
--tgx08-overlay: oklch(0.65 0.24 350 / 0.14);
}
```How this works
Tailwind already IS the grid system. The CSS original's selling point — twelve span utilities in twelve lines instead of a framework — is core behaviour here, so the port spends its effort on the part still worth writing: the overlay, and a page worth measuring.
The overlay is honest. Stripe width calc((100% + gap)/12 - gap) with period calc((100% + gap)/12) means the stripes land exactly on tracks at any width, and bg-clip-content keeps them inside the frame's padding.
Make it yours
- Change
--tgx08-gaponce — tracks, rhythm and overlay follow. - 16-column dense layouts:
grid-cols-16and swap the two/12divisors. - Delete the overlay utility in production; it is a ruler, not chrome.
Gotchas — read before shipping
- Spans do not force new rows — a
col-span-8after acol-span-6wraps and leaves a hole. Usecol-start-1to force a row start. - The overlay's
calc()assumes uniform gaps; derive it from the column gap only if row-gap differs. grid-cols-12already emitsminmax(0,1fr)tracks — hand-writingrepeat(12,1fr)is a downgrade.
Browser support
| Chrome | Safari | Firefox | Edge |
|---|---|---|---|
| 111+ | 16.4+ | 128+ | 111+ |
Core grid plus calc() in a gradient (2019+).