A while back, I wrote a blog post entitled Mobile-Friendly Site Design Made Easy. It was meant to be tongue-in-cheek, though I was also practicing what I was preaching; I’d just ripped all of the CSS styling out of my website.
I use Jekyll to generate this website. Originally, I used Jekyll’s default styling, but I became frustrated trying to view the site on my phone. I spent a bit of time trying to tweak it to look better on mobile, but eventually got frustrated, junked the whole thing, didn’t put anything in its place, and wrote that post.
The site instantly became mobile-friendly. It was also no less usable on any other platform. The fonts left something to be desired, however. The default styling provided by most browsers is garbage. They’re perfectly functional, but they’re ugly enough to drive away everyone except curmudgeonly systems people like myself. What’s worse is there’s no reason for it. There’s enough information in semantic markup for browsers to do a good job of presentation without any “hints” from stylesheets. Instead, they display CSS-free websites the same way they did in 1991.
Up until now I thought the only reasonable options were:
- give in to the madness that is modern CSS frameworks
- Write something sensible yourself (what I’ve done recently),
- stick your fingers in your ears and pretend CSS doesn’t exist so there’s nothing you can do about the fact that your website is ugly as sin (what I used to do).
Recently I’ve discovered another alternative: Writ. It’s a drop-in stylesheet that does what browsers should be doing with CSS-free pages. It applies sensible styling to most elements, without applying any special classes, or generally requiring the html to care about its existence (I’m looking at you, bootstrap).
I was pretty excited about this, so thought I should share; I encourage people to make use of it. The author deserves to be commended for making the web a little less nuts.