Test Content

Published by


a mountain range covered in snow under a cloudy sky

My brain has a strong desire to crown a winner of technological choices so I can choose it when options come up, or at least have a strong, consistent algorithm for the choosing.

So now that CSS has a bunch of new color options, my brain is trying to do that crowning. It is helped along by others who know a lot more than I do painting a rosy picture of one format in particular: OKLCH.

.super-pink-header {
  background: rgb(255, 44.71, 87.98);
  background: oklch(65% 0.284 17);

That’s fine, I suppose, but it’s not very fun. It’s way more fun to have a UI toggle that users can use! Plus, it’s possible that even if a user has set a preference, they might want to view your site opposite of that preference. So my thinking is that you don’t use those in CSS at all, you use a class, probably right at the document level, indicating which theme is happening.

So how do you get that class on there properly? I think we should:

  1. Check if there is a cookie in place (or some other storage mechanism) that has the user’s preference already in it.
  2. In lieu of that, fall back to the user’s system preference.
  3. If there is no preference, you get to pick!

I’ve received some of the best advice from folks I’m trying to forget.

It’s usually past mediocre managers. Average folks doing the job, but in an uninspired fashion, in over their heads, or just coasting for reasons I never understood.

Every so often. They land an idea. Maybe I don’t hear it at the time because I’m actively trying not to interact with them, or perhaps I’m not ready to hear the advice because I foolishly believe that because they don’t inspire me, they can’t teach me.