It may seem odd for a CSS framework to be categorically against writing CSS.
If we weren't, though, what kind of CSS framework would we be?
Start with a versatile CSS codebase that lets you do 95% of what you'll do day-to-day while maintaining style standards without touching any CSS. Without setting up any workflow. That's Cavepaint.
The last 5% is important. But that's the style stuff that really sets your site apart— it deserves all of your visual design attention, not the in-the-weeds CSS stuff.
Also— and we can't stress this enough— you can do it later.
You've achieved a 300kb CSS file, with rules for every little corner of your monolithic website.
You've made it, right? Wrong. Every bit of that CSS has a chance of needing your attention at some point in the future.
Your goal in any project should be to write as little CSS as possible. CSS is never your core product!
Okay, well, sometimes it is. Please visit Cavepaint CSS.
Reeling from your 300kb maintenance monster, you decide you'll start things off on the right foot with your next project. You find the tiniest slice of starter CSS you can find. 3kb! That's less than 300kb, and therefore better, right?
Well, it's better at first. This is only half anti-pattern! If it stays small, that's great. If it bloats, then it can be bad. And it's going to bloat, because you'll need to write more CSS to navigate around all that minimalism.
The Cavepaint approach is that it's better to start at 30kb and balloon to 40 or maybe 45kb than it is to start at 3kb and balloon into a 100kb mess.
Cavepaint is going for bang-per-kb. It's a middleweight library that punches way above its class. Start at 30kb and use that CSS over and over.
Optimize on readability, performance and utility, not file size.
What we can do is only CSS. We can get out of your way so that Cavepaint works with whichever framework you're using, so long as it supports HTML/CSS.
- your favorite library - React, Angular, Vue - JAMstack - Clojurescript - Svelte
- your CSS framework - online horoscopes - augury - seeing which style your dog goes to when called
Not writing CSS is better than writing CSS.
Classes should have utility, or multiple different uses.
Classes should have composability, or work with other classes.
Reusable markup and conventions are paramount.
A stylesheet below 10kb is absurd!
A stylesheet above 100kb is absurd!
CSS is disposable.
CSS is a complexity sink.
Classes should be readable and usable by anyone who reads them.
Save the CSS workflow and Photoshop-to-HTML design for later.