The Layouts System
Build layouts in seconds — HTML that reads like layout, not a wall of classes.
Tailwind caused your HTML to stop being readable…
And you can’t just “fix it” by going back to CSS
You picked up Tailwind for various reasons.
And your first try really blew your mind away.
Something clicked — maybe you built something really quickly, or you enjoy not having to name your selectors. Whatever it is, something did click.
So you tried switching to Tailwind.
But to your horror, in the process of switching, or when you come back to refactor, you find your elements packed with an overwhelming number of utility classes.
Somewhere under your breath, you muttered “F my life. What the hell was I thinking when I decided to try to shift to Tailwind?”
You miss writing CSS — it’s a different kind of pain, but better than this, but going back to CSS feels like taking a step backwards. So you’re somewhat stuck.
You’re in a strange place where nobody understands you. Almost everyone else around seems to be black-and-white about “YES TAILWIND” or “NO TAILWIND”.
But you know better — there’s something good about Tailwind. You might not be able to say what it is, but you just know it.
In the meantime, you continue to code either the Tailwind way or the CSS way, telling yourself that’s just the best you can do for now, with your time constraints.
And your frustration builds up every time you read an HTML or a CSS file. You know something can be better. But what? And how?
The good news is: You don’t have to choose between Tailwind and CSS — there’s a better way. You just don’t use Tailwind in the way it’s commonly presented.
There’s a way to use Tailwind with CSS
And get cleaner HTML and better CSS at the same time
Tailwind is three things built into one:
It’s not something to replace CSS with.
Once you see that, your mind begins to shift — you might begin to see how Tailwind can be used together with CSS.
This is just the beginning.
As you advance deeper, you might begin to see how you’ll use Tailwind differently in each of the 4 major categories when styling websites and applications.
Tailwind excels here with their responsive variants and how it lets you change CSS on the fly without creating additional classes.
When you use these powers together with what CSS gives you, you can build almost any layout without writing more CSS.
There’s nothing better than using Tailwind’s @apply like convenient Sass includes here.
You can use them to create patterns that can be inherited by other utilities easily. It’s like creating a cascade of styles with your utilities — each one more specific than before.
Theming is a pain in the ass with Tailwind because you’ll have to add classes for hover, focus, active, selected states. This causes the HTML to become extremely bloated.
Instead of surrendering this as an inevitable Tailwind defect, we use CSS to make things simpler. I’ve taken a step further here by creating a Pigment system that makes styling interactive states super easy with CSS variables.
Effects are stuff that makes a website look nice. There are tonnes of effects — from gradients, to frosted glass, to highlighting backgrounds.
Once you get some mastery over Tailwind, you can begin to build utilities that let you perform these effects just by dropping the utility. Think of it like Sass includes here too.
You can begin to see that Tailwind works really well with CSS. Your only obstacle is the preconceived notion that it’s either Tailwind or CSS.
Let that go. Then you can begin to experiment and bring in a more advanced — faster, simpler, more effective — way of styling to your projects.
I’ve put everything I know about using Tailwind and CSS together in Unorthodox Tailwind. I’ll tell you more about this later.
Between pure Tailwind, pure CSS, and Tailwind + CSS.
Let’s just say you want to build this simple card.
Build layouts in seconds — HTML that reads like layout, not a wall of classes.
You write every single class in the HTML and it gets bloated, horribly. At some point, you know that Tailwind is no different from writing vanilla CSS from scratch each time.
<div class="flex flex-col gap-[1.125rem] p-6 border-2 border-zpurple-900 rounded-xl"> <h3 class="text-2xl font-bold leading-[1.4] font-june text-zorange-500">The Layouts System</h3> <p class="text-xl leading-[1.5] text-zpurple-100">Build layouts in seconds --- HTML that reads like layout, not a wall of classes.</p> <button class="flex items-center justify-center px-[1.25em] py-[0.5em] text-xl leading-[21px] rounded-xl bg-zorange-500 text-zpurple-1000 hover:bg-zorange-600">See how it works</button></div>The HTML is a lot cleaner. But you can’t see how your classes interact with the DOM without pulling up the markup.
So even if it works, you feel a nagging irritation that you’re missing some context if you don’t have the HTML and CSS opened side by side.
<article class="card"> <h3 class="card-title">The Layouts System</h3> <p class="card-text">Build layouts in seconds --- HTML that reads like layout, not a wall of classes.</p> <button class="card-button">See how it works</button></article>.card { display: flex; flex-direction: column; gap: 1.125rem; padding: 1.5rem; border: 2px solid var(--color-zpurple-900); border-radius: 0.75rem;}
.card-title { font-family: var(--font-june); font-size: 1.5rem; font-weight: 700; line-height: 1.4; color: var(--color-zorange-500);}
.card-text { font-size: 1.25rem; line-height: 1.5; color: var(--color-zpurple-100);}
.card-button { display: flex; align-items: center; justify-content: center; padding: 0.5em 1.25em; font-size: 1.25rem; line-height: 21px; border-radius: 0.75rem; background-color: var(--color-zorange-500); color: var(--color-zpurple-1000);}
.card-button:hover { background-color: var(--color-zorange-600);}The principles of good CSS continue to apply here — you can create components (or elements/objects/utilities; they mean similar things) and insert them into your HTML.
<article class="card vertical gap-3"> <h3 class="h4 text-zorange-500">The Layouts System</h3> <div class="prose text-zpurple-100">Build layouts in seconds --- HTML that reads like layout, not a wall of classes.</div> <button class="button pigment-orange-filled">See how it works</button></article>/* button, vertical (a flex column), and prose are written once, and reused in every project*/
@utility h4 { @apply font-june text-2xl font-bold; line-height: 1.4;}
@utility pigment-orange-filled { --bg-color: var(--color-zorange-500); --text-color: var(--color-zpurple-1000); --bg-hover-color: var(--color-zorange-600);}
@utility card { padding: 1.5rem; border: 2px solid var(--color-zpurple-900); border-radius: 0.75rem;}Now, if you cover the CSS and just look at the HTML, you still know what’s happening! Same thing backwards: If you cover the HTML, your CSS still makes sense without the markup.
Simply by using our in-house pigment utility
Now say you wanna create a few buttons with different colours. This should be basic, simple stuff.
There’s lots of code to write here — the layout classes, the base colours, and even colours for hover and focus states. Just look at the bloat!
<button class="flex items-center justify-center px-[1.25em] py-[0.5em] text-xl leading-[21px] rounded-xl border-2 border-zorange-500 text-zorange-500 hover:bg-zorange-800 hover:text-white focus:bg-zorange-800 focus:text-white">Orange Outline</button>I’ll cheat a little by showing you my actual pigment system. where I’ve written all the classes needed beforehand, so we only need to change the background, text, and border colours on each state.
<button class="button pigment-orange-outline">Orange Outline</button>/* button and pigment defined and reused in every project */
@utility pigment-orange-outline { --bg-color: transparent; --bg-hover-color: var(--color-zorange-800); --text-color: var(--color-zorange-500); --text-hover-color: #fff; --border-color: var(--color-zorange-500);}I became a lot more productive ever since I started using Tailwind + CSS.
My name is Zell.
I’ve built many websites, small personal blogs to large web projects, from scratch (with pure CSS) over the years in my career. (I didn’t use frameworks because they often come with styles I had to fight against).
There was nothing wrong with this method.
But I changed one day.
I realised I have been rebuilding the same things over and over again — the same layouts, the same buttons, the same styles. The only difference is that they vary a little each time.
That was when I began to experiment with Tailwind.
Something clicked. And I couldn’t go back to pure CSS anymore.
But I couldn’t stand writing CSS the Tailwind way (oh god, the awful bloated HTML), so I set out to find a solution.
One day, while struggling (and promising myself that I’d test Tailwind just one more time), I realized how Tailwind can be used to support CSS, and how CSS can be used to support Tailwind.
And everything I’ve said above unfolded from there — the layout, typography, theming, and effects.
Now I’ve built up a library of useful styles that I pluck-and-play. The best part is this library is built in a flexible way, so I never have to fight my own library styles.
I’d like to share with you the system I’ve discovered in Unorthodox Tailwind.
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.
Zell is a talented developer with in-depth knowledge of front-end technologies and tools. I recommend his books and articles to everyone in the web industry because they’re so well written and full of useful information.
My Entire System in Unorthodox Tailwind
A complete system for using Tailwind and CSS together.
The hard part is knowing when to use Tailwind, when to use CSS, and when to use them both.
I’ve been building sites for a long time and I’ve never been happier with the way I write HTML and CSS today.
It took major mindset shifts to get here. I’ve documented these shifts for you inside Unorthodox Tailwind to help you unlock the possibility of using Tailwind and CSS together in a synergistic way.
The mindset shifts that make everything else click.
Gets you fluent in how Tailwind works. By the end you can read the docs at a glance.
The core moves that make Tailwind and CSS work as one.
Build layouts in seconds, and have HTML read like layout instead of a wall of classes.
Use 3-5 typefaces in your design. And create responsive typography without complexity.
Handles colours, gradients, SVGs, and themes that feel clumsy in pure Tailwind.
pigment system to style hover, active, and selected states with CSS Variables Deep dive into functional utilities and creating custom variants.
interact and interact-within Create visual effects like text strokes, strikethroughs, layered shadows by dropping a single utility
The process, the CSS structure, and a cheatsheet you'll keep open.
This is for you if…
You’ve used Tailwind, you know CSS, and you’re ready to make the best use of both technologies.
…but not if:
You’re happy with pure Tailwind, or pure CSS, and you don’t wanna explore the beauty in how they work together.
9 Chapters, 69 lessons
Remove the nagging frustration that’s been building up when you read HTML or CSS files.
Write styles that you can be proud of. Apply them both to HTML and CSS. And create a system where your styles add onto each other in a beautiful, maintainable way.
Pay once. Lifetime updates. Instant access.
What people are saying
I actively avoided Tailwind until recently because I really enjoy writing CSS (don’t tell anyone) and hate the “wall of classes” look that Tailwind brings to the HTML.
It’s like this course was written specifically for me launching at the exact right time.
I really love the way you’re talking about using tailwind and moving beyond SCSS. The article on @apply made me realise that I could sprinkle Tailwind where it’s helpful whilst still authoring expressive css.
I’ve restructured my framework with @apply and postcss and have been really enjoying it.
If you don’t think Unorthodox Tailwind is changing the way you’re writing Tailwind and CSS, then let me know and I’ll refund every cent.
How much better will your HTML and CSS be 30 days later?
Will you:
Keep doing the same thing you’ve been doing:
… or try something entirely new
The choice is yours.
You already know you have a growing sense of dissatisfaction every time you open your HTML or CSS file.
The real hidden cost is ignoring that dissatisfaction — knowing you can be doing better than this, yet doing nothing about it.
30 days later, things can be very different from where they are today. You can be happy and satisfied with how your HTML and CSS look.
Get Unorthodox Tailwind