<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <atom:link href="https://andrewhoule.me/feed.xml" rel="self" type="application/rss+xml" />
    <title>Andrew Houle — Christian, Husband, Father, Web Developer</title>
    <link>https://andrewhoule.me</link>
    <description>I&#39;m Andrew Houle, a web developer/designer who nerds out on design systems &amp; clean code. I run my biz under the moniker Craft and Function.</description>
    
      <lastBuildDate>Fri, 06 Nov 2026 21:00:00 GMT</lastBuildDate>
    
    <language>en-us</language>
    
      
      <item>
        <title>Coding With AI is a Killjoy</title>
        <link>https://andrewhoule.me/musings/coding-with-ai-is-a-killjoy/</link>
        <guid>https://andrewhoule.me/musings/coding-with-ai-is-a-killjoy/</guid>
        <pubDate>Fri, 06 Nov 2026 00:00:00 GMT</pubDate>
        
          <description>Guys, I&#39;m not gonna, it&#39;s been tough for me to enjoy programming lately. I get bored and distracted way too easily. It&#39;s not like I&#39;m laser focused all the time, but I don&#39;t suffer from ADHD either.</description>
        
        <content:encoded><![CDATA[
          <p>Guys, I'm not gonna lie, it's been tough for me to enjoy programming lately. I get bored and distracted way too easily. It's not like I'm laser focused all the time, but I don't suffer from ADHD either.</p>
<p>But yeah, I just can't get into a good creative flow lately. You know, those times where you're cranking away on a project, and you look up, and a couple of hours have ticked by.</p>
<p>Well, that's been missing... And, without it, it's just kinda choppy and mundane, and frankly boring. To be fair, I've always had a few days where my cup of coding motivation didn't runneth over, but this year is definitely worse. So, I thought maybe it's my diet, or message apps pinging me all day, or <s>one too many cups of coffee</s> (that can't be a thing, right?)... And, maybe to some degree those things are an issue.</p>
<p>But what I really think it comes down to is... <strong>AI is a kill joy</strong>.</p>
<p>Think about it. We don't think nearly as much. We throw in a few prompts and let our AI coding agent of choice do the dirty work. Sure, there's a bit of engineering in there, but I'm a glorified supervisor, doing nothing but code reviews. Worse yet, I'm not even managing a person. I'm managing a bot, like some shady character from a sci-fi novel.</p>
<p>Lost are the days of satisfaction of solving problems, of finding creative solutions, of enjoying the process. I never thought I'd miss Stack Overflow so dearly.</p>
<p>Sure, it's easier, but is it better?</p>
<p>Is it more enjoyable? Is it better for us? No, of course not. But it's a bit like walking to the store instead of driving. Maybe the walk would be better exercise, and clear my head, but ain't no one got time for that.</p>
<p>I dunno guys... I think I need to walk more. I think I need to code more.</p>

        ]]></content:encoded>
      </item>
    
      
      <item>
        <title>Eleventy is Noice!!</title>
        <link>https://andrewhoule.me/musings/eleventy-is-noice/</link>
        <guid>https://andrewhoule.me/musings/eleventy-is-noice/</guid>
        <pubDate>Mon, 09 Feb 2026 00:00:00 GMT</pubDate>
        
          <description>I keep using Eleventy for more and more projects—and man, it&#39;s such a joy to work with! Nothing to get in the way. Nothing to slow me down.</description>
        
        <content:encoded><![CDATA[
          <p>I keep using <a href="https://www.11ty.dev/">Eleventy</a> for more and more projects—and man, it’s such a joy to work with! Nothing to get in the way. Nothing to slow me down. Just a simple workflow that immediately makes sense and actually makes me more productive.</p>
<p>Bonus points that I get to pick the template language that works best for me. So far that’s been Nunjucks, but I’m really keen to try <a href="https://www.11ty.dev/docs/languages/webc/">WebC</a>—which brings Web Components directly into the Eleventy workflow. Another bit of tech I already have a strong affinity for.</p>
<p>For a guy that’s worked in traditional LAMP-stack CMSs systems for the better part of 2 decades (yes, I'm that old), it's refreshing to simplify many projects. And when I need to reach for a CMS there are so many good options to choose from. I've been a huge fan of <a href="https://pagescms.org/">Pages CMS</a> for really simple projects on a budget. And for more visual projects, the live editing experience of <a href="https://cloudcannon.com/">Cloud Cannon</a> has been awesome!</p>
<p>Don't get me wrong, I still think there's room for a traditional CMS, but many projects simply don't need that overhead.</p>
<p>With that simplicity comes speed. I mean seriously. It's satisfying to serve up a static site that is blazing fast. Just look at these Lighthouse scores on this here site! I’m sure some of you brainiacs could push that 99 up to 100, but for today, that’s more than good enough 😄</p>
<img src="https://andrewhoule.me/assets/img/musings/ah-lighthouse-scores.jpg" alt="Lighthouse Scores" />

        ]]></content:encoded>
      </item>
    
      
      <item>
        <title>Things I Wish I Knew When I Started My Business</title>
        <link>https://andrewhoule.me/musings/things-i-wish-i-knew/</link>
        <guid>https://andrewhoule.me/musings/things-i-wish-i-knew/</guid>
        <pubDate>Thu, 15 Jan 2026 00:00:00 GMT</pubDate>
        
          <description>Let&#39;s hop in the DeLorean. We&#39;ll set the year to 2003. That&#39;s about when my web design journey began. I&#39;ve learned some things along the way. Here&#39;s a few.</description>
        
        <content:encoded><![CDATA[
          <img src="https://andrewhoule.me/assets/img/musings/delorean.gif" alt="DeLorean" eleventy:ignore="" />
<p>Let's hop in the DeLorean, shall we? We'll set the year to 2003. That's about when my journey in web design began. The web was a strange and wonderful place, powered by table layouts, 960 grids, and system fonts. Yet somehow, websites were more creative than those of today. I cut my teeth with a fine blend of Mountain Dew, curiosity, and Dreamweaver. I loved those early days! Even if I don't miss Dreamweaver.</p>
<p>Along the way the web grew up, and so did I (mostly). I worked 10+ years doing web development for a university and an agency. All the while, the pull to freelance full-time kept calling. In 2022, I dove into the deep end and started <a href="https://craftandfunction.com/">Craft and Function</a>. I have a feeling a lot of designers and developers have a story like mine.</p>
<p>To be fair, I'm not exactly a risk taker. I have a wife and 4 kids. I have no interest in struggling to put food on the table. So it helped that I had a nice base of clients. Thanks to freelancing nights and weekends, and contract work with an agency, the leap didn't feel all that crazy.</p>
<p>Even with that safety net, it hasn't always been smooth sailing. Before I got started I asked a good friend who ran a successful business for some advice, I'll never forget what he said...</p>
<p><em>&quot;Andy, some people are cows. They like the security of grazing fenced-in land and knowing there's always grass to eat. Other people are wolves, there are times when they eat great, and others that are lean. You have to decide if you are a wolf, or a cow.&quot;</em></p>
<p>I laughed until I cried. I had no idea how good that advice was when I first heard it. I think I like the idea of the wolf better than the practice. Kind of how I feel about camping.</p>
<p>Through the ups and downs, I've learned a lot in these last 3 years. Here are a few things I've taken note of...</p>
<h2>Being a good salesman is more important than being a good developer</h2>
<p>This one pains me to even write. I pride myself on thoughtful, quality work. In many ways, that was enough to land projects back in the day. But the landscape has changed thanks to the advent of site builders and AI.</p>
<p>To be clear, quality work is still a selling point, and getting new leads and clients via word of mouth remains undefeated as the best marketing strategy, but for new clients you have to be able to sell your expertise.</p>
<p>As someone who isn't exactly a natural born salesman that's a tough pill to swallow. But with practice and a plan, that's a soft skill even I can improve. In the end your portfolio matters, but your ability to clearly communicate your plan and your value is wildly more important.</p>
<h2>Position yourself as an expert</h2>
<p>If you found yourself relating to that last point about being a bad salesperson, then let's talk about positioning yourself as an expert. It's a nice little buffer for our poor sales skills. It's another way to foster trust.</p>
<p>When I ran my old design blog. I would write articles and tutorials on design. I would interview other designers and network that way. Those touch points opened up a tremendous amount of doors.</p>
<p>Same thing when I started to be active in the <a href="https://silverstripe.org/">Silverstripe</a> community. Which remains a great CMS, even if it didn't gain the popularity of say WordPress or Drupal. I would blog about it, write in the forums, create modules, etc... That definitely helped open up opportunities for me.</p>
<p>The point is, you can build trust and network by communicating the stuff you are good at. That makes the sales thing a whole lot easier.</p>
<h2>Diversify</h2>
<p>As a kid, I loved collecting baseball cards. To this day, I have box after box in my closet collecting dust. My brother and I were convinced we'd be millionaires by now, but turns out everyone in the 90s collected cards. And when they print a bajillion of each, then no card is special, and no card has value.</p>
<p>To that end, my favorite player was Will Clark. Don't ask why, I still don't know... But I had a whole book of Will Clark cards. I probably should have diversified a bit. If only I grabbed more Ken Griffey cards along the way.</p>
<p>It's the same sort of thing when running a design or dev business. When you have ongoing work with one big client, or consistent work with an agency, it's really easy to become complacent. <strong>Resist that urge</strong>! Keep putting in the time and energy to nurture your business and other relations. If (or should I say when) the bigger client/agency work dries up, you'll want that base to fall back on.</p>
<h2>Back to the future</h2>
<p>Oh, and there's more. But everyone's story is different. And experience is the best teacher. It's not time to dust off Dreamweaver, thankfully! It's time to look forward, using new tools, and learning from our mistakes.</p>

        ]]></content:encoded>
      </item>
    
      
      <item>
        <title>My Thoughts on AI, Not That Anyone Asked</title>
        <link>https://andrewhoule.me/musings/my-thoughts-on-ai/</link>
        <guid>https://andrewhoule.me/musings/my-thoughts-on-ai/</guid>
        <pubDate>Tue, 30 Dec 2025 00:00:00 GMT</pubDate>
        
          <description>I still remember the first day someone told me about ChatGPT. I was immediately struck by what it could do, while simultaneously nervous about the repercussions.</description>
        
        <content:encoded><![CDATA[
          <p>I still remember the first day someone told me about <a href="https://chatgpt.com/">ChatGPT</a>. Not that it was all that long ago. I was immediately struck by what it could do, while simultaneously nervous about the repercussions. It's a few years later, and not much has changed.</p>
<p>I see post after post written about AI, and they almost all exclusively fall into one of two camps. Either, AI is amazing, and it will make you so productive you can hardly stand it... Or, it's so evil that the world will end tomorrow. The irony is not lost on me that most of these articles are generated by AI.</p>
<p>Like most things in life, AI is fine. As long as it's understood as a tool and used in moderation. I mean, I'm not gonna lie, AI has saved me countless hours when debugging some syntax or figuring out where my YAML indentation has gone wrong. Do I use it to help me with some grammar? Sure. Has, it made me happy to not ask a question on Stack Overflow and risk being virtually tarred and feathered? You better believe it!</p>
<p>That said, it's not without its danger and warts.</p>
<h2>What could possibly go wrong?</h2>
<p>Vibe code a whole web app... That'll be fun to maintain and fix down the road. And I'm confident there will be no security vulnerabilities. <em>Hopefully my sarcasm is screaming through.</em></p>
<p>I've got a couple of friends who are high school teachers. They've been at it for a couple of decades now. They assure me the brain rot is real. Half their students are turning in assignments that are 100% AI generated. We now have an entire generation that reaches for AI, long before they ever think of thinking. I mean, I can only imagine the kind of temptation that would have been for me in my high school years.</p>
<h2>Where do we go from here?</h2>
<p>AI is certainly not going anywhere any time soon. It's ruffled the feathers of almost every industry. And most people in leadership mistakenly view it as a silver bullet to fix all of a company's bottom-line woes. That leaves real lives in its wake.</p>
<p>That means we have to adjust and learn how to leverage, but not abuse AI.</p>
<p>I definitely don't know the future. No one does. But I'm confident in the beauty of imperfection. My favorite pair of jeans is the one that's worn in. I like when a home looks lived in. I prefer rough edges. I often long for the &quot;old days&quot; when websites all looked very different and had lots of personality. Long before Tailwind made everything uniform. Like an old, familar pair of jeans... But I'm just an old developer yelling at the clouds.</p>
<p>🥂 Even so, cheers to humanity. Let's keep things human in 2026.</p>

        ]]></content:encoded>
      </item>
    
      
      <item>
        <title>How to Build a Theme Switcher</title>
        <link>https://andrewhoule.me/musings/how-to-build-a-theme-switcher/</link>
        <guid>https://andrewhoule.me/musings/how-to-build-a-theme-switcher/</guid>
        <pubDate>Fri, 12 Dec 2025 00:00:00 GMT</pubDate>
        
          <description>The other day I added a theme switcher to this, here website. Turns out, it&#39;s fun and pretty simple to do. Let&#39;s build one together!</description>
        
        <content:encoded><![CDATA[
          <p>The other day I added a theme switcher to this, here website (up there, in the header ⤴). Turns out it's fun and pretty simple to do. Let's build one together.</p>
<h2>Here's a Peek at What We're Building</h2>
<p class="codepen" data-height="100%" data-default-tab="result" data-slug-hash="XJdGXMa" data-pen-title="Theme Switcher - Light/Dark Mode" data-user="andrewhoule" style="height: auto; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;">
  <span>See the Pen <a href="https://codepen.io/andrewhoule/pen/ZYWVPNe">
    Theme Switcher - Light/Dark Mode</a> by Andrew Houle (<a href="https://codepen.io/andrewhoule">@andrewhoule</a>) on <a href="https://codepen.io/">CodePen</a>.
  </span>
</p>
<script async="" src="https://public.codepenassets.com/embed/index.js"></script>
<p>Other than looking pretty cool, and being fun to create, a light/dark mode toggle is an accessibility win, especially for visually impaired users.</p>
<p>Before we dive into the code, I want to add the caveat that there are <a href="https://webdevtales.com/futuristic-light-or-dark-mode-in-5-minutes/">many</a>, <a href="https://webdesign.tutsplus.com/light-dark-mode-toggle-switch-with-css-javascript--cms-109068t">many</a>, <a href="https://dev.to/web_dev-usman/building-a-smooth-darklight-mode-switch-with-modern-css-features-3jlc">many</a> ways to do this. This is my humble approach.</p>
<h2>Starting With HTML</h2>
<p>When I was first getting into frontend development—about 100 years ago—I read a book called <a href="https://stuffandnonsense.co.uk/transcending-css-revisited/index.html">Transcending CSS</a>, by Andy Clarke. It was a great read! One of my biggest takeaways was to always start with semantic markup. It helps with accessibility, and it helps you strip everything down, so you can think clearly. Think of it like a clutter-free desk.</p>
<p>With that ideology in mind, here's the basic structure...</p>
<pre class="language-html"><code class="language-html"> <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>button</span>
  <span class="token attr-name">aria-label</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>Switch to light theme<span class="token punctuation">"</span></span>
  <span class="token attr-name">aria-pressed</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>false<span class="token punctuation">"</span></span>
  <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>theme-switcher<span class="token punctuation">"</span></span>
  <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>button<span class="token punctuation">"</span></span>
<span class="token punctuation">></span></span>
  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>span</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>theme-switcher__icon theme-switcher__icon--sun<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>span</span><span class="token punctuation">></span></span>
  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>span</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>theme-switcher__icon theme-switcher__icon--moon<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>span</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>button</span><span class="token punctuation">></span></span></code></pre>
<p>Nothing, too extravegant here, just a <code>button</code> with some <code>aria</code> attributes and a couple of <code>spans</code> for the icons. We are defaulting to dark mode, but we'll use javascript to update to the user preference.</p>
<h2>Time to Style Things With CSS</h2>
<p>First, let's define our colors and theme switcher vars. We are going to default to dark mode, but again, we'll let the user defaults decide things (via JS).</p>
<pre class="language-css"><code class="language-css"><span class="token selector">:root</span> <span class="token punctuation">{</span>
  <span class="token property">--color--fog</span><span class="token punctuation">:</span> #ccc<span class="token punctuation">;</span>
  <span class="token property">--color--graphite</span><span class="token punctuation">:</span> #333<span class="token punctuation">;</span>
  <span class="token property">--color--mist</span><span class="token punctuation">:</span> #eee<span class="token punctuation">;</span>
  <span class="token property">--color--slate</span><span class="token punctuation">:</span> #111<span class="token punctuation">;</span>
  <span class="token property">--color--yellow</span><span class="token punctuation">:</span> #e1ac27<span class="token punctuation">;</span>
  <span class="token property">--body__background-color</span><span class="token punctuation">:</span> <span class="token function">var</span><span class="token punctuation">(</span>--color--slate<span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token property">--body__color</span><span class="token punctuation">:</span> <span class="token function">var</span><span class="token punctuation">(</span>--color--mist<span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token property">--theme-switcher__height</span><span class="token punctuation">:</span> 42px<span class="token punctuation">;</span>
  <span class="token property">--theme-switcher__gap</span><span class="token punctuation">:</span> 6px<span class="token punctuation">;</span>
  <span class="token property">--theme-switcher__background-color</span><span class="token punctuation">:</span> <span class="token function">var</span><span class="token punctuation">(</span>--color--graphite<span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token property">--theme-switcher-switch__left</span><span class="token punctuation">:</span> <span class="token function">calc</span><span class="token punctuation">(</span><span class="token function">var</span><span class="token punctuation">(</span>--theme-switcher__gap<span class="token punctuation">)</span> / 2<span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token property">--theme-switcher-switch__transition</span><span class="token punctuation">:</span> inherit<span class="token punctuation">;</span>
<span class="token punctuation">}</span></code></pre>
<p>I know, I know, my custom property names are weird. Let's talk about that. I've been calling this approach BPM. Think of it like <a href="https://getbem.com/naming">BEM</a>, only instead of <code>block__element__modifier</code>, it's <code>block__property--modifier</code>. What it lacks in brevity, it makes up for with clarity and memorability. I love a good naming convention!</p>
<p>For the vars themselves... Just some colors, and the theme switcher settings.</p>
<p>Now we need to add some default styles to the <code>body</code>, and some updates when the theme is switched. e.g. change the colors, and transition the switch.</p>
<pre class="language-css"><code class="language-css"><span class="token selector">body</span> <span class="token punctuation">{</span>
  <span class="token property">background-color</span><span class="token punctuation">:</span> <span class="token function">var</span><span class="token punctuation">(</span>--body__background-color<span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token property">color</span><span class="token punctuation">:</span> <span class="token function">var</span><span class="token punctuation">(</span>--body__color<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token selector">html[data-theme="light"]</span> <span class="token punctuation">{</span>
  <span class="token property">--body__background-color</span><span class="token punctuation">:</span> <span class="token function">var</span><span class="token punctuation">(</span>--color--mist<span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token property">--body__color</span><span class="token punctuation">:</span> <span class="token function">var</span><span class="token punctuation">(</span>--color--slate<span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token property">--theme-switcher__background-color</span><span class="token punctuation">:</span> <span class="token function">var</span><span class="token punctuation">(</span>--color--fog<span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token property">--theme-switcher-switch__left</span><span class="token punctuation">:</span> <span class="token function">calc</span><span class="token punctuation">(</span>100% - <span class="token function">var</span><span class="token punctuation">(</span>--theme-switcher__height<span class="token punctuation">)</span> + <span class="token function">var</span><span class="token punctuation">(</span>--theme-switcher__gap<span class="token punctuation">)</span> / 2<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span></code></pre>
<p>Next up, let's style the switcher background and switch itself...</p>
<pre class="language-css"><code class="language-css"><span class="token selector">.theme-switcher</span> <span class="token punctuation">{</span>
  <span class="token property">background-color</span><span class="token punctuation">:</span> <span class="token function">var</span><span class="token punctuation">(</span>--theme-switcher__background-color<span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token property">border-radius</span><span class="token punctuation">:</span> <span class="token function">calc</span><span class="token punctuation">(</span><span class="token function">var</span><span class="token punctuation">(</span>--theme-switcher__height<span class="token punctuation">)</span> / 2<span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token property">border</span><span class="token punctuation">:</span> 1px solid transparent<span class="token punctuation">;</span>
  <span class="token property">cursor</span><span class="token punctuation">:</span> pointer<span class="token punctuation">;</span>
  <span class="token property">height</span><span class="token punctuation">:</span> <span class="token function">var</span><span class="token punctuation">(</span>--theme-switcher__height<span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token property">position</span><span class="token punctuation">:</span> relative<span class="token punctuation">;</span>
  <span class="token property">transition</span><span class="token punctuation">:</span> border-color 0.2s<span class="token punctuation">;</span>
  <span class="token property">width</span><span class="token punctuation">:</span> <span class="token function">calc</span><span class="token punctuation">(</span><span class="token function">var</span><span class="token punctuation">(</span>--theme-switcher__height<span class="token punctuation">)</span> * 2 + <span class="token function">var</span><span class="token punctuation">(</span>--theme-switcher__gap<span class="token punctuation">)</span> * 2<span class="token punctuation">)</span><span class="token punctuation">;</span>

  <span class="token comment">/* Switch */</span>
  <span class="token selector">&amp;::after</span> <span class="token punctuation">{</span>
    <span class="token property">background-color</span><span class="token punctuation">:</span> <span class="token function">var</span><span class="token punctuation">(</span>--color--slate<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token property">border-radius</span><span class="token punctuation">:</span> 50%<span class="token punctuation">;</span>
    <span class="token property">content</span><span class="token punctuation">:</span> <span class="token string">''</span><span class="token punctuation">;</span>
    <span class="token property">display</span><span class="token punctuation">:</span> block<span class="token punctuation">;</span>
    <span class="token property">height</span><span class="token punctuation">:</span> <span class="token function">calc</span><span class="token punctuation">(</span><span class="token function">var</span><span class="token punctuation">(</span>--theme-switcher__height<span class="token punctuation">)</span> - <span class="token function">var</span><span class="token punctuation">(</span>--theme-switcher__gap<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token property">left</span><span class="token punctuation">:</span> <span class="token function">var</span><span class="token punctuation">(</span>--theme-switcher-switch__left<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token property">position</span><span class="token punctuation">:</span> absolute<span class="token punctuation">;</span>
    <span class="token property">top</span><span class="token punctuation">:</span> 50%<span class="token punctuation">;</span>
    <span class="token property">transform</span><span class="token punctuation">:</span> <span class="token function">translateY</span><span class="token punctuation">(</span>-50%<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token property">transition</span><span class="token punctuation">:</span> left 0.2s<span class="token punctuation">;</span>
    <span class="token property">width</span><span class="token punctuation">:</span> <span class="token function">calc</span><span class="token punctuation">(</span><span class="token function">var</span><span class="token punctuation">(</span>--theme-switcher__height<span class="token punctuation">)</span> - <span class="token function">var</span><span class="token punctuation">(</span>--theme-switcher__gap<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token punctuation">}</span>

  <span class="token selector">&amp;:hover,
  &amp;:focus-visible</span> <span class="token punctuation">{</span>
    <span class="token property">border-color</span><span class="token punctuation">:</span> <span class="token function">var</span><span class="token punctuation">(</span>--color--yellow<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token property">outline</span><span class="token punctuation">:</span> none<span class="token punctuation">;</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span></code></pre>
<p>And now for the icons...</p>
<pre class="language-css"><code class="language-css"><span class="token selector">.theme-switcher__icon</span> <span class="token punctuation">{</span>
  <span class="token property">aspect-ratio</span><span class="token punctuation">:</span> 1 / 1<span class="token punctuation">;</span>
  <span class="token property">background-color</span><span class="token punctuation">:</span> <span class="token function">var</span><span class="token punctuation">(</span>--body__color<span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token property">display</span><span class="token punctuation">:</span> block<span class="token punctuation">;</span>
  <span class="token property">height</span><span class="token punctuation">:</span> 60%<span class="token punctuation">;</span>
  <span class="token property">mask-position</span><span class="token punctuation">:</span> center<span class="token punctuation">;</span>
  <span class="token property">mask-repeat</span><span class="token punctuation">:</span> no-repeat<span class="token punctuation">;</span>
  <span class="token property">mask-size</span><span class="token punctuation">:</span> contain<span class="token punctuation">;</span>
  <span class="token property">position</span><span class="token punctuation">:</span> absolute<span class="token punctuation">;</span>
  <span class="token property">top</span><span class="token punctuation">:</span> 50%<span class="token punctuation">;</span>
  <span class="token property">transform</span><span class="token punctuation">:</span> <span class="token function">translateY</span><span class="token punctuation">(</span>-50%<span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token property">transition</span><span class="token punctuation">:</span> left 0.2s<span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token selector">.theme-switcher__icon--sun</span> <span class="token punctuation">{</span>
  <span class="token property">left</span><span class="token punctuation">:</span> <span class="token function">calc</span><span class="token punctuation">(</span><span class="token function">var</span><span class="token punctuation">(</span>--theme-switcher__height<span class="token punctuation">)</span> / 4 + <span class="token function">var</span><span class="token punctuation">(</span>--theme-switcher__gap<span class="token punctuation">)</span> / 2<span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token property">mask-image</span><span class="token punctuation">:</span> <span class="token url"><span class="token function">url</span><span class="token punctuation">(</span><span class="token string url">'https://res.cloudinary.com/dwfh3s7bs/image/upload/v1765314554/sun_rweodg.svg'</span><span class="token punctuation">)</span></span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token selector">.theme-switcher__icon--moon</span> <span class="token punctuation">{</span>
  <span class="token property">right</span><span class="token punctuation">:</span> <span class="token function">calc</span><span class="token punctuation">(</span><span class="token function">var</span><span class="token punctuation">(</span>--theme-switcher__height<span class="token punctuation">)</span> / 4 + <span class="token function">var</span><span class="token punctuation">(</span>--theme-switcher__gap<span class="token punctuation">)</span> / 2<span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token property">mask-image</span><span class="token punctuation">:</span> <span class="token url"><span class="token function">url</span><span class="token punctuation">(</span><span class="token string url">'https://res.cloudinary.com/dwfh3s7bs/image/upload/v1765314358/moon_k3gcai.svg'</span><span class="token punctuation">)</span></span><span class="token punctuation">;</span>
<span class="token punctuation">}</span></code></pre>
<p>There are lots of ways to handle svg icons, but using a mask for single color icons is simplicity I can get behind. Otherwise, this is just nudging the icons into place.</p>
<p>With the markup and style set, let's add the behavior...</p>
<h2>Onward to the Javascript</h2>
<p>First, let's get the elements we need, and if there's no <code>button</code> we bail.</p>
<pre class="language-js"><code class="language-js"><span class="token keyword">const</span> btn <span class="token operator">=</span> document<span class="token punctuation">.</span><span class="token function">querySelector</span><span class="token punctuation">(</span><span class="token string">'.theme-switcher'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">const</span> root <span class="token operator">=</span> document<span class="token punctuation">.</span>documentElement<span class="token punctuation">;</span>
<span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token operator">!</span>btn<span class="token punctuation">)</span> <span class="token keyword">return</span><span class="token punctuation">;</span></code></pre>
<p>We'll use local storage so we can remember the user's preference as they go through the site. For now, let's get the system preference and set the <code>intialTheme</code> to that.</p>
<pre class="language-js"><code class="language-js"><span class="token keyword">const</span> storageKey <span class="token operator">=</span> <span class="token string">'theme'</span><span class="token punctuation">;</span>
<span class="token keyword">const</span> savedTheme <span class="token operator">=</span> localStorage<span class="token punctuation">.</span><span class="token function">getItem</span><span class="token punctuation">(</span>storageKey<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">const</span> systemTheme <span class="token operator">=</span> window<span class="token punctuation">.</span><span class="token function">matchMedia</span><span class="token punctuation">(</span><span class="token string">'(prefers-color-scheme: dark)'</span><span class="token punctuation">)</span><span class="token punctuation">.</span>matches
  <span class="token operator">?</span> <span class="token string">'dark'</span>
  <span class="token operator">:</span> <span class="token string">'light'</span><span class="token punctuation">;</span>
<span class="token keyword">const</span> initialTheme <span class="token operator">=</span> savedTheme <span class="token operator">||</span> systemTheme<span class="token punctuation">;</span></code></pre>
<p>Next we'll set up a couple of functions to handle dark or light mode...</p>
<pre class="language-js"><code class="language-js"> <span class="token keyword">function</span> <span class="token function">setDarkMode</span><span class="token punctuation">(</span><span class="token parameter">hasLocalStorage <span class="token operator">=</span> <span class="token boolean">true</span></span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
  btn<span class="token punctuation">.</span><span class="token function">setAttribute</span><span class="token punctuation">(</span><span class="token string">'aria-label'</span><span class="token punctuation">,</span> <span class="token string">'Switch to light theme'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  root<span class="token punctuation">.</span><span class="token function">setAttribute</span><span class="token punctuation">(</span><span class="token string">'data-theme'</span><span class="token punctuation">,</span> <span class="token string">'dark'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token keyword">if</span> <span class="token punctuation">(</span>hasLocalStorage<span class="token punctuation">)</span> localStorage<span class="token punctuation">.</span><span class="token function">setItem</span><span class="token punctuation">(</span>storageKey<span class="token punctuation">,</span> <span class="token string">'dark'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token keyword">function</span> <span class="token function">setLightMode</span><span class="token punctuation">(</span><span class="token parameter">hasLocalStorage <span class="token operator">=</span> <span class="token boolean">true</span></span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
  btn<span class="token punctuation">.</span><span class="token function">setAttribute</span><span class="token punctuation">(</span><span class="token string">'aria-label'</span><span class="token punctuation">,</span> <span class="token string">'Switch to dark theme'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  root<span class="token punctuation">.</span><span class="token function">setAttribute</span><span class="token punctuation">(</span><span class="token string">'data-theme'</span><span class="token punctuation">,</span> <span class="token string">'light'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token keyword">if</span> <span class="token punctuation">(</span>hasLocalStorage<span class="token punctuation">)</span> localStorage<span class="token punctuation">.</span><span class="token function">setItem</span><span class="token punctuation">(</span>storageKey<span class="token punctuation">,</span> <span class="token string">'light'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span></code></pre>
<p>In these, we update the <code>aria-label</code>, data attibute, and local storage.</p>
<p>Next up, we'll create a function to handle the click event, that will set the theme accordingly.</p>
<pre class="language-js"><code class="language-js"><span class="token keyword">function</span> <span class="token function">onClick</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
  btn<span class="token punctuation">.</span><span class="token function">setAttribute</span><span class="token punctuation">(</span><span class="token string">'aria-pressed'</span><span class="token punctuation">,</span> btn<span class="token punctuation">.</span><span class="token function">getAttribute</span><span class="token punctuation">(</span><span class="token string">'aria-pressed'</span><span class="token punctuation">)</span> <span class="token operator">!==</span> <span class="token string">'true'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token punctuation">(</span>root<span class="token punctuation">.</span><span class="token function">getAttribute</span><span class="token punctuation">(</span><span class="token string">'data-theme'</span><span class="token punctuation">)</span> <span class="token operator">===</span> <span class="token string">'dark'</span><span class="token punctuation">)</span>
    <span class="token operator">?</span> <span class="token function">setLightMode</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
    <span class="token operator">:</span> <span class="token function">setDarkMode</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span></code></pre>
<p>Then, we'll set the initial theme on load, and add the event listener for the click event.</p>
<pre class="language-js"><code class="language-js"><span class="token punctuation">(</span>initialTheme <span class="token operator">===</span> <span class="token string">'dark'</span><span class="token punctuation">)</span>
  <span class="token operator">?</span> <span class="token function">setDarkMode</span><span class="token punctuation">(</span><span class="token boolean">false</span><span class="token punctuation">)</span>
  <span class="token operator">:</span> <span class="token function">setLightMode</span><span class="token punctuation">(</span><span class="token boolean">false</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

btn<span class="token punctuation">.</span><span class="token function">addEventListener</span><span class="token punctuation">(</span><span class="token string">'click'</span><span class="token punctuation">,</span> onClick<span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
<p>Lastly, I didn't want FOUC (Flash Of Unstyled Content) when the page loads, and the user's settings dictate light mode. So this little bit just adds the transition property after eveything is painted to the screen.</p>
<pre class="language-js"><code class="language-js"><span class="token function">requestAnimationFrame</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">{</span>
  root<span class="token punctuation">.</span>style<span class="token punctuation">.</span><span class="token function">setProperty</span><span class="token punctuation">(</span><span class="token string">'--theme-switcher-switch__transition'</span><span class="token punctuation">,</span> <span class="token string">"left var(--transition-dur)"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
<h2>Putting a Bow on It</h2>
<p>That's it. An easy accesibility win. I must admit, this is a whole lot easier on a simple blog site. Adding this to a large marketing site requires a ton of design work and upfront planning. Totally doable, just much harder.</p>

        ]]></content:encoded>
      </item>
    
      
      <item>
        <title>It&#39;s Time to Write Again</title>
        <link>https://andrewhoule.me/musings/it&#39;s-time-to-write-again/</link>
        <guid>https://andrewhoule.me/musings/it&#39;s-time-to-write-again/</guid>
        <pubDate>Wed, 03 Dec 2025 00:00:00 GMT</pubDate>
        
          <description>I want to start writing again... For real, this time. It&#39;s been a moment, as in, like 10+ years, since I blogged with any consistency. But I&#39;ve been thinking about if forever, and I just need to start doing it.</description>
        
        <content:encoded><![CDATA[
          <p>I want to start writing again—for real, this time. It's been a moment, as in like 10+ years, since I blogged with any consistency. But I've been thinking about it forever, and I just need to start doing it.</p>
<p>Maybe you're like me, and you get locked up, thinking you need the perfect words, but <strong>creativity flows from doing</strong>. And much like design, often times you just need to get started to find your creative flow.</p>
<h2>Back In The Day</h2>
<p>I mentioned I used to blog, about that... Back in the day, I had a blog called MyInkBlog. Stupid name, I know... But when I started the site, design blogs were gaining traction and the web was a much different place. Personal blogs were popular, and I loved following a bunch of them via RSS. Which frankly, is still an amazing medium to control the flow of info you want to take in, but that's a different topic for another post. p.s. here's <a href="https://andrewhoule.me/feed.xml">my feed</a> if that's your jam.</p>
<p>When I first started that blog, I had no idea it would gain traction and a following. I just wanted to write like some of my favorite bloggers, and experiment with design and Wordpress. I went from thinking I would write for 20 people, most of which were my family to a thriving community with 10s of thousands of followers on Twitter. When I sold the blog for a family SUV, my head just about exploded 🤯 thinking about the blessing that blog was and how much it had grown.</p>
<p>Sadly, the blog changed hands a few times after that, and disappeared from the internet a few years later. I knew that was a possibility, but it was still a tough pill to swallow.</p>
<h2>Onward</h2>
<p>That said, the blog was a life lesson on consistency and the power of organic SEO. Not that I knew that was what I was doing, but writing tutorials and content on topics web designers cared about, and being authentic in my interactions were a recipe that worked. And I think to some degree, that still works today.</p>
<p>Anyhoo, I want to write again. So here's to the first of many...</p>

        ]]></content:encoded>
      </item>
    
  </channel>
</rss>