Never lose your train of thought again

The layout system that helps you build responsive layouts in seconds, without context switching, so you stay in your flow

Layouts can be a pain in the ass.

On bad days, they seem like energy blackholes that suck you in — before you know it, you’ve spent way too much time fiddling with CSS properties when you know you should be building a feature.

When you notice this, you pull back. But it’s already too late. You’ve lost track of what you were building — and you have to recall the context again, often from the beginning.

This is agonizing and it feels ineffective and inefficient.

Is there a better way of doing this”? You might ask. But you also think “no”, because you just need to get better at Flexbox and CSS Grid and that should solve your problem.

Except… it didn’t — you still fiddle with layouts and you still lose context of what you were trying to do.

Maybe you blame your own discipline and focus. “I should know better than that. I shouldn’t mess around with CSS when I want to build features”. But you still end up messing around with CSS anyway.

I’ve been beating up myself over this issue for a long time. But recently, I recognize that people like us make great frontend developers:

  • We’re meticulous
  • We have a great eye for detail
  • We want to do great work
  • We don’t let anything get in our way
  • And we care about providing an amazing experience for our users

But… losing track of what we’re doing is extremely frustrating. All of the thoughts we’ve built up over the last couple of hours is gone, just like that. And it’s just because we want to fix a simple CSS problem! (Haa…)

We know this isn’t right because we have bigger fish to fry, but we also know this is right because the craft is so dang important. And sweating the details makes us better at it.

I didn’t want to get caught in this dilemma forever. So, without making myself wrong, I tried to find a way to satisfy my desire for good craft and yet still be able to make layouts fast.

The Search For A Better Way To Handle Layouts

No matter how I searched, I could not find a good solution that would resolve this context-switching problem in an elegant way.

Frameworks don’t work because frameworks authors tend to think layout = 12-column grid. So they give you 12-column grid and call it a day (and it’s not even responsive).

Templates don’t work because you have to select the right template, read through the code, pick out the HTML structure and CSS properties you need, delete everything else that should not be there, test it, and debug if you made a mistake (which is very very common), to a point that writing HTML and CSS from scratch beats using templates (for me).

Tailwind doesn’t work because Tailwind simply gives you a different way of writing CSS. You still have to context-switch between CSS mode and whatever context you were holding on to.

So the only option left was to get better at CSS,

But that doesn’t work too… because I realized that no matter how good I got at CSS, I cannot expect my brain to regurgitate every HTML Structure and CSS pattern from memory within a couple of seconds. I STILL had to switch my brain into CSS mode…

I could remember all the possible patterns by heart, but that’s a lot of patterns to remember. If I had to remember these patterns, I’d rather just go into CSS mode…

(Haa..)

After months of research and testing, I finally found a breakthrough that lets me create layouts quickly without losing my train of thought.

The 4-Category System That Keeps You in Your Flow

If we don’t want to go into CSS mode and lose track of the context, we must remain high-level in our thinking.

To remain high-level in our thinking, we can use classes that match that high-level thinking model — like Sidebar, Masonry, Three Column Grid, and so on.

After researching deeply about layouts, I realize that a majority (maybe 90%?) of the CSS we write for layouts fall into 4 categories:

Shell

The fundamental app structure, like:

  • Header
  • Sidebar
  • Main content

Macro

Page-level arrangements, like:

  • Sections
  • Grids

Micro

Component-level creations, like:

  • Arrangement of the content
  • Dividers
  • Breakouts

Positioning

Precise placement, like:

  • Overlays
  • Corner elements
  • Badges

The requirements for each of these four layers are slightly different, so they need different CSS treatments:

  • Shell layouts must be flexible enough to account for various holy-grail placements
  • Macro layouts must enable responsive behavior and still be flexible enough for all kinds of placements
  • Micro layouts needs to give you ways to shape the component to different styles
  • Positioning layouts need quick precision so you don’t adjust top, left, bottom, and right positions manually, and so on.

When I realized this, I began building classes to support what each category needs — just like how we build functions to execute tasks without worrying about the implementation details within them.

The result of all of that is Splendid Layouts.

Introducing…Splendid Layouts

A system that lets you build responsive layouts within seconds, from scratch, without losing your context

Splendid Layouts contains 25 layout “classes” spread over these four categories:

  • 2 in shell
  • 9 in macro
  • 9 in micro
  • 5 in positioning

I said “classes” because some for these classes are classes that you will use directly — like grid-simple. While some of these will be paired with a direction or placement — like edge-top.

Either way, these classes, paired or otherwise, are highly visual — you can see what they’re supposed to do; there’s no ambiguity; and so your mind can place them in the right location relatively quickly even when you create a layout from scratch.

All without diving deep into CSS-land!

Without further ado, here are the classes:

Shell Layouts
Shell Simple

Basic holy-grail with header, content, and footer.

Header
Content
Shell Grid

Holy-grail layout with header, content, footer, and sidebars.

Header
Content
Footer
Macro Layouts
Wrap

Adds inline padding to wrap the element

Wrapped content
Grid simple

Creates a CSS Grid with any number of columns.

Grid Fr Auto

Creates a CSS Grid with 1fr auto.

1fr
Auto
Grid Fr Auto

Creates a CSS Grid auto 1fr.

Auto
1fr
Grid With Breakout

A three-column grid that gives you utilities to break out of the main content easily.

Normal
🫲
Normal
🤜
Breakout
Start
End
Grid Gallery

Create CSS galleries with auto-fill or auto-fit.

Grid Flex

A flexbox grid that automatically centers or expands orphan items.

masonry

A grid with items of unequal width and height.

Subgrid

Use CSS subgrid and nested subgrids with ease

1
2
3
4
5
6
7
8
Micro Layouts
Horizontal

Arrange items in a horizontal manner.

One
Two
Three
Vertical

Arrange items in a vertical manner.

One
Two
Three
Four
Five
Six
Flow

Allow items to flow from one line to another.

One
Two
Three
Four
Five
Six
Stack

Stacks elements on top of each other.

Background
Content
Foreground
Hover over this to see the stack
Dividers

Create horizontal and vertical dividers easily within your components.

vertical
horizontal
Breakout

Let an element break out of its container with negative margins.

Top
Bottom
Left
Right
Scrollable

Create scrollbars with scroll-snap enhancements for your components when appropriate

One
Two
Three
Four
Five
Six
Seven
Eight
Nine
Ten
Eleven
One
Two
Three
Four
Five
Six
Seven
Eight
Nine
Ten
Eleven
Container

Creates an element for container queries

75% of the container's width
New Stacking Context

Creates a new stacking context via an easy way

New Stacking Context 🙃
Positioning
Pos

Position your element on any side or corner.

TopLeft
Top
TopRight
Left
Center
Right
BtmLeft
Bottom
BtmRight
Edge

Put your element on any edge — even in the corners

TopLeft
Top
TopRight
Left
Right
BtmLeft
Btm
BtmRight
Fixed

Create fixed-position items on any side or corner.

TopLeft
Top
TopRight
Left
Right
BottomRight
Bottom
BottomLeft
Nudge

Move an element towards the center of its container (or away from it).

Nudge Amount
0.5rem
Top Left
Top
Top Right
Left
Right
Bottom Left
Bottom
Bottom Right
Sticky

Creates sticky elements on any side and style it when it sticks

Ignore this text and focus on the sticky item instead. The purpose of this is to increase the height of the content so we can showcase the sticky item.

Sticks to the top. Turns blue when sticking.

Ignore this text and focus on the sticky item instead. The purpose of this is to increase the height of the content so we can showcase the sticky item.

Ignore this text and focus on the sticky item instead. The purpose of this is to increase the height of the content so we can showcase the sticky item.

Ignore this text and focus on the sticky item instead. The purpose of this is to increase the height of the content so we can showcase the sticky item.

Ignore this text and focus on the sticky item instead. The purpose of this is to increase the height of the content so we can showcase the sticky item.

With these tools in your belt, you no longer need to remember the (who knows how many) CSS layout properties and value pairs.

  • No more memorizing layout patterns
  • No more losing your hard-earned “deep-work” context by diving into CSS mode
  • Probably way way lesser frustration (and perhaps some joy) when creating CSS layouts.

These classes are mostly invisible once you have gotten used to them. Just like how Mac users can’t really switch back to Windows since Mac is well designed, I haven’t been able to go back after I began using these classes.

Who Build This?

Zell

Hi, my name is Zell and I’m a developer just like you.

Splendid Layouts is born from my personal frustration with ineffective layouts and my desire to build great things quickly.

I believe that layouts can be created quickly.

  • We don’t have to work CSS code for hours just to get them right.
  • We can just write out what we want — and tada, the magic should happen.

That’s why I built Splendid Layouts. I’ve never been happier using it since.

Zell is the rare sort of developer who both knows his stuff and can explain even the most technical jargon in approachable — and even fun! — ways.

I’ve taken his courses and always look forward to his writing because I know I’ll walk away with something that makes me a better front-ender.

Geoff Graham
Geoff Graham
Chief Editor @ CSS Tricks

Your articles are honestly the best resources out there! They have really helped 100Devs folx understand topics that are always stumbling blocks for new devs.

Really appreciate the work you put into your content!

Leon Noel
Leon Noel
#100Devs Instructor

Zell is one of those rare people who commands tremendous knowledge and experience but remains humble and helpful. They want you to know what they know, not just be impressed by it.

In other words, Zell is a natural teacher. You’re lucky to have him because he feels lucky to be able to help you in your journey.

Heydon Pickering
Heydon Pickering
Web & Accessibility Extraordinaire

Getting access to Splendid Layouts

You have two ways to get access to Splendid Layouts today.

Choose Splendid Layouts if you want to work with our robust layout system today. Or get Splendid Pro to have an access pass to everything we have built for developers who value craft and DX.

Splendid Layouts

$60 only
Get everything you need to build layouts in seconds.
  • All layout classes
  • Guides for each each layout class
  • Guides on combining layout classes*
  • Discord community

Splendid Pro

$150 $100 only
33% off
Artfully crafted tools to speed up your web development workflow — includes components, layouts, styles, and utilities.
  • Everything in Splendid Layouts
  • All other Splendid libraries
    • Splendid Astro*
    • Splendid Styles*
    • Splendid Svelte*
    • Splendid Utils*

*Documentation for these are still a work-in-progress. I’m striving to finish them as soon as I can :)

Once you have decided:

  • Click the respective button
  • Make payment
  • And you’ll receive an email with your password to login and read the guides for each tool.

Here’s what you can expect as you begin to use Splendid Layouts:

  • Today: You can download and use it in your projects
  • Tomorrow: You’ll be able to build simple layouts quickly — like responsive 3-column grids, masonry, and other straightforward stuff.
  • Within this week: You might start using advanced classes like stack to create more complex layouts.
  • By the end of this month: You might never want to go back to writing CSS properties or Tailwind utility classes for the use cases covered by Splendid Layouts.

Frequently Asked Questions

Here are answers to some of the questions may ask as you wonder if Splendid Layouts would fit into your development workflow.

Layouts can be easy

We don’t have to spend hours tweaking CSS to make layouts look just the way we want them to be

It might take a few days to get used to this new style of writing layouts.

But, once you get the hang of it, you’ll begin to feel the ease. It’s like walking downhill after you’ve been jogging uphill for a while.

I’m serious.

Try it for risk-free for 60 days. If Splendid Layouts doesn’t speed up your workflow enough to justify the cost, get every cent back. No questions asked.

Splendid Layouts

$60 only
Get everything you need to build layouts in seconds.
  • All layout classes
  • Guides for each each layout class
  • Guides on combining layout classes*
  • Discord community

Splendid Pro

$150 $100 only
33% off
Artfully crafted tools to speed up your web development workflow — includes components, layouts, styles, and utilities.
  • Everything in Splendid Layouts
  • All other Splendid libraries
    • Splendid Astro*
    • Splendid Styles*
    • Splendid Svelte*
    • Splendid Utils*

Let’s make layouts fun and easy — then we all get to spend time doing the things we love.

Stay awesome,
Zell