<?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: MZO</title>
    <description>The latest articles on DEV Community by MZO (@withmehmet).</description>
    <link>https://dev.to/withmehmet</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4133324%2F147e63d8-c270-4a4e-96ae-bb2b1b5cf50e.png</url>
      <title>DEV Community: MZO</title>
      <link>https://dev.to/withmehmet</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/withmehmet"/>
    <language>en</language>
    <item>
      <title>MOGP: A SCSS Layout System That Only Does One Thing</title>
      <dc:creator>MZO</dc:creator>
      <pubDate>Sat, 19 Sep 2026 19:42:10 +0000</pubDate>
      <link>https://dev.to/withmehmet/mogp-a-scss-layout-system-that-only-does-one-thing-289d</link>
      <guid>https://dev.to/withmehmet/mogp-a-scss-layout-system-that-only-does-one-thing-289d</guid>
      <description>&lt;p&gt;&lt;strong&gt;&lt;em&gt;Container, grid, span, gap, offset — nothing more.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Today I'm open-sourc*&lt;em&gt;ing **MOGP Layout System&lt;/em&gt;*, a minimal SCSS library built around a simple idea: **layout doesn't need a framework, it needs a system.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;Most CSS frameworks try to do everything — layout, typography, color, components, animations, utility classes for margin and padding in every direction. That's useful when you want a full design system out of the box. But a lot of the time, you don't. You already have your own typography scale, your own color tokens, your own component library. What you actually need is much narrower: a container that centers content, a grid that behaves predictably, and a way to control spacing without writing the same media queries in every project.&lt;/p&gt;

&lt;p&gt;MOGP is built for that narrower need.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it actually is
&lt;/h2&gt;

&lt;p&gt;MOGP gives you five things, and stops there:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Container&lt;/strong&gt; — centers content, applies a max width&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Grid&lt;/strong&gt; — a configurable-column CSS Grid container&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Span&lt;/strong&gt; — how many columns an element takes up, responsively&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gap&lt;/strong&gt; — spacing between grid items, fixed or automatic&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Offset&lt;/strong&gt; — pushing an element sideways within the grid&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's it. No flex utilities, no display utilities, no color system, no components. If you need those, you already have tools for them — MOGP isn't trying to replace your design system, it's trying to stay out of its way.&lt;/p&gt;

&lt;h2&gt;
  
  
  A quick look
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"mogp-container mogp-pi-auto"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"mogp-grid mogp-gap-auto"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"mogp-span-12 mogp-span-md-6 mogp-span-lg-4"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Card&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"mogp-span-12 mogp-span-md-6 mogp-span-lg-4"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Card&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"mogp-span-12 mogp-span-md-12 mogp-span-lg-4"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Card&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Full width on mobile, two columns at &lt;code&gt;md&lt;/code&gt;, three at &lt;code&gt;lg&lt;/code&gt;. The container's padding and the grid's gap adjust automatically per breakpoint — no extra classes needed for that part.&lt;/p&gt;

&lt;h2&gt;
  
  
  The details that make it usable in real projects
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Everything is namespaced.&lt;/strong&gt; Classes and CSS custom properties both go through a &lt;code&gt;$namespace&lt;/code&gt; variable at compile time. Drop MOGP into a project with an existing design system, and it won't collide with anything — &lt;code&gt;.container&lt;/code&gt;, &lt;code&gt;.grid&lt;/code&gt;, &lt;code&gt;.span&lt;/code&gt; become &lt;code&gt;.mogp-container&lt;/code&gt;, &lt;code&gt;.mogp-grid&lt;/code&gt;, &lt;code&gt;.mogp-span&lt;/code&gt; (or whatever prefix you choose).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The grid isn't locked to 12 columns.&lt;/strong&gt; &lt;code&gt;$grid-columns&lt;/code&gt; is a single SCSS setting. Change it to 16, or 24, and every span, offset, and column-start/column-end class regenerates to match — no manual bookkeeping.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Auto-rhythm utilities.&lt;/strong&gt; &lt;code&gt;pi-auto&lt;/code&gt; and &lt;code&gt;gap-auto&lt;/code&gt; apply spacing that scales per breakpoint from a single class, instead of stacking five responsive classes per element. Change the rhythm once in your SCSS config, and every container/grid using &lt;code&gt;pi-auto&lt;/code&gt;/&lt;code&gt;gap-auto&lt;/code&gt; picks it up automatically.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Offset resets cleanly.&lt;/strong&gt; If you push an element with &lt;code&gt;offset-2&lt;/code&gt; at a smaller breakpoint, &lt;code&gt;offset-lg-auto&lt;/code&gt; cancels it cleanly at a larger one — resetting to the grid's normal auto-placement instead of forcing a specific column line.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Compile-time validation.&lt;/strong&gt; Pass a breakpoint map that isn't in ascending order, or a namespace with a space in it, and the build fails immediately with a clear error — instead of shipping broken CSS silently.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Two ready-made compiled CSS files&lt;/strong&gt;, if you don't want to compile SCSS yourself: a Minimal variant (container, grid, span, offset) and a Full variant (everything, including manual gap/padding steps and explicit column-start/column-end control).&lt;/p&gt;

&lt;h2&gt;
  
  
  Why build this instead of using what exists
&lt;/h2&gt;

&lt;p&gt;There are plenty of grid systems already. Most of them either come bundled inside a much larger framework, or they're flexible in ways I didn't need and rigid in the one way I did — the column count, the breakpoint names, the namespace. MOGP is deliberately narrow: it's the layout primitives, fully configurable, and nothing else. If your project's layout needs are "container + grid + spacing, but tell me exactly how," this is built for that.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where it stands right now
&lt;/h2&gt;

&lt;p&gt;MOGP is at &lt;strong&gt;v0.1.0&lt;/strong&gt; — an early release. The core API (container, grid, span, gap, offset, and the configuration system behind them) is stable enough to build on, but I'm treating this as a starting point rather than a finished product. If something is missing, awkward, or just wrong, I'd genuinely like to hear about it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Repo:&lt;/strong&gt; &lt;a href="https://github.com/withmehmet/mogp-layout" rel="noopener noreferrer"&gt;github.com/withmehmet/mogp-layout&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's MIT licensed, has no dependencies beyond Dart Sass, and works either as a compile-time SCSS import or as one of the two ready-made CSS files. Feedback and issues are very welcome.&lt;/p&gt;

</description>
      <category>css</category>
      <category>scss</category>
      <category>opensource</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
