Skip to content

Feature/12 column grid#720

Open
adonm wants to merge 2 commits intopicocss:mainfrom
adonm:feature/12-column-grid
Open

Feature/12 column grid#720
adonm wants to merge 2 commits intopicocss:mainfrom
adonm:feature/12-column-grid

Conversation

@adonm
Copy link

@adonm adonm commented Jan 31, 2026

Summary

Adds 12-column grid utility classes to the existing .grid system. Maintains backward compatibility with auto-layout grids through explicit opt-in (column classes).

Changes

  • Enhanced .grid class with 12-column mode (auto-activates when col-* classes are present)
  • Added column span classes: .col-1 through .col-12 and responsive .col-md-* variants

API

<!-- Mode 1: Auto-fit grid (default, no column classes) -->
<div class="grid">
  <div>Equal width</div>
  <div>Equal width</div>
</div>
<!-- Mode 2: 12-column layout (explicit spans) -->
<div class="grid">
  <div class="col-4">Sidebar (33%)</div>
  <div class="col-8">Main content (67%)</div>
</div>
<!-- Responsive: mobile-first with breakpoint overrides -->
<div class="grid">
  <div class="col-6 col-md-4">50% mobile, 33% tablet+</div>
  <div class="col-6 col-md-8">50% mobile, 67% tablet+</div>
</div>

Rationale

Aligns with Pico's minimal philosophy: two clear modes rather than mixed behaviors. Auto-fit for simple equal layouts, explicit spans for precise control.

Demo

Built and tested in pages branch (see demo).

Transparency Note: I used OpenCode and Kimi k2.5 for assistance with this PR, manually reviewing and testing everything proposed.

@adonm adonm force-pushed the feature/12-column-grid branch 5 times, most recently from cb0f876 to c7af096 Compare January 31, 2026 04:50
Add col-* and col-md-* classes for explicit column spans.
Extends existing .grid with optional 12-column mode.
@adonm adonm force-pushed the feature/12-column-grid branch from c7af096 to 9c35d54 Compare January 31, 2026 04:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant