<?xml version="1.0" encoding="UTF-8"?><rss 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" version="2.0"><channel><title><![CDATA[Jules Forrest's RSS Feed]]></title><description><![CDATA[Product design, design systems and web development.]]></description><link>https://julesforrest.com</link><generator>GatsbyJS</generator><lastBuildDate>Thu, 28 Nov 2024 20:37:44 GMT</lastBuildDate><item><title><![CDATA[The Checker]]></title><description><![CDATA[I have given myself a new title. I am “The Checker.” I check if she answers the phone. No pickup? I check to see if an iMessage will go…]]></description><link>https://julesforrest.com/notes/2020/the-checker/</link><guid isPermaLink="false">https://julesforrest.com/notes/2020/the-checker/</guid><pubDate>Mon, 30 Nov 2020 20:00:00 GMT</pubDate><content:encoded>&lt;p&gt;I have given myself a new title. I am “The Checker.”&lt;/p&gt;
&lt;p&gt;I check if she answers the phone.&lt;/p&gt;
&lt;p&gt;No pickup? I check to see if an iMessage will go through.&lt;/p&gt;
&lt;p&gt;No response? Not delivered? Maybe she’s on her computer.&lt;/p&gt;
&lt;p&gt;I check FaceTime. Will she answer there?&lt;/p&gt;
&lt;p&gt;I check her location on Find My Friends.&lt;/p&gt;
&lt;p&gt;“No location found.”&lt;/p&gt;
&lt;p&gt;I check the last time anyone else in the family has heard from her. Check. Check check. Check check check check check.&lt;/p&gt;
&lt;p&gt;Deep breaths. Time to check in person. Checking in person is the last resort. (It never goes over well.)&lt;/p&gt;
&lt;p&gt;Plus, it’s usually nothing. (Except for that one time when it was really, really something.)&lt;/p&gt;
&lt;p&gt;***&lt;/p&gt;
&lt;p&gt;When I lived in California, we used to have to call the police for this. Can you imagine how terrifying it would be to wake up with a police officer in your bedroom? You don’t know that they’re a police officer. You don’t know if they’re a “good” police officer. You don’t know why they’re there.&lt;/p&gt;
&lt;p&gt;But we can’t not. What if the worst happened, and we didn’t call them? What if we waited too long to call, and it was too late? I can’t shut the images out of my brain.&lt;/p&gt;
&lt;p&gt;***&lt;/p&gt;
&lt;p&gt;Now that I’m here, I do the checking.&lt;/p&gt;
&lt;p&gt;It’s cold and it’s rainy and it’s windy and I regret choosing an apartment 19 blocks away from her.&lt;/p&gt;
&lt;p&gt;Two cabs come crashing up to the curb. Which one am I supposed to get in? Which one will close the distance as quickly as possible?&lt;/p&gt;
&lt;p&gt;Halfway there, my phone lights up.&lt;/p&gt;
&lt;p&gt;“I’m fine.”&lt;/p&gt;
&lt;p&gt;I sit back, relieved. My shift as The Checker is over.&lt;/p&gt;
&lt;p&gt;But it’s short-lived. In a few hours, the cycle starts all over again.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Automating newsletters with Google Apps Script]]></title><description><![CDATA[In the month since my last post on Setting up a Gmail recruiter response template, I’ve been exploring other ways to automate tedious tasks…]]></description><link>https://julesforrest.com/notes/2020/automating-newsletters-with-google-apps-script/</link><guid isPermaLink="false">https://julesforrest.com/notes/2020/automating-newsletters-with-google-apps-script/</guid><pubDate>Sat, 18 Jul 2020 19:34:02 GMT</pubDate><content:encoded>&lt;p&gt;In the month since my last post on &lt;a href=&quot;/notes/2020/template-responses-in-gmail&quot;&gt;Setting up a Gmail recruiter response template&lt;/a&gt;, I’ve been exploring other ways to automate tedious tasks in G Suite. At first, I just wanted to create a basic timestamp in Google Sheets. When I couldn’t find a built-in formula, I Googled around and learned I could create one easily by &lt;a href=&quot;https://productivityspot.com/google-sheets-timestamp/&quot;&gt;writing a Google Apps Script&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Around the same time, I also started having conversations with folks to learn about design ops. Over the course of those conversations, one phrase really stuck with me: “process over people.”&lt;/p&gt;
&lt;p&gt;In the abstract, it might sound just like another piece of robotic tech jargon. But in practice, I think it encourages healthy team dynamics:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Teams are never fixed&lt;/li&gt;
&lt;li&gt;In any given week, someone might be out sick, on vacation or on leave&lt;/li&gt;
&lt;li&gt;Less frequently, someone might transfer to a new team, get laid off or leave the company&lt;/li&gt;
&lt;li&gt;If someone is absent, the rest of the teammates should be able run the team normally&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If a team comes grinding to a halt when someone is out or leaves, the unhealthy dynamics quickly become apparent:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;People are discouraged from taking time off and burn out&lt;/li&gt;
&lt;li&gt;Information gets used as currency&lt;/li&gt;
&lt;li&gt;Growth opportunities aren’t evenly distributed&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To me, “process over people” means “prioritize the knowledge of a group of people over the knowledge of a single person.” I think I like this idea so much because it refutes my least favorite design systems trope: the design systems hero. But it also aligns well with my team’s longterm goal, which is to turn the Karma Product Language into a self-service function.&lt;/p&gt;
&lt;p&gt;To be honest, we’re still a far cry from running a self-service design system. But we’ve taken the first step by starting to document and automate our processes.&lt;/p&gt;
&lt;h2 id=&quot;opportunity-for-automation&quot;&gt;Opportunity for automation&lt;/h2&gt;
&lt;p&gt;When I first dug into the Google Apps Script docs, I compiled a list of tasks that took up too much of my time. Writing and sending out our design systems newsletter was at the top of the list. I had experimented with Mailchimp and other newsletter services in the past, but creating a highly produced newsletter ended up being really time-consuming.&lt;/p&gt;
&lt;p&gt;I also realized a formal newsletter service wouldn’t be collaborative enough. Since there are now 4 designers and 10 engineers working on design systems, collating and publishing the newsletter is more complex than it was before. On one hand, this is a good thing, because it means system knowledge is shared across our group. But it’s also tough, because there’s not yet a clear process in place for drafting the newsletter as a team.&lt;/p&gt;
&lt;p&gt;To make it clearer, I needed to define:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Where does the newsletter get written?&lt;/li&gt;
&lt;li&gt;How often does it get sent out?&lt;/li&gt;
&lt;li&gt;Who does it get sent out to?&lt;/li&gt;
&lt;li&gt;What information should be included?&lt;/li&gt;
&lt;li&gt;How do people contribute to it?&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;getting-ready&quot;&gt;Getting ready&lt;/h2&gt;
&lt;p&gt;Tool-wise, Google Docs was an easy replacement for Mailchimp, since everyone at the company already has the right license and permissions. As someone new to Google Apps Script, I also thought it would be easier to stay within the G Suite family. I cleaned up the Newsletter folder of our KPL team drive and created a fresh template file.&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;gatsby-resp-image-figure&quot; style=&quot;&quot;&gt;
    &lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1000px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 49.199999999999996%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAACXBIWXMAABYlAAAWJQFJUiTwAAABJElEQVQoz5WS626DMAyFef833P53Ukvu9wDxmRzIYFWraZaOkqD4s33C9Pn1ATnf4EMEBxH11XqPWaquhxAwziOkDB/Tb4WIEBOFfU/TTRhYn7CuS4cNxZRgnYOxFt4HRIaFeADONeUM5z0575FLoWkrETFmLMsJ5ODLSmtIqZBSQq0VSikYY7p4r7VBKQXzPNP9/uA7NMXMlUMHjGBoShnbtv2cR6HnOL7TsafJWovAwCcPlZKQQvQOrsntYstQa0SttR0opGQPwOBrsnIL7sJBKdFH1Fr3sbkeJ7cDfojGOvGopdQOKz1hr7puwLK27m1l1dotoBcd0h57h2Nca103//TrtWdvYlymKcb9+fk3uXr4ppO/O+RReFx+1Veg/3TIwG/x5g/jqjMbHAAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Setting up the folder in Drive&quot;
        title=&quot;Setting up the folder in Drive&quot;
        src=&quot;/static/1fafffd6a180c8d0d6c652973b1d568e/00d43/folder.png&quot;
        srcset=&quot;/static/1fafffd6a180c8d0d6c652973b1d568e/63868/folder.png 250w,
/static/1fafffd6a180c8d0d6c652973b1d568e/0b533/folder.png 500w,
/static/1fafffd6a180c8d0d6c652973b1d568e/00d43/folder.png 1000w,
/static/1fafffd6a180c8d0d6c652973b1d568e/aa440/folder.png 1500w,
/static/1fafffd6a180c8d0d6c652973b1d568e/eee07/folder.png 1628w&quot;
        sizes=&quot;(max-width: 1000px) 100vw, 1000px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
    &lt;/span&gt;
    &lt;figcaption class=&quot;gatsby-resp-image-figcaption&quot;&gt;Setting up the folder in Drive&lt;/figcaption&gt;
  &lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Next, I wrote a quick template draft.&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;gatsby-resp-image-figure&quot; style=&quot;&quot;&gt;
    &lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1000px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 68.80000000000001%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAOCAYAAAAvxDzwAAAACXBIWXMAABYlAAAWJQFJUiTwAAACJ0lEQVQ4y41Ta2vjMBD0//9lhTb90BDyaPOw4zi2Ez/0li3Jc6yS9FpouVsYjEAeze7MJoujQ54XeH/fYLfb4XA4gDGGtm1hrcUwDPFLcM7hX5X0ckDPOKRS0NrEL6OzVFBKRyIpJVom0fYcWmt0XYuml2DSxDP9Z+0ApTUSISSEVOB3MCEjmbYjBhcwTRNCCHA+YBwdxnG8qR5GDKOLqgnD4KC1RdJ2PXrWx0ujo0sjfAg3/dMUCe8H/E8lRdVivsnxkVYorhItN/DeR6I0TbHZrL/Nbro/8hsSLjXOdYfq2se5cHkjpOr7Hl3XwRgT50jt/laPThIyIM0ynMsS16aBVBre31rebrd4fX3FYrHA09NTTIFSCpxzSCEgBIdSEtMUPkmTa9PiY7tHxzhG52HsCOf858vn8xnH4xFlWSLLMhwOe+z2e2zed1iutzhkJ3Bp4cMU55wwLlBfGmhjYewQ4e4tCyEiISHPc9R1jaqqUJYV6tbgyj1aEdCIADveW36QUAwID0KSv16v8fz8jPl8jpeXF7y9vWE2m0WU5wLGKEjJITiDteYv4YPoKyEVbcvlckHTNFEthdwYCzsMCNMUR0MJoHw+jEzsQ+EPhNTearXCcrmMEaKV5JxBawklObSS3/IZTflR4RdTaHa032QIufyR1sgqibQU6JiGNAFCe4QwfVFI8/uBkHJH0TmdTtGYoihwzE84FSW2tAh1D648mPJ3l4E/dUU1eVoaPYcAAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Writing a template draft&quot;
        title=&quot;Writing a template draft&quot;
        src=&quot;/static/4277adf73995bb9111f4a6eb9de06ea8/00d43/template.png&quot;
        srcset=&quot;/static/4277adf73995bb9111f4a6eb9de06ea8/63868/template.png 250w,
/static/4277adf73995bb9111f4a6eb9de06ea8/0b533/template.png 500w,
/static/4277adf73995bb9111f4a6eb9de06ea8/00d43/template.png 1000w,
/static/4277adf73995bb9111f4a6eb9de06ea8/aa440/template.png 1500w,
/static/4277adf73995bb9111f4a6eb9de06ea8/e8950/template.png 2000w,
/static/4277adf73995bb9111f4a6eb9de06ea8/5b2ff/template.png 2190w&quot;
        sizes=&quot;(max-width: 1000px) 100vw, 1000px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
    &lt;/span&gt;
    &lt;figcaption class=&quot;gatsby-resp-image-figcaption&quot;&gt;Writing a template draft&lt;/figcaption&gt;
  &lt;/figure&gt;&lt;/p&gt;
&lt;h2 id=&quot;writing-the-script&quot;&gt;Writing the script&lt;/h2&gt;
&lt;p&gt;When the template was in a good place, I opened up &lt;a href=&quot;https://script.google.com/&quot;&gt;Google Apps Script&lt;/a&gt; and created a new project called “Generate KPL Newsletter Draft.”&lt;/p&gt;
&lt;p&gt;Piecing together snippets from StackOverflow, I wrote a script to:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Add the file ID for the KPL Newsletter Template Google Doc&lt;/li&gt;
&lt;li&gt;Request the file from Drive&lt;/li&gt;
&lt;li&gt;Get the current date&lt;/li&gt;
&lt;li&gt;Using the current date, find the Mondays of the month&lt;/li&gt;
&lt;li&gt;Create a new copy of the template, to be sent 14 days after the first Monday of the month&lt;/li&gt;
&lt;li&gt;Create a second copy of the template, to be sent 14 days after the third Monday of the month&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;gatsby-code-title code-snippet-title&quot;&gt;Code.gs&lt;/div&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;javascript&quot;&gt;&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code class=&quot;language-javascript&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;generateDoc&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
 &lt;span class=&quot;token comment&quot;&gt;// Get document information&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; templateFileId &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token constant&quot;&gt;ADD&lt;/span&gt; &lt;span class=&quot;token constant&quot;&gt;FILE&lt;/span&gt; &lt;span class=&quot;token constant&quot;&gt;ID&lt;/span&gt; &lt;span class=&quot;token constant&quot;&gt;HERE&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; file &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; DriveApp&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;getFileById&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;templateFileId&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

 &lt;span class=&quot;token comment&quot;&gt;//  Get today&apos;s date&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; d &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;Date&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    month &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; d&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;getMonth&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    mondays &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

  d&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;setDate&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

  &lt;span class=&quot;token comment&quot;&gt;// Get the first Monday in the month&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;d&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;getDay&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;!==&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    d&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;setDate&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;d&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;getDate&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

  &lt;span class=&quot;token comment&quot;&gt;// Get all the other Mondays in the month&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;d&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;getMonth&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;===&lt;/span&gt; month&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    mondays&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;Date&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;d&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;getTime&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    d&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;setDate&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;d&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;getDate&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

  &lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; firstMonday &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; mondays&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; thirdMonday &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; mondays&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; daysToChange &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;14&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; firstMondaySendDate &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;Date&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;
    firstMonday&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;getFullYear&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    firstMonday&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;getMonth&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    firstMonday&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;getDate&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; daysToChange
  &lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; firstMondayFormattedDate &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; Utilities&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;formatDate&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;
    firstMondaySendDate&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token string&quot;&gt;&quot;GMT+7&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token string&quot;&gt;&quot;MM/dd/yyyy&quot;&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; thirdMondaySendDate &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;Date&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;
    thirdMonday&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;getFullYear&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    thirdMonday&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;getMonth&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    thirdMonday&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;getDate&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; daysToChange
  &lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; thirdMondayFormattedDate &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; Utilities&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;formatDate&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;
    thirdMondaySendDate&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token string&quot;&gt;&quot;GMT+7&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token string&quot;&gt;&quot;MM/dd/yyyy&quot;&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

  file&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;makeCopy&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;firstMondayFormattedDate &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot; Newsletter Draft&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  file&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;makeCopy&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;thirdMondayFormattedDate &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot; Newsletter Draft&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;To test the script, I pressed play and checked the Newsletter folder.
&lt;figure class=&quot;gatsby-resp-image-figure&quot; style=&quot;&quot;&gt;
    &lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1000px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 49.199999999999996%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAACXBIWXMAABYlAAAWJQFJUiTwAAABOklEQVQoz32S6W6EMAyEef83bP9vpV3IZeeCJZ7KAfZA21oaOUD44rEzfP98wYwXcEzQEJGeAzNGY7tu0wRPjJgLOOV3xYSYssRtLcNl8giccb8vHXYo5YxABB8CmCOSwmLaAc+cSwExCzGj1CrDWhNSKliWJ1BDN1vnYIxFzhnzPMNaC+99l66d86i1YhxHuV5vukeGVPTk2AFHKDTngnVdH8/HQefY38u+liGEgKjAUw+tNZimqVdwBpzVmkhrbQNOxmgPoODXnx0vuBmGd7Z/U5vqZAdskofkyINarXXusDrPfYM6iFUQ4gxmAhGDiLqTTxXKFluFh90QqDe/7Za5NDgqoKBDCHDO9e/y2fYTmNI2fr0mrz3krMAKotAPU+hxE7RfD9vt6OGWB70Oalen+j7Rv6f6X4W/UgoNqlF7U9kAAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;This month&amp;#39;s template drafts&quot;
        title=&quot;This month&amp;#39;s template drafts&quot;
        src=&quot;/static/12f417f6cf1e78e428a96891682f923a/00d43/postscript.png&quot;
        srcset=&quot;/static/12f417f6cf1e78e428a96891682f923a/63868/postscript.png 250w,
/static/12f417f6cf1e78e428a96891682f923a/0b533/postscript.png 500w,
/static/12f417f6cf1e78e428a96891682f923a/00d43/postscript.png 1000w,
/static/12f417f6cf1e78e428a96891682f923a/aa440/postscript.png 1500w,
/static/12f417f6cf1e78e428a96891682f923a/eee07/postscript.png 1628w&quot;
        sizes=&quot;(max-width: 1000px) 100vw, 1000px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
    &lt;/span&gt;
    &lt;figcaption class=&quot;gatsby-resp-image-figcaption&quot;&gt;This month&amp;#39;s template drafts&lt;/figcaption&gt;
  &lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Is it the most efficient script in the world? Probably not. But it works and that’s good enough for me.&lt;/p&gt;
&lt;h2 id=&quot;adding-a-trigger&quot;&gt;Adding a trigger&lt;/h2&gt;
&lt;p&gt;Once I confirmed that the script had created the copies correctly, I added a built-in project trigger.&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;gatsby-resp-image-figure&quot; style=&quot;&quot;&gt;
    &lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1000px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 63.6%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAANCAYAAACpUE5eAAAACXBIWXMAABYlAAAWJQFJUiTwAAAB6klEQVQ4y41TTY+bMBTM7+7PiVbqVt2q6ioHeuqhe8u5q1XUTcJXABsMxmDAhkz1nARtlFW1lkZP2DBv3oxZfLqrEaUlfH8HPwhwOBzg+75DFEVo2xbH4xHjOOIja3H3q0bGBRjLkBcFhBAOaZq6GoYhsixDnucYhgHGmP9i0SqJqqrQ9z2stVfdSFlZEmng3qEGUkpIWZ+rRF3XM+idRZYxxHEMrTW6rnMqaE3nMTkvEEUpkiRxFjiEgQM1ImuCIMB+v3d2LahrURSOjDoQSCmps9YgSUvsA4Gnp99YLpf4/OUr7h8ecf/wA9++P+Kn58HzPKxWK6zX6xMh+UMKaQTOufOM1JENdSWRpgk63X0slAshKSQfiPDiqVMsWwRh5PZp7+TthOM0YZom1/htnQnJO1JGntAzHdJZ0zTXQU304egseQ8zIam7+EkQReHuIGcZkmAHFvuoyxydqjC08kRwvgmEm5GJkBLcbDbYbrdgjKFtNURZguUCjHOopsFgzM3VuvGQFJVl6UJx5ErBDgO0FOiaCkbXmIYWvapgeg3bKRitZrIrhcX576BKIZAypRTG3iI+CPx5+YuX52f4rzu8bn3s/AgsS6DbZia7GfktIQVDlZbSPXheoJIKnJ1G1p2GsdaF9t7I/wDV3t+HcewBzAAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Adding a project trigger&quot;
        title=&quot;Adding a project trigger&quot;
        src=&quot;/static/3927f65035a329fe69aa18bf1e243c76/00d43/trigger-menu.png&quot;
        srcset=&quot;/static/3927f65035a329fe69aa18bf1e243c76/63868/trigger-menu.png 250w,
/static/3927f65035a329fe69aa18bf1e243c76/0b533/trigger-menu.png 500w,
/static/3927f65035a329fe69aa18bf1e243c76/00d43/trigger-menu.png 1000w,
/static/3927f65035a329fe69aa18bf1e243c76/85e74/trigger-menu.png 1436w&quot;
        sizes=&quot;(max-width: 1000px) 100vw, 1000px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
    &lt;/span&gt;
    &lt;figcaption class=&quot;gatsby-resp-image-figcaption&quot;&gt;Adding a project trigger&lt;/figcaption&gt;
  &lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;In this case, using a time-based trigger to run the script on the first of the month made the most sense.&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;gatsby-resp-image-figure&quot; style=&quot;&quot;&gt;
    &lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1000px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 97.60000000000001%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAABYlAAAWJQFJUiTwAAAB6UlEQVQ4y6WU246CQAyGfW7vvFiXeEh8IU18AwUT9wkUOcggAwwqdvN3LEFCNu5uk6ZAO9/0MMNgv/+i7XZLrueR61r1vK7u2MK32Wwa5XWuy3a329FoNKIBEdHhcKAwDClJEkoSxc9hGFEQWOv7Plv4f5LpbGGBCIzjM10uF8qyjLWqKlZjDBlTUZ7n7IctioL1er3S/X5nCxk7cws8nwHLSKmUEqV4IQLbArBS6llFQlEUMbyua7rdbuz/+JxZIGCAwPF4PFpBFdW1fUcWiNFa82IIvkl2aapo7Eylh0c6+j6DsSsWpSnKK3gDKEo8Hn3uZxTFlGU2RoDYbDZ7ZohSdJ5zKSi/LMumVMm4K/gmmwlwMplYYBzHDLEDMNw/CW4D29/aGwrQcRwLbGfUl0EfsAt/yVB6l2nNw2hLF9iVNrDpIZqMBkNx9gBA2VL6u8Dp9Dnl0yngCaL00hi2mDT0T8A0TUnrnI8CILBowT8yPPGkcY9xBXGXcZR+28MGGAQBQ9A/6R2ecZjrN4GosgHiQGMH+TlI2bh672QIRRLNlJGh/ePEzT2Vxe8CIfP5nAYIRu8MT9dOuChKvor6eS7lN9Wn8ENfMqyqa8/O9GtZLBY0WK/XtFwuabVa9Sp84pfnPoV/OBzSNwPe7/KCsIZtAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Customizing the trigger&quot;
        title=&quot;Customizing the trigger&quot;
        src=&quot;/static/8c46c7be542b73f3e3210ee208d51a2b/00d43/trigger.png&quot;
        srcset=&quot;/static/8c46c7be542b73f3e3210ee208d51a2b/63868/trigger.png 250w,
/static/8c46c7be542b73f3e3210ee208d51a2b/0b533/trigger.png 500w,
/static/8c46c7be542b73f3e3210ee208d51a2b/00d43/trigger.png 1000w,
/static/8c46c7be542b73f3e3210ee208d51a2b/0f586/trigger.png 1498w&quot;
        sizes=&quot;(max-width: 1000px) 100vw, 1000px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
    &lt;/span&gt;
    &lt;figcaption class=&quot;gatsby-resp-image-figcaption&quot;&gt;Customizing the trigger&lt;/figcaption&gt;
  &lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Now, thanks to the script, each newsletter draft will be ready to go, even if folks on the team are out. Once I finish the rest of the documentation on how to put the non-automated parts of the newsletter together, we’ll be one step closer to self-service.&lt;/p&gt;
&lt;h2 id=&quot;on-another-note&quot;&gt;On another note&lt;/h2&gt;
&lt;p&gt;I only need to write two more posts this year to beat my 2017 record of…5 whole posts. Maybe I’ll keep the automation theme going and write about how to autogenerate a Figma component changelog from the “Publish component” dialog next.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Setting up a Gmail recruiter response template]]></title><description><![CDATA[We’ve all seen the Twitter threads. Experienced designers will post screenshots of emails they receive from recruiters, complaining about…]]></description><link>https://julesforrest.com/notes/2020/template-responses-in-gmail/</link><guid isPermaLink="false">https://julesforrest.com/notes/2020/template-responses-in-gmail/</guid><pubDate>Sat, 20 Jun 2020 19:06:16 GMT</pubDate><content:encoded>&lt;p&gt;We’ve all seen the Twitter threads. Experienced designers will post screenshots of emails they receive from recruiters, complaining about the quality of the message or the morals of the company reaching out. While some of these critiques may be valid, the threads themselves are often a bit insensitive. Complaining? Publicly? About someone proactively trying to hire you? Someone you didn’t have to fight tooth and nail to give you the time of day? Yikes.&lt;/p&gt;
&lt;p&gt;Instead of complaining about or ignoring these messages, I encourage you to think of them as an opportunity. Recruiters are responsible for keeping their pipelines moving. Pipelines in tech are notoriously white and male.&lt;/p&gt;
&lt;p&gt;If you’re privileged enough to get recruiting emails, consider taking a small, nearly automated step towards better representation in tech design by setting up a template response in Gmail. In your template, include links to directories focused on highlighting accomplished but underrepresented design talent.&lt;/p&gt;
&lt;h2 id=&quot;sample-message&quot;&gt;Sample message&lt;/h2&gt;
&lt;p&gt;My own inbox is far from inundated with recruiting emails. But I do get some from time to time. When responding, I use the following Gmail template:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hi there, &lt;br/&gt;&lt;br/&gt;
Thanks for thinking of me and reaching out!&lt;br/&gt;&lt;br/&gt;
I’m not currently interested in taking on anything new, but I do feel strongly about helping companies diversify their design teams. To that end, I built &lt;a href=&quot;https://womenwho.design&quot;&gt;Women Who Design&lt;/a&gt; to help recruiters and hiring managers find talent more easily. &lt;/br&gt;&lt;/br&gt;
Of course, examining diversity along the axis of gender is one small piece of the puzzle. I also recommend checking out:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://apiwho.design/&quot;&gt;API Who Design&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blackswho.design&quot;&gt;Blacks Who Design&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://filipinoswhodesign.club/&quot;&gt;Filipinos Who Design&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://indianswhodesign.in/&quot;&gt;Indians Who Design&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://latinxswhodesign.com&quot;&gt;Latinxs Who Design&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://peopleofcraft.com/&quot;&gt;People of Craft&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://queerdesign.club/&quot;&gt;Queer Design Club&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you’d like to reach more diverse audiences with your job listings directly, Women Who Design also has a &lt;a href=&quot;https://womenwho.design/jobs/&quot;&gt;job board&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt; Best of luck in your candidate search and I’d love to stay in touch if my situation changes.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;
Jules&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;note&quot;&gt;Note&lt;/h3&gt;
&lt;p&gt;An earlier version of this post included a less inclusive list of sibling directories. I’ve updated the template above to reflect a broader group of resources looking to highlight underrepresented talent.&lt;/p&gt;
&lt;h2 id=&quot;setting-up-a-gmail-template&quot;&gt;Setting up a Gmail template&lt;/h2&gt;
&lt;p&gt;To set up my template, I followed the instructions from Hubspot’s &lt;a href=&quot;https://blog.hubspot.com/sales/gmail-templates-canned-responses&quot;&gt;How to Create a Gmail Canned Response in Under 60 Seconds&lt;/a&gt; article:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;In Gmail, click the Gear icon, then click ‘Settings’&lt;/li&gt;
&lt;li&gt;Click the tab that says ‘Advanced’&lt;/li&gt;
&lt;li&gt;Click ‘Enable’ on the ‘Templates’ prompt&lt;/li&gt;
&lt;li&gt;Start a new email by hitting ‘Compose’ in the upper left-hand corner of your inbox&lt;/li&gt;
&lt;li&gt;Type the email message you’d like to save as a template&lt;/li&gt;
&lt;li&gt;Click the three dots icon on the bottom right-hand corner of the compose window, hover over ‘Templates,’ ‘Save draft as template,’ and then click ‘Save as new template’&lt;/li&gt;
&lt;li&gt;Name your template&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src=&quot;/notes/2020/template-responses-in-gmail/setup.gif&quot; alt=&quot;Example of setting up the template&quot;&gt;&lt;/p&gt;
&lt;h2 id=&quot;using-the-template&quot;&gt;Using the template&lt;/h2&gt;
&lt;p&gt;Now that I have my template, replying to a recruiting message I’m not interested in pursuing takes less than 10 seconds.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open the recruiting email and press the ‘Reply’ button&lt;/li&gt;
&lt;li&gt;Click the three dots icon on the bottom right-hand corner of the compose window, hover over ‘Templates,’ then click on the template name.&lt;/li&gt;
&lt;li&gt;After the response is pasted, just click ‘Send’.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src=&quot;/notes/2020/template-responses-in-gmail/email-example.gif&quot; alt=&quot;Example of sending the template&quot;&gt;&lt;/p&gt;
&lt;p&gt;Will this fix all of tech’s diversity, equity and inclusion issues? Of course not. But it’s a small, easy step in the right direction.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Tinkering]]></title><description><![CDATA[I like personal sites. I like looking at other people’s personal sites and I like working on my own. In San Francisco, people seem to…]]></description><link>https://julesforrest.com/notes/2020/tinkering/</link><guid isPermaLink="false">https://julesforrest.com/notes/2020/tinkering/</guid><pubDate>Sat, 02 May 2020 19:48:36 GMT</pubDate><content:encoded>&lt;p&gt;I like personal sites. I like looking at other people’s personal sites and I like working on my own.&lt;/p&gt;
&lt;p&gt;In San Francisco, people seem to associate personal sites with portfolios and portfolios with job hunting. While that’s definitely a primary use case for some folks, I find it limiting.&lt;/p&gt;
&lt;p&gt;Working on this site has become a lightweight way to experiment with frameworks, learn new front-end skills and do some just-for-fun design work that there’s not always time for at my day job. In quarantine, that’s an outlet I don’t take for granted.&lt;/p&gt;
&lt;h2 id=&quot;getting-started&quot;&gt;Getting started&lt;/h2&gt;
&lt;p&gt;Back in August, I was getting tired of my site’s then-design. I started documenting &lt;a href=&quot;https://twitter.com/julesforrest/status/1162802903288991744/&quot;&gt;inspiration&lt;/a&gt; of other sites I liked and noticed I was gravitating towards sites that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Used typography as a primary design element&lt;/li&gt;
&lt;li&gt;Used a bright or prominent color scheme&lt;/li&gt;
&lt;li&gt;Were primarily made up of blog posts, articles or other written content&lt;/li&gt;
&lt;li&gt;Veered away from or innovated on the traditional “portfolio-style” case studies&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As always, the motivation to work on the project didn’t materialize until I found a new framework I needed an excuse to try out: &lt;a href=&quot;https://tailwindcss.com/&quot;&gt;Tailwind&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Armed with a moderate amount of creative direction, I quickly redesigned and rebuilt my homepage over Thanksgiving break. Tailwind turned out to be the happy medium I was looking for between the quick but generic &lt;a href=&quot;https://tachyons.io&quot;&gt;Tachyons&lt;/a&gt; and the custom but verbose &lt;a href=&quot;https://emotion.sh/docs/introduction&quot;&gt;Emotion&lt;/a&gt;, two styling systems I’d used on my site in the past. I also felt like my new color palette and type pairing were a solid improvement from the the previous iteration.&lt;/p&gt;
&lt;p&gt;Calling it good enough, I put the project down without adding a notes page, cleaning up the layout or fixing the information design.&lt;/p&gt;
&lt;h2 id=&quot;the-second-pass&quot;&gt;The second pass&lt;/h2&gt;
&lt;p&gt;Last week, motivation struck again when I got curious about the “simpler static site generator” &lt;a href=&quot;https://11ty.dev&quot;&gt;11ty&lt;/a&gt;. Many web designers and developers I admire have been singing its praises, so I wanted to give it a shot. After a few minutes, I realized its underlying technologies and principles would have added a ton of unfamiliar overhead and complexity to my site, so I decided to stick with my &lt;a href=&quot;/notes/2018/moving-to-gatsby/&quot;&gt;current setup&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Instead, I turned my attention to improving some of the other areas:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Redesigned the information to group related content by subject (design systems, Women Who Design, etc) instead of content type (blog post, talk, etc)&lt;/li&gt;
&lt;li&gt;Added logos where relevant to provide higher fidelity way-finding / scannability for the sections without imagery&lt;/li&gt;
&lt;li&gt;Reformatted all the homepage data into separate JS object to make updating and adding new content easier&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;After a few hours of work, I merged the update and moved on with my day.&lt;/p&gt;
&lt;h2 id=&quot;this-weeks-improvements&quot;&gt;This week’s improvements&lt;/h2&gt;
&lt;h3 id=&quot;performance&quot;&gt;Performance&lt;/h3&gt;
&lt;p&gt;Now, did I check my load times before I merged that ad-hoc weekend update? Of course not! I blame my quarantine brain. When I opened my site on my phone to QA the mobile design styles, things were clearly loading slower than they used to.&lt;/p&gt;
&lt;p&gt;Digging into it further, I realized my easy-peasy new JS content object was loading full size images, to the tune of an 8MB total page load 😬. To take advantage of the performance benefits that come with Gatsby’s recommended &lt;code&gt;Img&lt;/code&gt; component, I’d need to reformat my data to support querying the images through GraphQL.&lt;/p&gt;
&lt;p&gt;Fortunately, Gatsby had a &lt;a href=&quot;https://www.gatsbyjs.org/tutorial/gatsby-image-tutorial/#querying-for-multiple-images-from-yaml-data&quot;&gt;tutorial&lt;/a&gt; on the exact setup I needed to use. Instead of importing my JS content object directly into the homepage, I moved the content to a &lt;code&gt;.yml&lt;/code&gt; file and added it to my GraphQL schema with the &lt;code&gt;gatsby-transformer-yaml&lt;/code&gt; plugin. The homepage is now a much more managable 1.6MB, which I aim to get down to under 1MB in the next update.&lt;/p&gt;
&lt;p&gt;As a bonus, I’m now able to take advantage of the &lt;code&gt;Img&lt;/code&gt; component’s duotone config query option. The duotone image style is visible to the user on hover, which is a similar color treatment to the other hover styles on the page.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/notes/2020/tinkering/hover.gif&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;h3 id=&quot;notes-page&quot;&gt;Notes page&lt;/h3&gt;
&lt;p&gt;I also finally added re-added a &lt;a href=&quot;/notes&quot;&gt;notes&lt;/a&gt; page to house all my blog posts, including the older ones that don’t fit on the homepage. The exercise of creating this page was a good reminder that I’m not writing as much as I’d like to (and that when I do write, it’s been disproportionately emo). Seeing as we’re not getting out of quarantine anytime soon, I hope to change that over the next couple of months.&lt;/p&gt;
&lt;h2 id=&quot;next-up&quot;&gt;Next up&lt;/h2&gt;
&lt;h3 id=&quot;set-up-redirects&quot;&gt;Set up redirects&lt;/h3&gt;
&lt;p&gt;While making the new notes page, I decided to reorganize my notes into a &lt;code&gt;/notes/YEAR/POST_TITLE.md&lt;/code&gt; folder structure. Which means all my old notes aren’t referencing each other properly and my RSS feed is double-posting everything. You know what we call that? A problem for next week.&lt;/p&gt;
&lt;p&gt;(Sorry to everyone who got last week’s emo post in their RSS feed again today).&lt;/p&gt;
&lt;h3 id=&quot;performance-round-two&quot;&gt;Performance round two&lt;/h3&gt;
&lt;p&gt;1.6MB is still too big for how simple my site is, and while the &lt;code&gt;Img&lt;/code&gt; component has already helped a lot, there’s some funkiness happening under the hood to be sorted out.&lt;/p&gt;
&lt;p&gt;See y’all next time, and stay sane-ish!&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Timing out]]></title><description><![CDATA[Yesterday there was no plane to jump on. There were no calls to make. There were no arrangements to book. The news came from closer to home…]]></description><link>https://julesforrest.com/notes/2020/timing-out/</link><guid isPermaLink="false">https://julesforrest.com/notes/2020/timing-out/</guid><pubDate>Thu, 23 Apr 2020 20:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Yesterday there was no plane to jump on. There were no calls to make. There were no arrangements to book.&lt;/p&gt;
&lt;p&gt;The news came from closer to home: just a MUNI, a BART and a County Connection away. In a Lyft, I could have been there in an hour. But, because of coronavirus, there was only stillness.&lt;/p&gt;
&lt;p&gt;I rushed out of no doors.&lt;/p&gt;
&lt;p&gt;I set no email responders.&lt;/p&gt;
&lt;p&gt;I cancelled no meetings.&lt;/p&gt;
&lt;p&gt;Death in the time of coronavirus means processing a strange type of grief, even when the grief is unrelated to the virus’s havoc. There are no distractions. There are no gatherings, no memorials, no escapes. The pain is purer, but the inaction is debilitating.&lt;/p&gt;
&lt;p&gt;***&lt;/p&gt;
&lt;p&gt;These phone calls come like clockwork, every six months, delivering another blow. &lt;a href=&quot;/yet-out-of-that&quot;&gt;I should have been prepared&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;But this time, with no logistics to distract me, I’ll let myself rant again at technology’s cold indifference.&lt;/p&gt;
&lt;p&gt;***&lt;/p&gt;
&lt;p&gt;Three weeks ago, I challenged my grandmother to a round of Words With Friends. We played often; she beat me often.&lt;/p&gt;
&lt;p&gt;Around that time, her health took a turn. She never saw the game.&lt;/p&gt;
&lt;p&gt;Yesterday, she died.&lt;/p&gt;
&lt;p&gt;As Words With Friends so callously reported, she timed out.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1000px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 83.6%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAARCAYAAADdRIy+AAAACXBIWXMAABYlAAAWJQFJUiTwAAACzklEQVQ4y41UWWsUQRCef+dP8NEH0ScFfRN9EMHdxIASfAkq+CCKB74oGDxREzfgESNCXJU1uzPTPffszM597PQn1evk8CIF31TRXV31TXVVK67rYjKZIIoiqXeD1sIwxHg8/ieCICAfQX6O4wglyzLEcQSDM1Bwz/O2tWEYyLIU/xNKrGmq8D0PcRwLJUkS1NMp6gbIshyUIM9zCblX19uHhRB7QJKmKTEVaZLMAuZ5gTLP8O39azRlIp2qqsKUktS1tFu0QX7XZNInSRKhVHWDZ3evYO7wATy+fREb6+/R6XQxPz+PhYUFdDoddLtdLC0toSiKP5iSNE2zE7ARAtcX53Du6CGcPX4EWz++y9rpugZN0zAajaDrOjjne36/lWkjYNuOMC1rFjAvCkzcEJ/vvYHXN6VTWZTycF1VspZVVaIsS2Ly1zoWWSToxmUNTYNu14QXuHB9C7bF4NgctsWldmzjl56t0X4Lz+F42vuK5ZW+cB0Oy+RC4UwD04dg2pbUnI3A2XAH+i5b7lEJhvAdDfeffMKhc69w8MwLcePhOnyHCYVzDQZXwbkq9X7A9BFCV8Plmz2cWHyHYxffiu61FYQeFwpj6owZsdwvDB22b2Oz38epS8s4eeGR2Njsw7IkQwbTIJYaTK6BsZltcB2yHIzYaxJMV8ENBvXzB/x4uQxTHcAyVJhsS/DNj2DqUCjTKseH7wHmbn9BEJfy1miGOTe2W6OdW9lzAJznD8AunUblWigbwLRsYd65iohrQqnLHG+/Bjh/6wv8aBbQsuztvqMJIZtANrUOJWsT0OgNBgMxHgdIs2w2y2FSQXNS5OUUTTOVLwgNveyxoqD+kqCeJKH9IAylnaQpPSbi1+skFMrwN6HD7ZTsxnA4lA/IbyI7PCOGvu8jjhNMokiyoPpRElVVsbq6irW1NfR6PQmyaY0SkU/LnJiR9n1f/AStuOvgQw3T+AAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;wordswithfriends&quot;
        title=&quot;wordswithfriends&quot;
        src=&quot;/static/09dad9604f6ca1743330431027e6cf5c/00d43/wordswithfriends.png&quot;
        srcset=&quot;/static/09dad9604f6ca1743330431027e6cf5c/63868/wordswithfriends.png 250w,
/static/09dad9604f6ca1743330431027e6cf5c/0b533/wordswithfriends.png 500w,
/static/09dad9604f6ca1743330431027e6cf5c/00d43/wordswithfriends.png 1000w,
/static/09dad9604f6ca1743330431027e6cf5c/aa440/wordswithfriends.png 1500w,
/static/09dad9604f6ca1743330431027e6cf5c/e8950/wordswithfriends.png 2000w,
/static/09dad9604f6ca1743330431027e6cf5c/2acc9/wordswithfriends.png 2378w&quot;
        sizes=&quot;(max-width: 1000px) 100vw, 1000px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
    &lt;/span&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Yet out of that]]></title><description><![CDATA[It’s been a difficult four years for my family, health-wise. We’re spread out across the country now, but we keep reuniting in emergency…]]></description><link>https://julesforrest.com/notes/2019/yet-out-of-that/</link><guid isPermaLink="false">https://julesforrest.com/notes/2019/yet-out-of-that/</guid><pubDate>Sat, 16 Nov 2019 21:34:54 GMT</pubDate><content:encoded>&lt;p&gt;It’s been a difficult four years for my family, health-wise.&lt;/p&gt;
&lt;p&gt;We’re spread out across the country now, but we keep reuniting in emergency rooms up and down both coasts. We’ve learned the layouts of at least 12 different hospitals, the procedures at the security desks. We can distinguish the difference in rhythm between the ICUs, the hospice wings, the post-op rooms. The locked doors of the traumatic brain injury floors and the psych wards.&lt;/p&gt;
&lt;p&gt;These places always have lovely names. “Garden South”, “Pacific View”. I can’t blame the hospital planners for putting a serene spin on things. Of course, many families are growing at these hospitals instead of shrinking. How would you even come up with an appropriate name for the place where you watch someone you love die?&lt;/p&gt;
&lt;p&gt;I do, however, have plenty of contempt for the airlines. Especially for the product teams who decided it would be a good idea to throw massive insurance pop-ups at someone trying to get the last seat on a flight 4 hours before its departure—“Are you &lt;em&gt;sure&lt;/em&gt; you don’t want to insure this flight?” Insure this flight? I’d love to not even have to fucking take it. In which circle of hell did you hide the button that would have let me skip this line of questioning? Within minutes, the flight I was trying to book jumped from $477 to $799.&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;gatsby-resp-image-figure&quot; style=&quot;&quot;&gt;
    &lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1000px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 62.4%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAYAAABiDJ37AAAACXBIWXMAABYlAAAWJQFJUiTwAAACW0lEQVQoz31RbU/TUBjtf/Uv+AuIUb8IGsWoHwwRNFNBkLGNMZXXCd2KbLCOBUlgZVvftq69fd+6e8y9bEBi9ElPzn2epuc551Z48OIlVjcK+JhOYzGTxee1DL7kcpxZv5LfwFI2h6VMFovpNaxvbqIoSdgtl7FXLnPeFkVaqddx/+FjKuS3twBQDIIQSRRiGATAYIBRFPGenScVRgMMR/irKH+AN6lPVFjOrwOjGLZlIyAEvuPAJwSubV+fXYIkSRBEMVLFc8xkqniWreLpmKfXKniy+ou++vEb96ZmqLCUL8CJAEU10el0oOkGNE1HU1HQ0VVcaQqa7Uu0tRYIIbBtB47jwPU8eJ7H2XYc7nD67RwVVjYK3Hav10Or1UKz2YRpmuiaXRiGgV63x5nPul3ODEzM930OhxAuODu/QIXlsaDVt3B2dgZZrnNRwzChaRp0TefMoKoqdP26Z0smos7Y4Yt381T4Wvh2IyjLMiTpEHJNhqIouLy45NfAPmbMojIBbxx3Avuu4GJuHTQZQjcMaLrOo7L4/X4flmXBdV2EYYggCP4J4rpjwQUqTM8t4FG6hsJ+A62WCsPx4ccjOH7MYbkR4mGC/9UwSW7vMJXOoHHRRv38AsrVFQ6Pj9FW1Zvtk4h+EHC3rJ/M+TvfZ3/61mH6+ybf4rkEHnHhEgJV06HqOqIwRBxFN2DR4zjG4A7YPApDLvj6Q4oKM3PvUTxqoCiK2C9L+FmWcCAdYmf/ALsHIvbEEopiCbtiCTtSFdvlCrZKFYjVGk5OGziun+LopEY108TU81n6B//aZuzdsBToAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Oh. There it is.&quot;
        title=&quot;Oh. There it is.&quot;
        src=&quot;/static/8dffe3483b95130d5fe3ef12fed06746/00d43/flight.png&quot;
        srcset=&quot;/static/8dffe3483b95130d5fe3ef12fed06746/63868/flight.png 250w,
/static/8dffe3483b95130d5fe3ef12fed06746/0b533/flight.png 500w,
/static/8dffe3483b95130d5fe3ef12fed06746/00d43/flight.png 1000w,
/static/8dffe3483b95130d5fe3ef12fed06746/aa440/flight.png 1500w,
/static/8dffe3483b95130d5fe3ef12fed06746/51dd6/flight.png 1952w&quot;
        sizes=&quot;(max-width: 1000px) 100vw, 1000px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
    &lt;/span&gt;
    &lt;figcaption class=&quot;gatsby-resp-image-figcaption&quot;&gt;Oh. There it is.&lt;/figcaption&gt;
  &lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;My nerves are shot at this point and the numbness has set in. I’m afraid of the phone. Every time it rings, every time someone doesn’t pick up, I steel myself to start executing my now well-established checklist. Book a flight. Tell my manager. Call Dan. Run home, grab whatever is clean, throw it in a bag. Water the plants. Don’t cry in the cab on the way to the airport. Start mapping my path to the hospital when I land. Get tougher.&lt;/p&gt;
&lt;p&gt;Is there a name for the specific feeling you get when you realize you’re trying to figure out whether you should be packing your funeral clothes? Is there a world where your decision somehow jinxes the outcome?&lt;/p&gt;
&lt;p&gt;The commonplace nature of these health failures didn’t prepare me for their impact. Bodily deterioration is guaranteed from birth. It’s already happened to your friends and their families. It will happen to you. It will happen to everyone you love.&lt;/p&gt;
&lt;h2 id=&quot;and-yet&quot;&gt;And yet&lt;/h2&gt;
&lt;p&gt;And yet, something really strange has been happening to the four of us—my parents, and my brother and me. We can sit peacefully and eat a meal together now. We can laugh and joke. We’ve taken our first family photo where nobody’s body language is saying “Get me the fuck out of here.” I’m not completely dreading the holidays this year. It doesn’t seem real.&lt;/p&gt;
&lt;p&gt;I’ve had this poem stuck in my head for the last two weeks. It’s about romantic love, but for me, it applies to love in general. A really strange cognitive dissonance has taken over my head: I feel genuinely grateful for circumstances that were only possible because of a terrible loss that I wish had never happened.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Sometimes with one I love&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Sometimes with one I love I fill myself with rage &lt;br/&gt;
for fear I effuse unreturn’d love,&lt;br/&gt;
But now I think there is no unreturn’d love,&lt;br/&gt;
the pay is certain one way or another&lt;br/&gt;
(I loved a certain person ardently and my love was not return’d,&lt;br/&gt;
Yet out of that I have written these songs).&lt;/p&gt;
&lt;p&gt;— &lt;cite&gt;Walt Whitman&lt;/cite&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;My aunt died on Halloween at Columbia University Medical Center in Washington Heights. After we said goodbye, we headed downtown and set up camp at an empty restaurant in her neighborhood. The meal took many hours; each new friend and relative that appeared brought another round of food and coffee to the table. Her favorite drink, prosecco, flowed steadily as we toasted over and over to her name and memory.&lt;/p&gt;
&lt;p&gt;It was dark when we finally paid and left, spilling out onto a street alive with parents taking their young trick-or-treaters up and down the businesses on Broadway. A group of small monsters jumped at us from the door of the liquor store. We made our way to Harlem-125th to take the train up to my mom’s apartment. While we were waiting for the 11:19, we took this photo.&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;gatsby-resp-image-figure&quot; style=&quot;&quot;&gt;
    &lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1000px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 100%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAUABQDASIAAhEBAxEB/8QAGAABAAMBAAAAAAAAAAAAAAAAAAIDBAX/xAAVAQEBAAAAAAAAAAAAAAAAAAAAAf/aAAwDAQACEAMQAAAByShXHZcgZ5FVhP/EABoQAAMAAwEAAAAAAAAAAAAAAAABAgMREyL/2gAIAQEAAQUC51RzqR3SIytF3W1moRT9H//EABcRAAMBAAAAAAAAAAAAAAAAAAAQIUH/2gAIAQMBAT8BhDF//8QAFREBAQAAAAAAAAAAAAAAAAAAICH/2gAIAQIBAT8Bo//EAB0QAAIBBAMAAAAAAAAAAAAAAAABEQIQISIxYXH/2gAIAQEABj8ClUibVPJrEeGckd3dv//EAB0QAAICAgMBAAAAAAAAAAAAAAABESExQRBRcZH/2gAIAQEAAT8hvRpwmJnVDXQx3LEZookJYkJqK+GQx+nH/9oADAMBAAIAAwAAABC/+MP/xAAYEQACAwAAAAAAAAAAAAAAAAABEQAQUf/aAAgBAwEBPxBK4Rq3/8QAGBEAAgMAAAAAAAAAAAAAAAAAABAhMUH/2gAIAQIBAT8QsSav/8QAHBABAAICAwEAAAAAAAAAAAAAAQARIWExQYHR/9oACAEBAAE/EAoJZbB3eomQVIiu+4QBQ6HPtQ4HEBuk+xvANwze4LCA0Y2tNZIwLlVy5//Z&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;My family on October 31, 2019.&quot;
        title=&quot;My family on October 31, 2019.&quot;
        src=&quot;/static/0f1e8faa9d8532ae176a683eec0033fb/a2510/train.jpg&quot;
        srcset=&quot;/static/0f1e8faa9d8532ae176a683eec0033fb/0479a/train.jpg 250w,
/static/0f1e8faa9d8532ae176a683eec0033fb/41099/train.jpg 500w,
/static/0f1e8faa9d8532ae176a683eec0033fb/a2510/train.jpg 1000w,
/static/0f1e8faa9d8532ae176a683eec0033fb/47311/train.jpg 1080w&quot;
        sizes=&quot;(max-width: 1000px) 100vw, 1000px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
    &lt;/span&gt;
    &lt;figcaption class=&quot;gatsby-resp-image-figcaption&quot;&gt;My family on October 31, 2019.&lt;/figcaption&gt;
  &lt;/figure&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[The Anthropocene Reviewed]]></title><description><![CDATA[99 Percent Invisible is a podcast in which Roman Mars explores “all the thought that goes into the things we don’t think about — the…]]></description><link>https://julesforrest.com/notes/2019/the-anthropocene-reviewed/</link><guid isPermaLink="false">https://julesforrest.com/notes/2019/the-anthropocene-reviewed/</guid><pubDate>Sat, 27 Jul 2019 09:01:29 GMT</pubDate><content:encoded>&lt;p&gt;&lt;em&gt;99 Percent Invisible&lt;/em&gt; is a podcast in which Roman Mars explores “all the thought that goes into the things we don’t think about — the unnoticed architecture and design that shape our world.”&lt;/p&gt;
&lt;p&gt;&lt;em&gt;The Anthropocene Reviewed&lt;/em&gt; is a podcast in which John Green “reviews different facets of the human-centered planet on a five-star scale.”&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://99percentinvisible.org/episode/the-anthropocene-reviewed/&quot;&gt;This episode&lt;/a&gt; is the crossover between the two that I didn’t know I needed.&lt;/p&gt;
&lt;iframe style=&quot;border: none&quot;  src=&quot;https://app.stitcher.com/splayer/f/16374/62010778&quot; width=&quot;100%&quot; height=&quot;150&quot; frameborder=&quot;0&quot; scrolling=&quot;no&quot;&gt;&lt;/iframe&gt;
&lt;p&gt;I’m a John Green fan. I’m a Roman Mars fan. But the episode description didn’t sound especially interesting to me, so I was skeptical when a close friend told me that she felt like her life was better after hearing it. In the week since, I’ve listened to it three times.&lt;/p&gt;
&lt;p&gt;There are so many parts of this episode that I want to write and talk with people about:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The cave paintings at Lascaux&lt;/li&gt;
&lt;li&gt;The ubiquity of contextualizing experiences in a five star world&lt;/li&gt;
&lt;li&gt;The seemingly desirable outcome of having strangers like you&lt;/li&gt;
&lt;li&gt;The joy in sports and religion that comes from groups of unlike people orienting themselves in the same direction&lt;/li&gt;
&lt;li&gt;The moth-like human tendency to “go where the light is on”&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Even writing these summary bullets erases a lot of the nuance that makes the episode so special, but there are two other points I can’t shake out of my head.&lt;/p&gt;
&lt;p&gt;On growing out of the teenage cliche of defining yourself by the things you hate, John says:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I got fed up with sarcasm. I got fed up with this urge to create distance between myself and emotion … And I don’t want to be distant from emotional experience.&lt;/p&gt;
&lt;p&gt;… I like emotion. I like to feel things. I like to feel them intensely. And I like to be able to ask big questions without creating a lot of distance between myself and the questions.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Earlier, when describing his essays on Hawaiian pizza and viral meningitis, he says:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I wrote the viral meningitis essay before I wrote the Hawaiian pizza essay. And at the end of the viral meningitis essay, I was thinking about how there are all these phenomena in human life that are really resistant to language. I think physical pain is the one that’s perhaps most dramatically resistant to language.&lt;/p&gt;
&lt;p&gt;But, for me, there’s also something about taste that’s resistant to language and one of the reasons we fight, I think, about Hawaiian pizza is because we almost cannot describe to each other how it tastes to us.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;For some reason, examining the relationship between emotional experience and language resistance feels really worthwhile to me. Does the act of attempting to assign language to emotion bring you closer to it? If you fail to describe it, will you feel satisfied that the experience taking up space in your brain has earned its mental footprint? Does its elusion make it more valuable? Or are you dejected, pushed farther from it? Is it preferable to assign language to a feeling, even if the assignment is false or incomplete?&lt;/p&gt;
&lt;p&gt;I have no answers today. But I like being around the questions. I think I’ll try it more often.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[A refactor with CSS variables]]></title><description><![CDATA[Holy moly, it’s been a hot minute since the last time I wrote about Women Who Design back in June of 2017 and a looooot has changed under…]]></description><link>https://julesforrest.com/notes/2019/css-variables/</link><guid isPermaLink="false">https://julesforrest.com/notes/2019/css-variables/</guid><pubDate>Wed, 02 Jan 2019 13:01:29 GMT</pubDate><content:encoded>&lt;p&gt;Holy moly, it’s been a hot minute since &lt;a href=&quot;https://css-tricks.com/building-directory-twitter-api/&quot;&gt;the last time I wrote&lt;/a&gt; about &lt;a href=&quot;https://womenwho.design&quot;&gt;Women Who Design&lt;/a&gt; back in June of 2017 and a looooot has changed under the hood in the last 18 months. There’s way too much to cover in one post, but, in short:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Women Who Design is now a static site powered by Gatsby, hosted on Netlify&lt;/li&gt;
&lt;li&gt;Gatsby’s use of React and GraphQL replaced my need for Firebase&lt;/li&gt;
&lt;li&gt;Ditto for JQuery, Heroku, and Express.js&lt;/li&gt;
&lt;li&gt;The Twitter data now comes from a custom Gatsby source plugin that also saves the designer’s profile image – no more broken image files when someone changes their avatar!&lt;/li&gt;
&lt;li&gt;Gatsby’s Image component means lazy loading actually works and the page jumps less as the profile images load in&lt;/li&gt;
&lt;li&gt;Netlify’s webhooks integration rebuilds the site automatically every night to refresh all the Twitter data&lt;/li&gt;
&lt;li&gt;THERE’S A JOB BOARD (?!?!), powered by &lt;a href=&quot;https://seeker.company&quot;&gt;Seeker&lt;/a&gt;, and the data comes from another custom Gatsby source plugin&lt;/li&gt;
&lt;li&gt;I’m trying out all the fun new CSS things – CSS Grid, CSS Modules and CSS variables&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I’m so excited about all these new updates, improvements and features, but the one I want to write about first is CSS variables. (Actually, to be fair, most of the updates listed above happened six months ago, but the CSS variables stuff only happened last month so it’s top of mind).&lt;/p&gt;
&lt;p&gt;CSS variables are so useful because, unlike Sass variables, they don’t need to compile so they can be redefined at any time. Need every instance of a component to have a different theme? &lt;a href=&quot;#the-profile-theme-variable&quot;&gt;Check&lt;/a&gt;. Need a component’s styles change to match the theme of its parent container? &lt;a href=&quot;#the-page-theme-variables&quot;&gt;Check&lt;/a&gt;. What about responsive spacing? &lt;a href=&quot;#the-spacing-variable&quot;&gt;Check&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Anyway, I guess I’ve now officially been writing code long enough to feel excited about deleting code and wow, did CSS variables help me delete code.&lt;/p&gt;
&lt;p&gt;Let’s dive in!&lt;/p&gt;
&lt;h2 id=&quot;the-profile-theme-variable&quot;&gt;The profile theme variable&lt;/h2&gt;
&lt;p&gt;One of the fun Easter eggs in the site design is that each designer’s profile is themed to their chosen Twitter theme color. I designed the profiles so that the theme extends to each display name, supporting icon, Twitter bio link and profile button link.&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;gatsby-resp-image-figure&quot; style=&quot;&quot;&gt;
    &lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1000px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 50%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAACXBIWXMAABYlAAAWJQFJUiTwAAACaElEQVQoz1WQS0tbURRG76/yD7SZOdGRxU5iQScRKx04ceJEKj4RTEQjaCMKmiKNSU2NQYmY+GjVqtGY26iJtdCal97cPO4jq9xDse2GzeF8Z++9zrclh8OB0+lkaWmJhYUFzs7O8Pv9DAwM4HK5GB8fF3oikSAejzM8PCze+vv7iUQiuN1u0T8/P4/P50NaXFxkcnKSjo4OYrEYqVSK1dVVmpubaWxsFGk1bW1t4fV6BaC9vZ2enh42Nzfp6+ujtbWVwcFB1tbWkGRZZnR0lKamJgKBAOl0mv39fdHQ0NBAZ2cn4XCYlZUVhoaG8Hg8dHV1MTc3RzAYpK3NLtzNzMyIU7Lo3d2vsdlsjIyMcHR0hNf7nt7eXlpaXgg71gqmp6eZcbvZ2NhgdnaWZDLJ8rKXZ89tTDhd2O12AZEi29uEQiExzCqW5STr65+Y97wj4PeL/UWjUfLFAheyzGUyKXapKAqnJ8e4JsY4/LxLLBplZ2cHqVKtYZgm/4ZWK6NVVeCvrmoa+bL6Xx2mCkaRei3/JEmKUhI0Q9dFmqaBojxSKqlUKlV0XcMwDNRymcfiA+VKBU3TnsC5/AOFhxK6rlOv15Gur6/5eZ8lly+QzeaoaRqZzC1XVyluMxnuvsvUqio5pUQml+WXopArFlDLVWpqFuX+kodchnT6hmKxgKSqKrphYBiWvbog1+uIu2magmqF5SKbzVIpq+jWDy3ZrP6xXUEzQDdBih2fs3t8zsFpgsjBCd/Sd5zsBdj0TRINeQh/cBHf+0gwc8Pbo32mLk4ZO/3ClHyN9sOPfvAS/eQNxlcHxuErfgMCXpgQAiQ9eAAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;A screenshot of four designer profiles with different theme colors.&quot;
        title=&quot;A screenshot of four designer profiles with different theme colors.&quot;
        src=&quot;/static/c251762f3dd065a38b7e901623a6467e/00d43/profiles-themed.png&quot;
        srcset=&quot;/static/c251762f3dd065a38b7e901623a6467e/63868/profiles-themed.png 250w,
/static/c251762f3dd065a38b7e901623a6467e/0b533/profiles-themed.png 500w,
/static/c251762f3dd065a38b7e901623a6467e/00d43/profiles-themed.png 1000w,
/static/c251762f3dd065a38b7e901623a6467e/aa440/profiles-themed.png 1500w,
/static/c251762f3dd065a38b7e901623a6467e/e8950/profiles-themed.png 2000w,
/static/c251762f3dd065a38b7e901623a6467e/9103e/profiles-themed.png 2131w&quot;
        sizes=&quot;(max-width: 1000px) 100vw, 1000px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
    &lt;/span&gt;
    &lt;figcaption class=&quot;gatsby-resp-image-figcaption&quot;&gt;A screenshot of four designer profiles with different theme colors.&lt;/figcaption&gt;
  &lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Achieving this effect was a long, messy process that went like this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The custom Gatsby source Twitter plugin requests a designer’s profile data from the Twitter API&lt;/li&gt;
&lt;li&gt;The plugin saves the designer’s chosen hex value from the API response as a variable&lt;/li&gt;
&lt;li&gt;The plugin runs a script to search the designer’s Twitter bio and create anchor tags for any URLs, @handles, #hashtags and email addresses found&lt;/li&gt;
&lt;li&gt;The script adds an inline style to any new anchor tag that applies the color of profile hex variable saved above&lt;/li&gt;
&lt;li&gt;The plugin “saves” the designer’s newly modified Twitter profile data to make it available through GraphQL (Gatsby calls this creating a &lt;a href=&quot;https://www.gatsbyjs.org/docs/node-interface/&quot;&gt;node&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;When the plugin finishes, the site’s &lt;code&gt;index.js&lt;/code&gt; file runs a GraphQL query for all of the profile data generated by the plugin&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;index.js&lt;/code&gt; file maps over each designer’s data and passes it to the &lt;code&gt;profile.js&lt;/code&gt; component through specific props&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;profile.js&lt;/code&gt; component adds inline styles to color all the themed elements using the hex value prop&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;so-why-refactor&quot;&gt;So, why refactor?&lt;/h3&gt;
&lt;p&gt;When I started learning web development, “Hey, the thing I wrote works!” was good enough for me. Then my thinking shifted to “Do I understand why the thing I wrote actually works the way it does?” Now that I’m a couple of years in, I’m trying to think more about writing stuff that behaves predictably: “Will this thing I wrote make sense to somebody else if they need to read or modify it?”&lt;/p&gt;
&lt;p&gt;Which is basically what happened here. To get the theming working, I repeatedly set inline styles in different files at two different stages of the build process. I didn’t even realize how annoying this was until I shared the project code with someone a few weeks ago and, when asked about unsetting it, I realized they’d have to delete or change ~15 different lines of code to actually do it.&lt;/p&gt;
&lt;p&gt;Separately, I’ve been thinking about open sourcing the Gatsby Twitter plugin, where the Twitter bio links get created &lt;em&gt;and&lt;/em&gt; themed. Turning plain URL strings into actual anchor tags might be okay, but does adding opinionated color styling to specific HTML elements count as predictable output? Definitely not. You want plugins to do the one thing they set out to do and leave the rest as unopinionated as possible.&lt;/p&gt;
&lt;p&gt;Finally, it was clear that the focus states throughout the site were pretty lacking and I wanted to give them an upgrade. Since you can’t style focus states using inline styles, I originally left them untouched, which looked like this:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/notes/2019/css-variables/original-focus.gif&quot; alt=&quot;A gif of the site&amp;#x27;s original focus states, which looked sloppy.&quot;&gt;&lt;/p&gt;
&lt;p&gt;The default browser focus state got the job done but the padding was wonky and the CSS Grid layout was causing the outline around the buttons to be cut off.&lt;/p&gt;
&lt;p&gt;Since CSS variables are just regular ole CSS, I realized I could create a profile theme CSS variable, use it throughout the rest of the component’s CSS (&lt;code&gt;:focus&lt;/code&gt; pseudo-classes and all), then redefine the variable’s value with an inline style just once per designer.&lt;/p&gt;
&lt;h3 id=&quot;the-profile-component&quot;&gt;The profile component&lt;/h3&gt;
&lt;p&gt;The first file I refactored was the &lt;code&gt;profile.js&lt;/code&gt; component file, which receives the designer’s Twitter profile color through the hex value prop. For the purposes of this post, I’ve removed all markup and styling that isn’t relevant to CSS variables from the code snippets.&lt;/p&gt;
&lt;p&gt;Here’s a look at all the instances of inline styles in that file:&lt;/p&gt;
&lt;div class=&quot;gatsby-code-title code-snippet-title&quot;&gt;profile.js&lt;/div&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;jsx&quot;&gt;&lt;pre class=&quot;language-jsx&quot;&gt;&lt;code class=&quot;language-jsx&quot;&gt;&lt;span class=&quot;token comment&quot;&gt;// Note: I&apos;m using Sass + CSS Modules for styling&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;import&lt;/span&gt; styles &lt;span class=&quot;token keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;./profile.module.scss&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;token function-variable function&quot;&gt;Profile&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;div&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;token script language-javascript&quot;&gt;&lt;span class=&quot;token script-punctuation punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;styles&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;profile&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;h2&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;token script language-javascript&quot;&gt;&lt;span class=&quot;token script-punctuation punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;styles&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;name&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;token script language-javascript&quot;&gt;&lt;span class=&quot;token script-punctuation punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token literal-property property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; props&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;hex &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;props&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;name&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;h2&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;p&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;token script language-javascript&quot;&gt;&lt;span class=&quot;token script-punctuation punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;styles&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;location&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;LocationIcon&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;fill&lt;/span&gt;&lt;span class=&quot;token script language-javascript&quot;&gt;&lt;span class=&quot;token script-punctuation punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;props&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;hex&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt; &lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;props&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;location&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;p&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;LinkIcon&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;fill&lt;/span&gt;&lt;span class=&quot;token script language-javascript&quot;&gt;&lt;span class=&quot;token script-punctuation punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;props&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;hex&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;a&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;href&lt;/span&gt;&lt;span class=&quot;token script language-javascript&quot;&gt;&lt;span class=&quot;token script-punctuation punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;props&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;expandedUrl&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;token script language-javascript&quot;&gt;&lt;span class=&quot;token script-punctuation punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;styles&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;url&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;props&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;displayUrl&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;a&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;p&lt;/span&gt;
        &lt;span class=&quot;token attr-name&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;token script language-javascript&quot;&gt;&lt;span class=&quot;token script-punctuation punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;styles&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;description&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
        &lt;span class=&quot;token attr-name&quot;&gt;dangerouslySetInnerHTML&lt;/span&gt;&lt;span class=&quot;token script language-javascript&quot;&gt;&lt;span class=&quot;token script-punctuation punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token literal-property property&quot;&gt;__html&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; props&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;description &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
      &lt;span class=&quot;token punctuation&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;a&lt;/span&gt;
        &lt;span class=&quot;token attr-name&quot;&gt;href&lt;/span&gt;&lt;span class=&quot;token script language-javascript&quot;&gt;&lt;span class=&quot;token script-punctuation punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token template-string&quot;&gt;&lt;span class=&quot;token template-punctuation string&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;https://twitter.com/&lt;/span&gt;&lt;span class=&quot;token interpolation&quot;&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;${&lt;/span&gt;props&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;handle&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token template-punctuation string&quot;&gt;`&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
        &lt;span class=&quot;token attr-name&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;token script language-javascript&quot;&gt;&lt;span class=&quot;token script-punctuation punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;styles&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;linkButton&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
        &lt;span class=&quot;token attr-name&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;token script language-javascript&quot;&gt;&lt;span class=&quot;token script-punctuation punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token literal-property property&quot;&gt;backgroundColor&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; props&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;hex &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
      &lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
        Twitter
      &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;a&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;I started the refactor by defining a default &lt;code&gt;--theme-color&lt;/code&gt; CSS variable on the &lt;code&gt;.profile&lt;/code&gt; class, then setting it to color the user’s display name and profile link “button.”&lt;/p&gt;
&lt;div class=&quot;gatsby-code-title code-snippet-title&quot;&gt;profile.module.scss&lt;/div&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;scss&quot;&gt;&lt;pre class=&quot;language-scss&quot;&gt;&lt;code class=&quot;language-scss&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.profile &lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;--theme-color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; black&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token selector&quot;&gt;.name &lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--theme-color&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token selector&quot;&gt;.linkButton &lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; white&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;background-color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--theme-color&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Then I went back to the &lt;code&gt;.profile&lt;/code&gt; class and used the &lt;code&gt;--theme-color&lt;/code&gt; variable to color and set &lt;code&gt;:focus&lt;/code&gt; pseudo-classes on all the anchor tags.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;scss&quot;&gt;&lt;pre class=&quot;language-scss&quot;&gt;&lt;code class=&quot;language-scss&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.profile &lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;--theme-color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; black&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;gatsby-highlight-code-line&quot;&gt;  &lt;span class=&quot;token selector&quot;&gt;a &lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;gatsby-highlight-code-line&quot;&gt;    &lt;span class=&quot;token property&quot;&gt;text-decoration&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; none&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;gatsby-highlight-code-line&quot;&gt;    &lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--profile-theme-color&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;gatsby-highlight-code-line&quot;&gt;&lt;/span&gt;&lt;span class=&quot;gatsby-highlight-code-line&quot;&gt;    &lt;span class=&quot;token selector&quot;&gt;&lt;span class=&quot;token parent important&quot;&gt;&amp;amp;&lt;/span&gt;:focus &lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;gatsby-highlight-code-line&quot;&gt;      &lt;span class=&quot;token property&quot;&gt;outline&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; none&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;gatsby-highlight-code-line&quot;&gt;      &lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; white&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;gatsby-highlight-code-line&quot;&gt;      &lt;span class=&quot;token property&quot;&gt;background-color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--theme-color&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;gatsby-highlight-code-line&quot;&gt;      &lt;span class=&quot;token property&quot;&gt;box-shadow&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--theme-color&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; 0px 0px 0px 1px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;gatsby-highlight-code-line&quot;&gt;    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;gatsby-highlight-code-line&quot;&gt;  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Then I targeted the profile’s &lt;code&gt;svg&lt;/code&gt; tags to style the location and website icons.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;css&quot;&gt;&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.profile&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token comment&quot;&gt;/* ... */&lt;/span&gt;
&lt;span class=&quot;gatsby-highlight-code-line&quot;&gt;  &lt;span class=&quot;token selector&quot;&gt;svg&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;gatsby-highlight-code-line&quot;&gt;    &lt;span class=&quot;token property&quot;&gt;fill&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--theme-color&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;gatsby-highlight-code-line&quot;&gt;  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Then I added the focus for the &lt;code&gt;.linkButton&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;css&quot;&gt;&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.linkButton&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; white&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;background-color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--theme-color&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;gatsby-highlight-code-line&quot;&gt;  &lt;span class=&quot;token selector&quot;&gt;&amp;amp;:focus&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;gatsby-highlight-code-line&quot;&gt;    &lt;span class=&quot;token property&quot;&gt;box-shadow&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; inset &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--theme-color&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; 0px 0px 0px 1px&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; inset white 0px 0px&lt;/span&gt;&lt;span class=&quot;gatsby-highlight-code-line&quot;&gt;        0px 2px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;gatsby-highlight-code-line&quot;&gt;  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Then I removed all the original inline styles and added a single declaration back in to theme the variable on the &lt;code&gt;.profile&lt;/code&gt; container:&lt;/p&gt;
&lt;div class=&quot;gatsby-code-title code-snippet-title&quot;&gt;profile.js&lt;/div&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;jsx&quot;&gt;&lt;pre class=&quot;language-jsx&quot;&gt;&lt;code class=&quot;language-jsx&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;token function-variable function&quot;&gt;Profile&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;
&lt;span class=&quot;gatsby-highlight-code-line&quot;&gt;    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;div&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;token script language-javascript&quot;&gt;&lt;span class=&quot;token script-punctuation punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token string-property property&quot;&gt;&quot;--theme-color&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; props&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;hex &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;token script language-javascript&quot;&gt;&lt;span class=&quot;token script-punctuation punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;styles&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;profile&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;      // ...&lt;/span&gt;
&lt;span class=&quot;token plain-text&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;That change resulted in this much-improved tabbing experience:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/notes/2019/css-variables/new-focus.gif&quot; alt=&quot;gif test&quot;&gt;&lt;/p&gt;
&lt;h3 id=&quot;the-source-plugin&quot;&gt;The source plugin&lt;/h3&gt;
&lt;p&gt;Then I turned my attention to the Gatsby source Twitter plugin, which created and styled the Twitter bio anchor links (steps 1-5 above). That section of code had 6 specific &lt;code&gt;profileColor&lt;/code&gt; references and looked like this:&lt;/p&gt;
&lt;div class=&quot;gatsby-code-title code-snippet-title&quot;&gt;gatsby-node.js&lt;/div&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;javascript&quot;&gt;&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code class=&quot;language-javascript&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; description &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; profile&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;description&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; descriptionUrls &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; profile&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;entities&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;description&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;urls&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; profileColor &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; profile&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;profile_link_color&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;descriptionUrls&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;length &lt;span class=&quot;token operator&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;undefined&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; i &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; i &lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt; descriptionUrls&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;length&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;++&lt;/span&gt;i&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    description &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; description&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;replace&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;
      descriptionUrls&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;i&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;url&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;token template-string&quot;&gt;&lt;span class=&quot;token template-punctuation string&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&amp;lt;a href=&quot;&lt;/span&gt;&lt;span class=&quot;token interpolation&quot;&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;${&lt;/span&gt;descriptionUrls&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;i&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;url&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot; 
      style=&quot;color: #&lt;/span&gt;&lt;span class=&quot;token interpolation&quot;&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;${&lt;/span&gt;profileColor&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;&gt;
          &lt;/span&gt;&lt;span class=&quot;token interpolation&quot;&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;${&lt;/span&gt;descriptionUrls&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;i&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;display_url&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;
      &amp;lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;token template-punctuation string&quot;&gt;`&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

description &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; Autolinker&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;link&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;description&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token literal-property property&quot;&gt;mention&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;twitter&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;token literal-property property&quot;&gt;hashtag&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;twitter&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;token function-variable function&quot;&gt;replaceFn&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;match&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;switch&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;match&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;getType&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;token keyword&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;url&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; tag &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; match&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;buildTag&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
        tag&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;setAttr&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;style&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;color: #&quot;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; profileColor&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; tag&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

      &lt;span class=&quot;token keyword&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;mention&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; mention &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; match&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;getMention&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;token template-string&quot;&gt;&lt;span class=&quot;token template-punctuation string&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&amp;lt;a href=&quot;https://twitter.com/&lt;/span&gt;&lt;span class=&quot;token interpolation&quot;&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;${&lt;/span&gt;mention&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;  
          style=&quot;color: #&lt;/span&gt;&lt;span class=&quot;token interpolation&quot;&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;${&lt;/span&gt;profileColor&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;&gt;
            @&lt;/span&gt;&lt;span class=&quot;token interpolation&quot;&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;${&lt;/span&gt;mention&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;
          &amp;lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;token template-punctuation string&quot;&gt;`&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;token keyword&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;email&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; email &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; match&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;getEmail&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;token template-string&quot;&gt;&lt;span class=&quot;token template-punctuation string&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&amp;lt;a href=&quot;mailto:&quot;&lt;/span&gt;&lt;span class=&quot;token interpolation&quot;&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;${&lt;/span&gt;email&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;  
          style=&quot;color: #&lt;/span&gt;&lt;span class=&quot;token interpolation&quot;&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;${&lt;/span&gt;profileColor&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;&gt;
            &lt;/span&gt;&lt;span class=&quot;token interpolation&quot;&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;${&lt;/span&gt;email&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;
          &amp;lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;token template-punctuation string&quot;&gt;`&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;token keyword&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;hashtag&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; hashtag &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; match&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;getHashtag&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;token template-string&quot;&gt;&lt;span class=&quot;token template-punctuation string&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&amp;lt;a href=&quot;https://twitter.com/hashtag/&lt;/span&gt;&lt;span class=&quot;token interpolation&quot;&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;${&lt;/span&gt;hashtag&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;  
          style=&quot;color: #&lt;/span&gt;&lt;span class=&quot;token interpolation&quot;&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;${&lt;/span&gt;profileColor&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;&gt;
            #&lt;/span&gt;&lt;span class=&quot;token interpolation&quot;&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;${&lt;/span&gt;hashtag&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;
          &amp;lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;token template-punctuation string&quot;&gt;`&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; description&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Since the CSS I wrote earlier targeted anchor tags in the &lt;code&gt;.profile&lt;/code&gt; class, the inline styles here became unneccessary.&lt;/p&gt;
&lt;p&gt;I deleted them from the script, simplifying the file considerably and making the profile component itself the source of all profile styling. In doing so, it should be easier and more predictable to update styles in the future.&lt;/p&gt;
&lt;h2 id=&quot;the-page-theme-variables&quot;&gt;The page theme variables&lt;/h2&gt;
&lt;p&gt;Next up I tackled page level theming. In the previous example, I applied a theme to the contents of a component. But for page level theming, I needed to theme the contents of a component based on the color scheme of its &lt;em&gt;parent&lt;/em&gt; container.&lt;/p&gt;
&lt;p&gt;The navigation is a good example of this. If the navigation theme is “light”, it means the navigation is sitting in a white container and should have a gray logo and gray links to stand out. If the theme is dark, it means the navigation is sitting in a gray container and should have a white logo and links to stand out.&lt;/p&gt;
&lt;p&gt;Of course, the initial visible styles were just part of the puzzle. Like the designer profiles, I also wanted to fix the focus states in other parts of the site.&lt;/p&gt;
&lt;h3 id=&quot;the-nav-component&quot;&gt;The nav component&lt;/h3&gt;
&lt;p&gt;Here’s what the JSX looked like at the start of the CSS variables refactor:&lt;/p&gt;
&lt;div class=&quot;gatsby-code-title code-snippet-title&quot;&gt;nav.js&lt;/div&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;jsx&quot;&gt;&lt;pre class=&quot;language-jsx&quot;&gt;&lt;code class=&quot;language-jsx&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;token function-variable function&quot;&gt;Nav&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; linkColor &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;
    props&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;theme &lt;span class=&quot;token operator&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;light&quot;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;?&lt;/span&gt; styles&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;linkGray &lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; styles&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;linkWhite&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;nav&lt;/span&gt;
      &lt;span class=&quot;token attr-name&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;token script language-javascript&quot;&gt;&lt;span class=&quot;token script-punctuation punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
        props&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;theme &lt;span class=&quot;token operator&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;light&quot;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;?&lt;/span&gt; styles&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;containerWhite &lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; styles&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;containerGray
      &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Link&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;to&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;/&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Logo&lt;/span&gt;&lt;/span&gt;
          &lt;span class=&quot;token attr-name&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;token script language-javascript&quot;&gt;&lt;span class=&quot;token script-punctuation punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;styles&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;logo&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
          &lt;span class=&quot;token attr-name&quot;&gt;fill&lt;/span&gt;&lt;span class=&quot;token script language-javascript&quot;&gt;&lt;span class=&quot;token script-punctuation punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;props&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;theme &lt;span class=&quot;token operator&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;light&quot;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;rgba(38, 38, 38, 1)&quot;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;#fff&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
        &lt;span class=&quot;token punctuation&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Link&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Link&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;to&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;/about&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;token script language-javascript&quot;&gt;&lt;span class=&quot;token script-punctuation punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;linkColor&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
        About
      &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Link&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Link&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;to&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;/nominate&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;token script language-javascript&quot;&gt;&lt;span class=&quot;token script-punctuation punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;linkColor&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
        Nominate
      &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Link&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Link&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;to&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;/jobs&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;token script language-javascript&quot;&gt;&lt;span class=&quot;token script-punctuation punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;linkColor&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
        Jobs
      &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Link&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;nav&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;So, where’s the room for improvement?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I wrote three almost identical ternary operators to check if the theme is light or dark, then apply conditional styling&lt;/li&gt;
&lt;li&gt;Since the majority of the site’s pages have the light theme, the nav should have the light theme by default and the dark theme should be the override&lt;/li&gt;
&lt;li&gt;Why Did I Let a Random RGBA Value Hang Out in My Logo SVG&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Even worse, the CSS looked like this:&lt;/p&gt;
&lt;div class=&quot;gatsby-code-title code-snippet-title&quot;&gt;nav.module.scss&lt;/div&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;css&quot;&gt;&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.containerGray&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; white&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token selector&quot;&gt;.containerWhite&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; $gray&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token selector&quot;&gt;.linkGray&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; $gray&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token selector&quot;&gt;.linkWhite&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; white&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Yikes. That’s a lot of unnecessary repetition.&lt;/p&gt;
&lt;p&gt;In my global styles file, I defined a &lt;code&gt;--text&lt;/code&gt; variable and a &lt;code&gt;--background&lt;/code&gt; variable. Again, since most of the site has a white background with dark gray text, I used those as the defaults.&lt;/p&gt;
&lt;div class=&quot;gatsby-code-title code-snippet-title&quot;&gt;global.scss&lt;/div&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;css&quot;&gt;&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;:root&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;--gray&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;rgba&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;30&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; 30&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; 30&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; 1&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;--text&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--gray&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;--background&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; white&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Then I revisited the nav’s container stylings. Instead of having separate &lt;code&gt;containerGray&lt;/code&gt; and &lt;code&gt;containerWhite&lt;/code&gt; classes, I used a single &lt;code&gt;container&lt;/code&gt; class where the text is &lt;code&gt;--text&lt;/code&gt; colored and the background is &lt;code&gt;--background&lt;/code&gt; colored. Simple enough.&lt;/p&gt;
&lt;div class=&quot;gatsby-code-title code-snippet-title&quot;&gt;nav.module.scss&lt;/div&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;css&quot;&gt;&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.container&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--text&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;background-color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--background&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;I set the logo fill to match the &lt;code&gt;--text&lt;/code&gt; color of the container, making the theme check in the SVG markup unnecessary. (To be fair, using &lt;code&gt;fill: currentColor&lt;/code&gt; would have worked just as well here.)&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;css&quot;&gt;&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.logo&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; block&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 150px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;fill&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--text&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Ditto for the links.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;css&quot;&gt;&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.link&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--text&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Then I added in the focus states.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;css&quot;&gt;&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.link&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--text&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;gatsby-highlight-code-line&quot;&gt;  &lt;span class=&quot;token selector&quot;&gt;&amp;amp;:focus&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;gatsby-highlight-code-line&quot;&gt;    &lt;span class=&quot;token property&quot;&gt;outline&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; none&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;gatsby-highlight-code-line&quot;&gt;    &lt;span class=&quot;token property&quot;&gt;text-decoration&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; none&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;gatsby-highlight-code-line&quot;&gt;    &lt;span class=&quot;token property&quot;&gt;box-shadow&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--background&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; 0px 0px 0px 2px&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--text&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; 0px 0px 0px 3px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;gatsby-highlight-code-line&quot;&gt;  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Finally, I deleted the original ternaries, the extra &lt;code&gt;linkColor&lt;/code&gt; variable and the inline fill styles on the logo. Now the component has much better defaults and a single check for theming:&lt;/p&gt;
&lt;div class=&quot;gatsby-code-title code-snippet-title&quot;&gt;nav.js&lt;/div&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;jsx&quot;&gt;&lt;pre class=&quot;language-jsx&quot;&gt;&lt;code class=&quot;language-jsx&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;token function-variable function&quot;&gt;Nav&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;nav&lt;/span&gt;
      &lt;span class=&quot;token attr-name&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;token script language-javascript&quot;&gt;&lt;span class=&quot;token script-punctuation punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;styles&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;container&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
      &lt;span class=&quot;token attr-name&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;token script language-javascript&quot;&gt;&lt;span class=&quot;token script-punctuation punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;token string-property property&quot;&gt;&quot;--background&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; props&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;theme &lt;span class=&quot;token operator&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;dark&quot;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;var(--gray)&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;token string-property property&quot;&gt;&quot;--text&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; props&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;theme &lt;span class=&quot;token operator&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;dark&quot;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;white&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Link&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;to&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;/&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Logo&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;token script language-javascript&quot;&gt;&lt;span class=&quot;token script-punctuation punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;styles&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;logo&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Link&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Link&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;to&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;/about&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;token script language-javascript&quot;&gt;&lt;span class=&quot;token script-punctuation punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;styles&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;link&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
        About
      &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Link&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Link&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;to&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;/nominate&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;token script language-javascript&quot;&gt;&lt;span class=&quot;token script-punctuation punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;styles&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;link&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
        Nominate
      &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Link&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Link&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;to&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;/jobs&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;token script language-javascript&quot;&gt;&lt;span class=&quot;token script-punctuation punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;styles&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;link&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
        Jobs
      &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Link&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;nav&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3 id=&quot;the-filter-checkbox-component&quot;&gt;The filter checkbox component&lt;/h3&gt;
&lt;p&gt;Next, I wanted to add focus states to the checkboxes in the sidebar that filter the designers on display in the main section. On mobile, the filters have dark gray text with a white background and on desktop, the color scheme reverses.&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;gatsby-resp-image-figure&quot; style=&quot;&quot;&gt;
    &lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1000px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 42.4%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAICAYAAAD5nd/tAAAACXBIWXMAAAsTAAALEwEAmpwYAAACK0lEQVQoz2WR3UuTARTG379BzAWmMLZA6CoCJyhtF931oYIXjSaYCINA9nlhYFlDMM35MRT0piYWfQxtsFeXzshi0WoQm4NRs9kyJyy3ai7NvWq/2Bt003NzOJzDOQ/PTzAYDLS0tFBWVoZSqSSVSjExMUFnZyfV1dW0t7czPDzM0tISXq8Xp9PJ5OQkkUiEkZERfD4fiURC3h8bG0Noa7uMyWRCp9PR0NBAJpORe4VCQVVVFR0dHRiNRux2Ox6PR342PT1NPB6Xjej1egKBAPX19fT09CAsLCyQTqfJ5/Oyi62tLWw2GyqViiPl5fTd6icciSL6n7KWTLD28QPr6+vkv2fwznqYn58j8CLIHfcUsVgMIRQKIUkSJa0mk+RyOSwWC2q1Wo7B5XLJMw4P5LJ/+Lfd3Ttg/zf/SQgGgxQKBYqSxLPwG76WHFpt1NTUoKiooG/QyWr2B2+TX9j+mYPdT0jbn/mVi7GzsYj0LUpqB+IFSO+BEI1G/11fWVkhm81itVpRqdUcVSi4ev0G9xafM3R/htehZSIvH7CReMX2ZphkeIrN937Ed0l6Hy0zE4wilMiIoojf78ftdssZms1mjlVWymBaDZdo1V9Ec+ok3d3XMF4xMesVefj4CbozZ3H0DtBlM3PiuJIuu6VEuY3a2lo0Gg1NjY0Ui0UcDgd1dXVotVqZ7k2Hg6bmZsbHx3GNjjI3JyKKPi6cP8eQc5D+gduc1uq463bzB7PjxZ/wSFesAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;sidebar&quot;
        title=&quot;sidebar&quot;
        src=&quot;/static/9a168df0132af68d4c00884a5e2b54b7/00d43/sidebar.png&quot;
        srcset=&quot;/static/9a168df0132af68d4c00884a5e2b54b7/63868/sidebar.png 250w,
/static/9a168df0132af68d4c00884a5e2b54b7/0b533/sidebar.png 500w,
/static/9a168df0132af68d4c00884a5e2b54b7/00d43/sidebar.png 1000w,
/static/9a168df0132af68d4c00884a5e2b54b7/aa440/sidebar.png 1500w,
/static/9a168df0132af68d4c00884a5e2b54b7/e8950/sidebar.png 2000w,
/static/9a168df0132af68d4c00884a5e2b54b7/b1e12/sidebar.png 3280w&quot;
        sizes=&quot;(max-width: 1000px) 100vw, 1000px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
    &lt;/span&gt;
    &lt;figcaption class=&quot;gatsby-resp-image-figcaption&quot;&gt;sidebar&lt;/figcaption&gt;
  &lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Structurally, the filter checkbox component is a list item that contains a checkbox input:&lt;/p&gt;
&lt;div class=&quot;gatsby-code-title code-snippet-title&quot;&gt;filter-checkbox.js&lt;/div&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;jsx&quot;&gt;&lt;pre class=&quot;language-jsx&quot;&gt;&lt;code class=&quot;language-jsx&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;token function-variable function&quot;&gt;filterCheckbox&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;li&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;token script language-javascript&quot;&gt;&lt;span class=&quot;token script-punctuation punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;styles&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;item&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;input&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;checkbox&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;token script language-javascript&quot;&gt;&lt;span class=&quot;token script-punctuation punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;styles&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;input&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;label&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;htmlFor&lt;/span&gt;&lt;span class=&quot;token script language-javascript&quot;&gt;&lt;span class=&quot;token script-punctuation punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;props&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;id&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;token script language-javascript&quot;&gt;&lt;span class=&quot;token script-punctuation punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;styles&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;label&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;span&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;token script language-javascript&quot;&gt;&lt;span class=&quot;token script-punctuation punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;styles&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;span&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;props&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;title&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;span&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;label&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token plain-text&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;li&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;I went into the outermost &lt;code&gt;.container&lt;/code&gt; class and looked at the original CSS.&lt;/p&gt;
&lt;div class=&quot;gatsby-code-title code-snippet-title&quot;&gt;filterCheckbox.module.scss&lt;/div&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;scss&quot;&gt;&lt;pre class=&quot;language-scss&quot;&gt;&lt;code class=&quot;language-scss&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.container &lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--gray&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;background-color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; white&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@media&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;min-width&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token variable&quot;&gt;$desktop&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token property&quot;&gt;background-color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--gray&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; white&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Using the same approach as before, I changed the color to the &lt;code&gt;--text&lt;/code&gt; color variable and the background to the &lt;code&gt;--background&lt;/code&gt; variable.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;scss&quot;&gt;&lt;pre class=&quot;language-scss&quot;&gt;&lt;code class=&quot;language-scss&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.container &lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--text&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;background-color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--background&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Then, for within a media query, I redefined the value of the variable. On desktop, the background becomes gray and the text becomes white.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;scss&quot;&gt;&lt;pre class=&quot;language-scss&quot;&gt;&lt;code class=&quot;language-scss&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.container &lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--text&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;background-color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--background&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;gatsby-highlight-code-line&quot;&gt;  &lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@media&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;min-width&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token variable&quot;&gt;$desktop&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;gatsby-highlight-code-line&quot;&gt;    &lt;span class=&quot;token property&quot;&gt;--background&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--gray&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;gatsby-highlight-code-line&quot;&gt;    &lt;span class=&quot;token property&quot;&gt;--text&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; white&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;gatsby-highlight-code-line&quot;&gt;  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;It was about this time that I realized that the CSS I wrote was causing the checkboxes to be skipped entirely by keyboard navigation because I had given the default input checkbox a class of display none.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;scss&quot;&gt;&lt;pre class=&quot;language-scss&quot;&gt;&lt;code class=&quot;language-scss&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.input &lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; none&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;As it turns out, it’s better to use absolute positioning and opacity to get the same effect and keep the functionality accessible to keyboard navigators.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;scss&quot;&gt;&lt;pre class=&quot;language-scss&quot;&gt;&lt;code class=&quot;language-scss&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.input &lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; absolute&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;opacity&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 0&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;z-index&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; -1&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 1px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 1px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Then I added the variables and focus state styles.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;scss&quot;&gt;&lt;pre class=&quot;language-scss&quot;&gt;&lt;code class=&quot;language-scss&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.item label:before &lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;border&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 1px solid &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--text&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token selector&quot;&gt;.item input[type=&quot;checkbox&quot;]:checked ~ label:before &lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;background-color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--text&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token selector&quot;&gt;.input:focus ~ label:before &lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;box-shadow&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 0 0 0 3px &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--background&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; 0 0 0 4px &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--text&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Since the filters appear in the &lt;code&gt;.container&lt;/code&gt;, they now inherit the variable color changes set above in the media query.&lt;/p&gt;
&lt;p&gt;Woohoo! After these changes, the tabbing experience improved to this:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/notes/2019/css-variables/nav-focus.gif&quot; alt=&quot;A gif of the site&amp;#x27;s sidebar and navigation focus states.&quot;&gt;&lt;/p&gt;
&lt;h2 id=&quot;the-spacing-variable&quot;&gt;The spacing variable&lt;/h2&gt;
&lt;p&gt;The last area that I wanted to refactor with CSS variables was the site’s spacing. There are a few places throughout the site that required the same spacing values to maintain a nice, even layout.&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;gatsby-resp-image-figure&quot; style=&quot;&quot;&gt;
    &lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1000px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 42.4%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAICAYAAAD5nd/tAAAACXBIWXMAAAsTAAALEwEAmpwYAAACSklEQVQozyWMW0sTAACF9yOy8ELiZkkZRC9qN8ksenMrIyYIOUsjTSnUOV3eEC+blrPEazjDS2vNS7o504V3C4tcxKjUCcvUDNymZqsZfWGeh8N3vocjkCdfJyEujuPCQE4dOYzD4cD4WMudtDRCg4PJk15GXVqCxdxPd1M9lRVqGjRVzAwNUKXR0Nveyuz0a26lp1OTp0SgTLxK1s0bJJ2N5MrpE6yurlKWncUeHx9EQUHcjZdyLTGRzIwM9E0N1DU20qptxjY1QaxUilQcw2BXJyejoihIS0UwrGvHtbSId/YjY4anOJ1OKpU5CIVCAnx9aSnM49X0G0ymfhbeTmG3z+KYn8dtt9HT202/Qc9gn4nmDh0fRocRTL4YwAPgdvLJOoPL7Uadk41IJMJ3316eqUv5n20vrDvZ/rs7t1ZW8e7ATv3c3JUbTgTjJiObHg+/V74yZLGw5nJRkavgYEgI+/39aCkuwrb8nek5BxuLn8GzwPbaLJ45C1srA3gXR5j/tsn7X/BlyYnAOjay+/5jHevEOC6XG3WuAqFIRKC/P9XyTLTGQe63GZgyG7COt7Nke8m6zYh9ppnldx10j86Q1zmJrseC4KGqnD6zGbNeh7auFufaGiqFHD8/fwIDApDHiomLvUT4saMoU1JITrlNl76LJ/WPOHNBQlFuIYokGaGHDqCQxSNIkMkICwsjPCICsUTCH6+XWlUZ4eERnI+Opjw9lfz8fCRiMTVlJVQ/qMb0vBtjRxsxF8XcKylGVVBAZPQ5mjVV/AOPb8E1P+umxQAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;page spacing&quot;
        title=&quot;page spacing&quot;
        src=&quot;/static/243be4abaae630d4143ffb27022265ed/00d43/page-spacing.png&quot;
        srcset=&quot;/static/243be4abaae630d4143ffb27022265ed/63868/page-spacing.png 250w,
/static/243be4abaae630d4143ffb27022265ed/0b533/page-spacing.png 500w,
/static/243be4abaae630d4143ffb27022265ed/00d43/page-spacing.png 1000w,
/static/243be4abaae630d4143ffb27022265ed/aa440/page-spacing.png 1500w,
/static/243be4abaae630d4143ffb27022265ed/e8950/page-spacing.png 2000w&quot;
        sizes=&quot;(max-width: 1000px) 100vw, 1000px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
    &lt;/span&gt;
    &lt;figcaption class=&quot;gatsby-resp-image-figcaption&quot;&gt;page spacing&lt;/figcaption&gt;
  &lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;On the homepage, that meant using the same value for the padding of the sidebar, the padding of the main section, and the vertical gutter between the profile columns.&lt;/p&gt;
&lt;p&gt;I started by defining my spacing variable, which I called &lt;code&gt;--page-shell-padding&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&quot;gatsby-code-title code-snippet-title&quot;&gt;global.scss&lt;/div&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;scss&quot;&gt;&lt;pre class=&quot;language-scss&quot;&gt;&lt;code class=&quot;language-scss&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;:root &lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token comment&quot;&gt;/* ... */&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;--page-shell-padding&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 24px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Of course, desktop viewports have more screen to work with and I wanted the spacing to grow accordingly. Inside a media query, I gave the &lt;code&gt;--page-shell-padding&lt;/code&gt; variable a larger value on desktop. In my opinion, media queries are some of the handiest places to use CSS variables.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;scss&quot;&gt;&lt;pre class=&quot;language-scss&quot;&gt;&lt;code class=&quot;language-scss&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;:root &lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;--page-shell-padding&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 24px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@media&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;min-width&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token variable&quot;&gt;$desktop&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token property&quot;&gt;--page-shell-padding&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 32px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Then I used it throughout the site like so:&lt;/p&gt;
&lt;div class=&quot;gatsby-code-title code-snippet-title&quot;&gt;index.module.scss&lt;/div&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;scss&quot;&gt;&lt;pre class=&quot;language-scss&quot;&gt;&lt;code class=&quot;language-scss&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.main &lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token comment&quot;&gt;/* ... */&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;padding&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--page-shell-padding&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token selector&quot;&gt;.sidebar &lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token comment&quot;&gt;/* ... */&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;padding&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--page-shell-padding&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token selector&quot;&gt;.formSubmit &lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token comment&quot;&gt;/* ... */&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;margin&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--page-shell-padding&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; 0&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token selector&quot;&gt;.backButton &lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token comment&quot;&gt;/* ... */&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;margin-top&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--page-shell-padding&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;padding-top&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--page-shell-padding&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The variable became especially useful for creating spacing relationships when I needed just a bit more or less space than the value defined. For example, in the grid of profiles, I wanted the gap between the horizontal rows to be larger than the gap between the vertical columns. Using the CSS &lt;code&gt;calc&lt;/code&gt; function, I multiplied the variable by 1.5 and got value that worked well.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;scss&quot;&gt;&lt;pre class=&quot;language-scss&quot;&gt;&lt;code class=&quot;language-scss&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.profileContainer &lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; grid&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;grid-gap&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;calc&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--page-shell-padding &lt;span class=&quot;token operator&quot;&gt;*&lt;/span&gt; 1.5&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;--page-shell-padding&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The best part here is that the relationship stays the same as the variable changes across viewports without any additional media queries.&lt;/p&gt;
&lt;h2 id=&quot;takeaways&quot;&gt;Takeaways&lt;/h2&gt;
&lt;p&gt;All in all, I’m happy with the progress I made in this CSS refactor. As always, there’s still a million more things that need fixing, but I can safely say that it’s much clearer and cleaner than the first two versions of the site.&lt;/p&gt;
&lt;p&gt;My favorite parts were definitely giving the focus states proper attention and creating a more cohesive feel throughout the UI. Even as someone who works on design systems full-time, I was surprised by how many divergent styles and states I was able to introduce to the site when I wasn’t paying close attention to the CSS. The process of writing the focus state styles actually helped surface this more than anything else, and it led to me tidying up lots of other little inconsistencies.&lt;/p&gt;
&lt;p&gt;I’m also still working to suss out the balance I want to strike between writing code that is neat and writing code that is clear. Though conventional wisdom states “do not repeat yourself,” I think repetition can be valuable if it makes it easier to predict what the code’s output will be.&lt;/p&gt;
&lt;p&gt;There are a whole bunch of other Women Who Design announcements and updates to cover in the very near future, so I’ll leave it at that for now. It’s still nutty to me that this project is still alive and kicking almost two years later, so here’s to an exciting start to 2019!&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Moving to Gatsby]]></title><description><![CDATA[Jekyll was great for a while, but eventually I got tired of fighting with Ruby and gulp and other things about my setup that are probably…]]></description><link>https://julesforrest.com/notes/2018/moving-to-gatsby/</link><guid isPermaLink="false">https://julesforrest.com/notes/2018/moving-to-gatsby/</guid><pubDate>Sun, 28 Jan 2018 21:19:33 GMT</pubDate><content:encoded>&lt;p&gt;Jekyll was great for a while, but eventually I got tired of fighting with Ruby and gulp and other things about my setup that are probably easily fixable with moderate amounts of enthusiasm … but that enthusiasm is generally a lot easier to muster if I’m working on something new and shiny. So, onto something new and shiny.&lt;/p&gt;
&lt;p&gt;Since I’ve been using React a lot at work, rebuilding my site with &lt;a href=&quot;https://www.gatsbyjs.org/&quot;&gt;Gatsby&lt;/a&gt;, a static-site generator for React, seemed like a good opportunity to futz around with it a bit more.&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;gatsby-resp-image-figure&quot; style=&quot;&quot;&gt;
    &lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1000px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 47.599999999999994%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAACXBIWXMAABYlAAAWJQFJUiTwAAACGUlEQVQoz1WSW2sTURRG57f4IqigaBR8UfBf+CAqaqoUlKpFH6SxvoggaIVc1aZVLCJYRFAhN2NjVRAClqgttNGMmc49ZiYzmWvyydnRmO5hsYf9sM4+h49TRB1mx0QYBvB9H57nEa7rIggC9Pt9/Kvys29IXc4jO1Wmfv7QLE7vSWJsfwbjBx9Q56RfOuxOF57rE07XQxiECENGbyirLK4icTE3kE0WcOFwFqd2JxHdlyaYjHWuWtpAtVRH7QOP2vKA0P8vYrW0+B3xiRzmYu+Qmsz/lSUQjaRxZm9qC9zK8k+sVQX8Vjuw2g4c20dvZLOtssJQNhZJD7cbhdNEAy3FhGUOrj1a71+sInkpj0c3lnD/ahETR+Zoi7MHMiQchYQRJpQMqEIbhm7BMh247A39HooLNcyMv0HmShF3zr0m0dFtd3Fs+z0c3xHHyV0J4sRO9h8nKXtTzurYsK0uWLdMG7Zt48dXGbnHX1B8ukIs3Krg4bUS5qfLyE69xWysiNlYAdnpErLXi3hys4LnM59wO/oSnCiKEARhCM/zcBwHQc+DrIjQdAUdywDQoxkrq2tC0WRoLQWttgbPd2n+Ob8OTpZkEKIESZKgqirlz7IsNBo8HdBsNsE3eGxuipRVTdNQr9chNAWab6zXSf7x1Ro4FmAWXvr6/WGQ2ZaKokBVFJhGG7bdpbCzMgwDsixD13WSm4ZJN2DCP5poj1FEmxuuAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Gatsby homepage&quot;
        title=&quot;Gatsby homepage&quot;
        src=&quot;/static/88812f0567d1dcd8691399b85fd1be05/00d43/gatsby.png&quot;
        srcset=&quot;/static/88812f0567d1dcd8691399b85fd1be05/63868/gatsby.png 250w,
/static/88812f0567d1dcd8691399b85fd1be05/0b533/gatsby.png 500w,
/static/88812f0567d1dcd8691399b85fd1be05/00d43/gatsby.png 1000w,
/static/88812f0567d1dcd8691399b85fd1be05/aa440/gatsby.png 1500w,
/static/88812f0567d1dcd8691399b85fd1be05/e8950/gatsby.png 2000w,
/static/88812f0567d1dcd8691399b85fd1be05/39148/gatsby.png 2876w&quot;
        sizes=&quot;(max-width: 1000px) 100vw, 1000px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
    &lt;/span&gt;
    &lt;figcaption class=&quot;gatsby-resp-image-figcaption&quot;&gt;Gatsby homepage&lt;/figcaption&gt;
  &lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Gatsby appealed to me for a couple of other reasons. First of all, my old site wasn’t handling images that well and I knew Gatsby would be a lot better at optimizing image performance out of the box and second of all, did I mention how much I hate gulp? Dustin Schau of Object Partners wrote a great post called &lt;a href=&quot;https://www.gatsbyjs.org/blog/2017-07-19-creating-a-blog-with-gatsby/&quot;&gt;Creating a Blog with Gatsby&lt;/a&gt; that I followed to get started.&lt;/p&gt;
&lt;h2 id=&quot;initial-observations&quot;&gt;Initial observations&lt;/h2&gt;
&lt;p&gt;Holy crap, Gatsby is a lot easier to get up and running than Jekyll. Granted, I already had a lot of my development environment in place thanks to my old site and a few other projects, but with Dustin’s instructions, it felt a lot less painful than the first time I had to install a non-system Ruby with rbenv and all that jazz.&lt;/p&gt;
&lt;p&gt;The plugins are also huge. After about two paragraphs of Dustin’s post, it was pretty obvious that plugins are probably the main reason a lot of people use Gatsby in the first place, but I didn’t realize that before I started. By running &lt;code&gt;yarn add gatsby-plugin-sass&lt;/code&gt; and adding &lt;code&gt;gatsby-plugin-sass&lt;/code&gt; to the plugin section of my &lt;code&gt;gatsby-config.js&lt;/code&gt; file, I was able to start using Sass immediately. That would have taken me about five extra steps and hours of fiddling with gulp when I was using Jekyll, plus it’s all automatically autoprefixed.&lt;/p&gt;
&lt;p&gt;Lastly, Gatsby eliminates most of the need for Browsersync. Getting Browsersync working the first time drove me insane and thanks to the built-in Webpack/Gatsby magic, the site automatically reloads without additional configuration. It doesn’t come with a live link for me to view on my phone, but I don’t miss that part too much.&lt;/p&gt;
&lt;h2 id=&quot;-later-observations&quot;&gt;… Later observations&lt;/h2&gt;
&lt;p&gt;Okay, it wasn’t all roses. Using Sass was easier, but I quickly started to miss Jekyll’s Liquid templating language. Instead of being able to add a quick &lt;code&gt;{% if page.previous.url %}&lt;/code&gt; or &lt;code&gt;{% if page.next.url %}&lt;/code&gt; for next and previous post buttons, I had to mess with the &lt;code&gt;exports.createPages&lt;/code&gt; API to add context, which I then passed into my &lt;code&gt;blog-post.js&lt;/code&gt; template. Let’s just say: I have a lot more to learn about GraphQL.&lt;/p&gt;
&lt;p&gt;It was also weirdly a lot more effort than I was expecting to get all the head tags working, particularly for open graph. The post recommends using &lt;a href=&quot;https://github.com/nfl/react-helmet&quot;&gt;React Helmet&lt;/a&gt;, a “document head manager for React” to … manage the document head. Created by the NFL, it’s a lot more robust than what I needed for my little blog and it was a bit tedious to write all the conditionals to cover each use case. Similarly, setting a favicon also required a &lt;a href=&quot;https://github.com/Creatiwity/gatsby-plugin-favicon&quot;&gt;specific plugin&lt;/a&gt; which seemed a bit overkill but it was simple enough to install so 🤷‍♀️.&lt;/p&gt;
&lt;p&gt;While it definitely took longer to get some of my old site’s functionality working in Gatsby, the time I spent learning how to do them felt more worthwhile and broadly applicable than diving deeper into Jekyll so I didn’t mind.&lt;/p&gt;
&lt;h2 id=&quot;rss&quot;&gt;RSS&lt;/h2&gt;
&lt;p&gt;I finally have RSS on my site! (That makes this a #realblog now, right?) The &lt;a href=&quot;https://www.gatsbyjs.org/docs/plugins/&quot;&gt;Gatsby Plugin&lt;/a&gt; page lists a handy dandy &lt;a href=&quot;https://www.gatsbyjs.org/packages/gatsby-plugin-feed/&quot;&gt;feed plugin&lt;/a&gt; and with a bit of tinkering, I had it working nicely. The documentation gives a default example, but it only works if the original query includes the &lt;code&gt;slug&lt;/code&gt; field for each node. My query, which I’d written from the tutorial example, did not, so I customized the plugin options to use the &lt;code&gt;node.path.frontmatter&lt;/code&gt; data instead.&lt;/p&gt;
&lt;h2 id=&quot;other-plugins&quot;&gt;Other plugins&lt;/h2&gt;
&lt;p&gt;As Dustin’s post promised, the plugin options really seem to be where Gatsby shines. A few other useful ones I found were:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://www.gatsbyjs.org/packages/gatsby-remark-smartypants/&quot;&gt;Smartypants&lt;/a&gt;, for replacing dumb quotes with “smart” quotes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://www.gatsbyjs.org/packages/gatsby-plugin-offline/&quot;&gt;Offline&lt;/a&gt;, for making the site work offline or with a poor connection.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://www.gatsbyjs.org/packages/gatsby-plugin-google-analytics/&quot;&gt;Google Analytics&lt;/a&gt;, for quickly adding GA’s tracking ID.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://www.gatsbyjs.org/packages/gatsby-remark-prismjs/&quot;&gt;PrismJS&lt;/a&gt;, for custom syntax highlighting in markdown code blocks.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://www.gatsbyjs.org/packages/gatsby-plugin-netlify/&quot;&gt;Netlify&lt;/a&gt;, for optimizing the site to work with Netlify.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;clean-up&quot;&gt;Clean up&lt;/h2&gt;
&lt;p&gt;All in all, moving from Jekyll to Gatsby was a good weekend-sized project and a nice introduction to GraphQL. I really appreciate having less to configure in the build process, even if it cost me some simplicity elsewhere. There are a few more components I should refactor to really get the benefit of using React, but that’s a job for another day.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Grids revisited]]></title><description><![CDATA[At the start of this year, CodePen came out with its Most Hearted of 2017 list and I was excited to see that my very first grid experiment…]]></description><link>https://julesforrest.com/notes/2018/grids-revisited/</link><guid isPermaLink="false">https://julesforrest.com/notes/2018/grids-revisited/</guid><pubDate>Tue, 16 Jan 2018 17:12:33 GMT</pubDate><content:encoded>&lt;p&gt;At the start of this year, CodePen came out with its &lt;a href=&quot;https://codepen.io/2017/popular/pens/&quot;&gt;Most Hearted of 2017&lt;/a&gt; list and I was excited to see that &lt;a href=&quot;https://codepen.io/julesforrest/full/xLBbVb/&quot;&gt;my very first grid experiment&lt;/a&gt; made the list at #23. Feeling inspired again, I added a new grid to the series over the weekend: the Phoenicia Diner menu.&lt;/p&gt;
&lt;p&gt;The Phoenicia Diner in New York’s Catskill Mountains has an especially gorgeous menu and I took one with me the last time I was there, the same day I accepted my first job in San Francisco and officially started packing for California. It’s been hanging on the wall in my kitchen ever since.&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;gatsby-resp-image-figure&quot; style=&quot;&quot;&gt;
    &lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1000px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 64.8%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAANCAYAAACpUE5eAAAACXBIWXMAAAsTAAALEwEAmpwYAAACZ0lEQVQ4yz1TSW7cMBDU/7+Se4KcnVOQxDASw2ONrJUUN4nURmk0WwXddnIQQLGL1VXFZtINBus2IkwOaZViiQG364phtJgmhzl6PBXPyFSO6yWi9wrz3APYcbtu0L7Ffl4Q1wE+GCTD6HA6TQwypkE/OnSjg586Bh4OP/Hl6yc8PHyGFCnOl4i4BoS5x7oOsLbBvPTY9xkxBiSkbNsnjINB37dQfctKW9sA9xOMKfH46wGPj9/QmgrbPjNRWh+hnMAQNGL0zDET4TQ6BnSdRF2liIvHMnUQ9RHBa5zPCwOXdYBQJbQTbJViqmWOZe7/O/R9i8RZwVmR9LI4sMpxtJDijS3c7yduuMYAq2sYXXHzMFg0Msc0dbheVvSjReOaD0LKzQmotmBF49Sh1RVCMPxPluapeyfymhuRE2qqdcWCiNg5icT+I+wkmiZjYO81KvHGh7dtxLK8E5I6rUq+Ydpv6iOfW9fAGO81ETZMSP5Fk2FZekwflql2uUTOaZ6JsEYrc+z7xBlWMsc4OdxuG8LoIHSFhFQsHKiClDnnFYLm7hQHBU57pFypkvdVW3LOdZOxQr7IGKA6icTRoEYPaxoUxQHOCQaJj3z4QogwerZsTI3rdcW2DayW8BTHQLk7gaQ2FVww6DsJa2pWRIopK61r3G8bE9JYUF2KHMNgcdpntKbmUaIG0kn8KV6Q0MugIk0/dbhdIpRvoYMCcMNBZJhi4GdHUXivOGcap260eG1SJtzPM9ZtQJIVr5BtBaVq0DoEi2P+wuu+U/jx9B1llXE9Tf/wV+TvtUYWeH79DWslZFuirDP8BU2F0GpVsyqvAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Phoenicia Diner Menu&quot;
        title=&quot;Phoenicia Diner Menu&quot;
        src=&quot;/static/934a7a5a498c800cd3d1451e147775a6/00d43/menu.png&quot;
        srcset=&quot;/static/934a7a5a498c800cd3d1451e147775a6/63868/menu.png 250w,
/static/934a7a5a498c800cd3d1451e147775a6/0b533/menu.png 500w,
/static/934a7a5a498c800cd3d1451e147775a6/00d43/menu.png 1000w,
/static/934a7a5a498c800cd3d1451e147775a6/951a4/menu.png 1355w&quot;
        sizes=&quot;(max-width: 1000px) 100vw, 1000px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
    &lt;/span&gt;
    &lt;figcaption class=&quot;gatsby-resp-image-figcaption&quot;&gt;Phoenicia Diner Menu&lt;/figcaption&gt;
  &lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;For this experiment, I took a stab at defining the grid with &lt;code&gt;grid-template-areas&lt;/code&gt;, which turned out to be an very helpful way to organize the menu items and better visualize how things would move around. Other than the outer columns of ads, which I ignored to keep everything else at a readable text size, I was able to get pretty close to the original.&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;gatsby-resp-image-figure&quot; style=&quot;&quot;&gt;
    &lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1000px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 50.4%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAACXBIWXMAAAsTAAALEwEAmpwYAAABxklEQVQoz1WSuW4cQQxE9/8/yKkDB04cKVGi07tz9n2we2Zl4BlNGQIcEI0Gi8Uii5fWBBcdrQvn0ehd8CXov7fKx/2gtoK0Su+NfgjH0TjPTr8f+h6HKL61xmUQOD+zuBmbNpyb+P7jG2/vj0gLhGJJ2VAlcp6NmA3HvWDdxK+Hn9Tq6GcmFqvNLiKFffuNDyvWTpRieX975DY/03rEp10b9pZpkrFuxoQV72eenx4wfiZkSx2EXbjUmpluz+RsMObGeRY+/jSCX/BuJsSNfb/Se6bWhLOT5loL3D+EGDdSMqp0TKCE2/pOrZ5peaVki4jHmCsp7Qpc5ldEIiJZyWLaFVOLI6ddVxLCqh5cBmiZX5RoEA+lvUdVZfargp1fOM+qCseoo3jgBqk1N20wVvWlcJ5eVPqqCg3nmXWfY7xROI+GxavCnHdS3JDqOI7RYKEUR0i7un9prXyaUR2bueLCShFHDKsSjqLb9kZtSc+jite8V+e9GjZeq4RqSsHYjZQ9ITus33HBEIPB2pXWMrvbKDUhtZBz0PDRUiVRa0Rapkpm3PQlxsg8D9lFD/P/6Ih8HmxvHe890zSzLAvOOUTav5Cv+Aucy/iv5iYejAAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Print menu vs. recreation in CSS&quot;
        title=&quot;Print menu vs. recreation in CSS&quot;
        src=&quot;/static/3533516b853196f3bb99cff57db841fa/00d43/comparison.png&quot;
        srcset=&quot;/static/3533516b853196f3bb99cff57db841fa/63868/comparison.png 250w,
/static/3533516b853196f3bb99cff57db841fa/0b533/comparison.png 500w,
/static/3533516b853196f3bb99cff57db841fa/00d43/comparison.png 1000w,
/static/3533516b853196f3bb99cff57db841fa/aa440/comparison.png 1500w,
/static/3533516b853196f3bb99cff57db841fa/e8950/comparison.png 2000w,
/static/3533516b853196f3bb99cff57db841fa/e0040/comparison.png 4364w&quot;
        sizes=&quot;(max-width: 1000px) 100vw, 1000px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
    &lt;/span&gt;
    &lt;figcaption class=&quot;gatsby-resp-image-figcaption&quot;&gt;Print menu vs. recreation in CSS&lt;/figcaption&gt;
  &lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Here’s the &lt;a href=&quot;https://codepen.io/julesforrest/full/QaBvPe/&quot;&gt;final result&lt;/a&gt; on CodePen.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[CSS Grid experiments]]></title><description><![CDATA[A few weeks ago, when I started at Credit Karma, my friend Nabil gave me a book about The Intelligent Lifestyle Magazine as a welcome…]]></description><link>https://julesforrest.com/notes/2017/grid-experiments/</link><guid isPermaLink="false">https://julesforrest.com/notes/2017/grid-experiments/</guid><pubDate>Mon, 04 Sep 2017 17:12:33 GMT</pubDate><content:encoded>&lt;p&gt;A few weeks ago, when I started at Credit Karma, my friend Nabil gave me a book about &lt;a href=&quot;http://usshop.gestalten.com/the-intelligent-lifestyle-magazine.html&quot;&gt;The Intelligent Lifestyle Magazine&lt;/a&gt; as a welcome present. It’s an incredible book, full of clever and intricate print design work, and it inspired me to finally take a stab at learning CSS Grid. At the end of last week, I scanned a few layouts with my phone and decided to spend the long weekend trying to recreate the spreads from the book as accurately as I could with CSS.&lt;/p&gt;
&lt;p&gt;I started with Jen Simmons’ very helpful &lt;a href=&quot;http://jensimmons.com/post/aug-15-2017/heres-super-quick-way-try-out-css-grid&quot;&gt;Here’s a Super Quick Way to Try out CSS Grid&lt;/a&gt; post, which, as promised, walks through a super quick way to try out CSS Grid. After playing around with a few of her CodePen examples, I set to work on the first and easiest layout. For this first experiment, I wasn’t too worried about making it responsive, I just wanted to get familiar with the concepts.&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;gatsby-resp-image-figure&quot; style=&quot;&quot;&gt;
    &lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1000px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 67.60000000000001%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAOABQDASIAAhEBAxEB/8QAFwAAAwEAAAAAAAAAAAAAAAAAAAECBf/EABUBAQEAAAAAAAAAAAAAAAAAAAEE/9oADAMBAAIQAxAAAAHVp3Kgyg//xAAZEAADAAMAAAAAAAAAAAAAAAAAAREQEiH/2gAIAQEAAQUC7XRGpMf/xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAEDAQE/AT//xAAYEQEAAwEAAAAAAAAAAAAAAAACABEhAf/aAAgBAgEBPwFB1kGHlz//xAAWEAEBAQAAAAAAAAAAAAAAAAAxACD/2gAIAQEABj8CZz//xAAaEAADAQADAAAAAAAAAAAAAAAAAREhMVFh/9oACAEBAAE/IVz3OjbHRpHpjpiUUP/aAAwDAQACAAMAAAAQ5y//xAAXEQADAQAAAAAAAAAAAAAAAAAAAREx/9oACAEDAQE/EKh6f//EABkRAAIDAQAAAAAAAAAAAAAAAAERADFRcf/aAAgBAgEBPxAtLPewCBZT/8QAGxABAAEFAQAAAAAAAAAAAAAAAQARITFBsVH/2gAIAQEAAT8QpOpb57NaAwA9ioruF6qy4OIRDBP/2Q==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Grid Experiment No. 1&quot;
        title=&quot;Grid Experiment No. 1&quot;
        src=&quot;/static/fa8adb6d59434f7e6b780c5cf6b1480f/a2510/experiment1.jpg&quot;
        srcset=&quot;/static/fa8adb6d59434f7e6b780c5cf6b1480f/0479a/experiment1.jpg 250w,
/static/fa8adb6d59434f7e6b780c5cf6b1480f/41099/experiment1.jpg 500w,
/static/fa8adb6d59434f7e6b780c5cf6b1480f/a2510/experiment1.jpg 1000w,
/static/fa8adb6d59434f7e6b780c5cf6b1480f/c58a3/experiment1.jpg 1500w,
/static/fa8adb6d59434f7e6b780c5cf6b1480f/3acf0/experiment1.jpg 2000w,
/static/fa8adb6d59434f7e6b780c5cf6b1480f/e1596/experiment1.jpg 2048w&quot;
        sizes=&quot;(max-width: 1000px) 100vw, 1000px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
    &lt;/span&gt;
    &lt;figcaption class=&quot;gatsby-resp-image-figcaption&quot;&gt;Grid Experiment No. 1&lt;/figcaption&gt;
  &lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Here’s the &lt;a href=&quot;https://codepen.io/julesforrest/full/xLBbVb/&quot;&gt;final result&lt;/a&gt; on CodePen.&lt;/p&gt;
&lt;p&gt;In less than an hour, I’d gotten the layout 90% of the way there and spent another hour or so styling the page. While the grid definitely made laying out the content easier, I thought it was probably still doable with Flexbox, so I chose something a bit more complicated for experiment number two.&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;gatsby-resp-image-figure&quot; style=&quot;&quot;&gt;
    &lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1000px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 69.60000000000001%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAOABQDASIAAhEBAxEB/8QAFwABAQEBAAAAAAAAAAAAAAAAAAEDBf/EABQBAQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEAAhADEAAAAeymhFH/xAAaEAACAgMAAAAAAAAAAAAAAAAAARESAhAi/9oACAEBAAEFApMW6qSnWv/EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQMBAT8BP//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQIBAT8BP//EABsQAAEEAwAAAAAAAAAAAAAAAAABAhAREiEx/9oACAEBAAY/AlG5dNl3P//EAB0QAAICAQUAAAAAAAAAAAAAAAERACFREDFBYXH/2gAIAQEAAT8h4huJmQLjn2pYhax5oAgp/9oADAMBAAIAAwAAABAAD//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQMBAT8QP//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQIBAT8QP//EABsQAQACAwEBAAAAAAAAAAAAAAEAESExQWGx/9oACAEBAAE/EL5RUoO/I9ABKpWYgdTP4JYML2OkSwHR24BDRP/Z&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Grid Experiment No. 2&quot;
        title=&quot;Grid Experiment No. 2&quot;
        src=&quot;/static/9b14d4ecfcb0d815a96d29a9d9221050/a2510/experiment2.jpg&quot;
        srcset=&quot;/static/9b14d4ecfcb0d815a96d29a9d9221050/0479a/experiment2.jpg 250w,
/static/9b14d4ecfcb0d815a96d29a9d9221050/41099/experiment2.jpg 500w,
/static/9b14d4ecfcb0d815a96d29a9d9221050/a2510/experiment2.jpg 1000w,
/static/9b14d4ecfcb0d815a96d29a9d9221050/c58a3/experiment2.jpg 1500w,
/static/9b14d4ecfcb0d815a96d29a9d9221050/3acf0/experiment2.jpg 2000w,
/static/9b14d4ecfcb0d815a96d29a9d9221050/e1596/experiment2.jpg 2048w&quot;
        sizes=&quot;(max-width: 1000px) 100vw, 1000px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
    &lt;/span&gt;
    &lt;figcaption class=&quot;gatsby-resp-image-figcaption&quot;&gt;Grid Experiment No. 2&lt;/figcaption&gt;
  &lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Here’s the &lt;a href=&quot;https://codepen.io/julesforrest/full/yowMPw/&quot;&gt;final result&lt;/a&gt; on CodePen.&lt;/p&gt;
&lt;p&gt;This one definitely would not have been possible without CSS Grid, and it was especially satisfying to get the statistics and the captions to line up in their respective grids and columns just so. Once it was looking good on desktop, I attempted to make the layout responsive and realized I could not have organized the code worse for mobile styling. Whoops. Onto experiment number three.&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;gatsby-resp-image-figure&quot; style=&quot;&quot;&gt;
    &lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1000px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 72.39999999999999%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAOABQDASIAAhEBAxEB/8QAFwABAQEBAAAAAAAAAAAAAAAAAAECBf/EABQBAQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEAAhADEAAAAetu0oP/xAAZEAACAwEAAAAAAAAAAAAAAAACEQABECH/2gAIAQEAAQUCIrZXyKLP/8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPwE//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAgEBPwE//8QAFxABAAMAAAAAAAAAAAAAAAAAASAhkf/aAAgBAQAGPwKjGX//xAAdEAEAAgAHAAAAAAAAAAAAAAABABEQIUFRYXHB/9oACAEBAAE/IQ1R6ItEvPZPYNhK3aTRxh//2gAMAwEAAgADAAAAELDP/8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPxA//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAgEBPxA//8QAGxABAAMAAwEAAAAAAAAAAAAAAQARITFRYZH/2gAIAQEAAT8QJgx0BmaievyCBuLAixdqRrb5iiBvTEKqKFEACif/2Q==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Grid Experiment No. 3&quot;
        title=&quot;Grid Experiment No. 3&quot;
        src=&quot;/static/a652c37764908e29f321583155af5908/a2510/experiment3.jpg&quot;
        srcset=&quot;/static/a652c37764908e29f321583155af5908/0479a/experiment3.jpg 250w,
/static/a652c37764908e29f321583155af5908/41099/experiment3.jpg 500w,
/static/a652c37764908e29f321583155af5908/a2510/experiment3.jpg 1000w,
/static/a652c37764908e29f321583155af5908/c58a3/experiment3.jpg 1500w,
/static/a652c37764908e29f321583155af5908/3acf0/experiment3.jpg 2000w,
/static/a652c37764908e29f321583155af5908/e1596/experiment3.jpg 2048w&quot;
        sizes=&quot;(max-width: 1000px) 100vw, 1000px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
    &lt;/span&gt;
    &lt;figcaption class=&quot;gatsby-resp-image-figcaption&quot;&gt;Grid Experiment No. 3&lt;/figcaption&gt;
  &lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Here’s the &lt;a href=&quot;https://codepen.io/julesforrest/full/oeVKjg/&quot;&gt;final result&lt;/a&gt; on CodePen.&lt;/p&gt;
&lt;p&gt;Third time’s the charm: by styling everything for mobile-first, I was able to make this last experiment fully responsive without too much effort. This approach also allowed me to introduce the grid as needed, instead of making an elaborate grid and trying to cram things around unnecessarily for smaller screens.&lt;/p&gt;
&lt;p&gt;Now that I have the hang of it, I definitely need to get off my butt and come up with more creative layouts of my own to code.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Design Details]]></title><description><![CDATA[Last week, I chatted with Bryn Jackson and Brian Lovin on Design Details about design systems, college newspaper nerdery and Women Who…]]></description><link>https://julesforrest.com/notes/2017/design-details/</link><guid isPermaLink="false">https://julesforrest.com/notes/2017/design-details/</guid><pubDate>Wed, 09 Aug 2017 17:12:33 GMT</pubDate><content:encoded>&lt;p&gt;Last week, I chatted with Bryn Jackson and Brian Lovin on Design Details about design systems, college newspaper nerdery and Women Who Design.&lt;/p&gt;
&lt;p&gt;The episode came out today, so take a listen &lt;a href=&quot;https://spec.fm/podcasts/design-details/80536&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Building a directory with the Twitter API]]></title><description><![CDATA[I wrote a post on CSS-Tricks about building a directory with the Twitter API. Here’s a snippet: Last month, designer Helen Tran asked people…]]></description><link>https://julesforrest.com/notes/2017/build-a-directory/</link><guid isPermaLink="false">https://julesforrest.com/notes/2017/build-a-directory/</guid><pubDate>Thu, 08 Jun 2017 17:12:33 GMT</pubDate><content:encoded>&lt;p&gt;I wrote a post on CSS-Tricks about building a directory with the Twitter API.&lt;/p&gt;
&lt;p&gt;Here’s a snippet:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Last month, designer Helen Tran asked people to name five women designers that they thought were valuable to the industry:&lt;/p&gt;
&lt;p&gt;In just a few days, the tweet generated over 373 replies that named 636 women by their Twitter usernames specifically. A few people were joking around that the thread was a great place to find potential recruits and I realized I had a different need: I’m not trying to recruit anyone but I’d love to find women to follow who are excelling at things that I’m interested in or trying to learn more about. Since many people put their job title or area of expertise in their Twitter descriptions, I realized I could create a self-reported filtering system by searching each description for keywords and then display the profiles in a sortable directory.&lt;/p&gt;
&lt;p&gt;I decided to use the thread as a jumping off point and create a free-standing website: Women Who Design. Here’s how I built it.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Read the entire post on CSS-Tricks &lt;a href=&quot;https://css-tricks.com/building-directory-twitter-api/&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[WWD on Typewolf]]></title><description><![CDATA[Last week, Women Who Design finally launched and today it was featured as Typewolf’s Site of the Day. The logo is set in Druk from…]]></description><link>https://julesforrest.com/notes/2017/typewolf/</link><guid isPermaLink="false">https://julesforrest.com/notes/2017/typewolf/</guid><pubDate>Mon, 22 May 2017 17:12:33 GMT</pubDate><content:encoded>&lt;p&gt;Last week, &lt;a href=&quot;https://womenwho.design&quot;&gt;Women Who Design&lt;/a&gt; finally launched and today it was featured as Typewolf’s Site of the Day. The logo is set in &lt;a href=&quot;https://commercialtype.com/catalog/druk&quot;&gt;Druk&lt;/a&gt; from Commercial Type and the site uses Google Fonts’ &lt;a href=&quot;https://fonts.google.com/specimen/Karla&quot;&gt;Karla&lt;/a&gt; for everything else.&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;gatsby-resp-image-figure&quot; style=&quot;&quot;&gt;
    &lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1000px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 129.6%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAaCAYAAAC3g3x9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAFWklEQVRIx12V6U/URxjHt+3fYVLjK6XaVxqsiNYXGqqCUBMFjaAWNb5oPLARYvEueAASD1baVEpqTZp4JW3Ao4q6oiAs956/vS+WPVhhYYGF/TQzK+ckT+a388x85/M888ysyqNY8FqsiH6hTY+7zYo0j7A5436HE6O2A11bOz3vW3CZFVTTTtHPNTHms9oIerwE3G4Cbg9Br5d+m31mQ7/Thbmrh5anz+l4rcFns6NaSLhQUFB4rTY8Fiv9Dgc+m21W0OGUm92/doOuV28Y9A/METQnQ3MajDj0Btlb+3Qo3T1Yenqx6/Syt/bqpN+hT85zmxRM2g45X+jMJxS5Mplxmcw4jSbZi3GHwSg3cxnNM7l0TfvNiqT2WpMaqoWJFyacSlcPrS9e0qlpRvtaI61T85b3z55jaO+g3+6Yl57pb0kYcDgJuz2EXG6CLrf8LUKx6w1SWAjo27VYevuw9elmiEU00qarQBCKxHe2tNL09BmaFy9pbnpFR0sr4X4/w6Ew0XCYj4EgQ0FhIYZCIZl84Y8MDMjvQb+fkK8/SSjycPXKFWrUavbk57Ns2TKysrIQzePxYDKZUBQFu90uLRQKSd/U1BQjIyPEYjEmp6ZIJBIylyqBeuXyZaqqqqiurmb9+vVs3bpVLvJ6veh0OoxGIxaLBb8gCYWIx+OMjY0RDoeJRCKMj4+TmJpKCvrtDg4dPCjJVq1aJfucnJwZCkEgFggRYfL32Lj0CVFhok3G47Ju5SkfKiwkPT2d1amppKSkzIT86NEjdu/ezZkzZ3j37h2lpaWcOHGC2tpaAoEAarVaRjYqNhkdlQej8lmsFO7bx9r0dCk6N4c1NTUcPnyYgoIC7t+/T25uLuXl5Zw7d46GhgaOHj3Kli1b0Gg0cr6oU0l4YP9+0tamsS49XRJmZmbKCWLhsWPH5KLKykoyMjIoKiqiuLiY48eLWLp0KYsWLaK+vl7OF7dllnDtWtatWycJs7Oz5QSdYqWtz4jeZMbr89Lc3opZUXA5nWh7DTx73UxbWxuDg4NMxGKzIQvCb9asIS0tbZ5gLDbK0MeIPEFRFiFRh0NDjMVixCYmmZhipo1Go7OFvb9gLyu+/prVq1cnD2VbUvCPbg8/NvZy/Imev3Vmzr66S8nLv1BrG7irG+b8uyFOayJ0BuIkxkZwmT8J7t2TL/OxauVKKThNaHH70Ll8uCNR9FYbDxr/4fF/T2hqeUu3ycaL1i7edhnwBcLEZ0K22tgnbkhKiqxDIbht2zYp+PjhQ543NtDe2sK9u3fJ25nL8SNHKT31M0+fNJK5OYPNGZtw2G1Mjk/I1ycpuCd/prDn1mFdfT1bsrLYmZfH7du3Kcjfw4YN31JWXk5lRQVffPY5KpWK5uZmSCCfPFW/JCyYJzhNqNNqKSspoby0lO7uHh78+5Qr1TfQarVUqW+RuWsHPxwoxGA0kpiclC+PyqtYyM/bNS/k6RwORaNER0fkdwKIjCWIT0yIi8bCNhyJJAXFy7sjO4evli+fFfxEGDaZ8H/4wGhvD0PBCB98MVptQQz9w9gmhukcDdAW9RNhkkFfv/ybULmNJvK+3y7LJjU1lRXLV7A9J0cS0fQC7vwOd35loNPINTNUdE1yT4HfxhwUx3WUJIx0MkLU68em16NyGUxkZXzH4iVLJOWXixezcdNGSVhbV8cvVZUcKS7hRs0tDhfu42TREc6cKubjQBCnUaH9TTODoTAfgyHsfYLQZKbu+k0qL1zk+qXLXD17HnVFFT7Fyp/q29RWVHGj7BJ1N29x+qeTXDxVSuWFMkydXbS+fsOdWzU0NTRi7+mTd/l/5Spuup+VguwAAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Women Who Design on Typewolf&quot;
        title=&quot;Women Who Design on Typewolf&quot;
        src=&quot;/static/d70aee6b6c576a958ddf4fb878cb99fe/00d43/typewolf.png&quot;
        srcset=&quot;/static/d70aee6b6c576a958ddf4fb878cb99fe/63868/typewolf.png 250w,
/static/d70aee6b6c576a958ddf4fb878cb99fe/0b533/typewolf.png 500w,
/static/d70aee6b6c576a958ddf4fb878cb99fe/00d43/typewolf.png 1000w,
/static/d70aee6b6c576a958ddf4fb878cb99fe/07a9c/typewolf.png 1440w&quot;
        sizes=&quot;(max-width: 1000px) 100vw, 1000px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
    &lt;/span&gt;
    &lt;figcaption class=&quot;gatsby-resp-image-figcaption&quot;&gt;Women Who Design on Typewolf&lt;/figcaption&gt;
  &lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Check out the post on &lt;a href=&quot;https://www.typewolf.com/site-of-the-day/women-who-design&quot;&gt;Typewolf&lt;/a&gt;.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Women Who Design]]></title><description><![CDATA[Today I launched Women Who Design, a Twitter profile directory of inspiring women in the design industry. It aims to help people find…]]></description><link>https://julesforrest.com/notes/2017/women-who-design/</link><guid isPermaLink="false">https://julesforrest.com/notes/2017/women-who-design/</guid><pubDate>Tue, 16 May 2017 17:12:33 GMT</pubDate><content:encoded>&lt;p&gt;Today I launched &lt;a href=&quot;https://womenwho.design&quot;&gt;Women Who Design&lt;/a&gt;, a Twitter profile directory of inspiring women in the design industry. It aims to help people find notable voices to follow on Twitter that are most interesting to them.&lt;/p&gt;
&lt;p&gt;I got the idea to build Women Who Design after a recent Twitter thread generated a huge list of amazing women who work on all different aspects of design. A few people were joking around that the thread was a great place to find potential recruits and I realized I had a different need: I’m not trying to recruit anyone but I’d love to find women who are excelling at specific things that I’m interested in or trying to learn more about. It also seemed like a waste to let the list get lost in all the noise on Twitter, so I decided to use it as a jumping off point and record each woman’s profile in a free-standing, sortable directory.&lt;/p&gt;
&lt;p&gt;The site is built with Node and the Twitter API.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[A story]]></title><description><![CDATA[“She’s here for an IV — she’ll need two units of fluid, some blood work, and probably a chest scan, just to be safe.” Blankets, fresh and…]]></description><link>https://julesforrest.com/notes/2016/a-story/</link><guid isPermaLink="false">https://julesforrest.com/notes/2016/a-story/</guid><pubDate>Tue, 22 Mar 2016 17:12:33 GMT</pubDate><content:encoded>&lt;p&gt;“She’s here for an IV — she’ll need two units of fluid, some blood work, and probably a chest scan, just to be safe.”&lt;/p&gt;
&lt;p&gt;Blankets, fresh and mercifully warm, are left on my gurney with a simple patterned gown. The pattern is comfortable, familiar. I change, then shrink deep under the heat of the thin covers, wondering about the inventor of the magical blanket warming machine and whether he knew how much solace such a simple comfort could provide. I wait for my dad to arrive.&lt;/p&gt;
&lt;p&gt;“When he gets here, you’ll send him to this room, right?”&lt;/p&gt;
&lt;p&gt;They will.&lt;/p&gt;
&lt;p&gt;My nurse walks in on a wave of calm, unperturbed by the climate of my skin and bones and face. He wordlessly cranks up my gurney an extra few inches and wheels in his racks of equipment. I didn’t realize how much grace could go into the preparation of a tourniquet, but he somehow pulls it off.&lt;/p&gt;
&lt;p&gt;He ties it very tightly around my upper arm and I’m grateful for the rubber that twists uncomfortably on my skin. By now I know that a tourniquet that tight means a nice, smooth draw and I barely feel the needle as it slides into my vein. When I open my eyes, the fifth vial is already full of blood and the visual—correlation? causation?—makes me feel like I’m going to pass out. Maybe passing out at the hospital wouldn’t be the worst thing? My mind moves on.&lt;/p&gt;
&lt;p&gt;When my dad finally appears in the doorway, I’m settling into position and the saline has begun to flow in a cold, steady stream. Did you know that you can feel temperature in your veins? He goes to find more warm blankets and then carefully neatens the pile that’s fallen to one side. In my stubborn pursuit of independence, I had forgotten how nice it is to be taken care of by someone who loves you. I ask for a story.&lt;/p&gt;
&lt;p&gt;“A story?”&lt;/p&gt;
&lt;p&gt;Yes, a story. Because it’s late and we’re not going anywhere. Because I hate phone calls and filters and mundane exchanges that buffer us from having actual conversations. Because I’ve known you for 24 years and I’m just now appreciating that you were 24 once, too, and 23, and 22, and 21…&lt;/p&gt;
&lt;p&gt;“Okay.”&lt;/p&gt;
&lt;p&gt;He thinks for a minute.&lt;/p&gt;
&lt;p&gt;“Did I ever tell you about the time my friend stole quaaludes from the mailroom of a doctor’s office in his building and we took them to play pinball in Times Square?”&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Design for the boring]]></title><description><![CDATA[Once, in college, I heard this story. There’s a man who loves the Yankees. He loves photography. And he dreams one day of being good enough…]]></description><link>https://julesforrest.com/notes/2016/design-for-the-boring/</link><guid isPermaLink="false">https://julesforrest.com/notes/2016/design-for-the-boring/</guid><pubDate>Thu, 18 Feb 2016 17:12:33 GMT</pubDate><content:encoded>&lt;p&gt;Once, in college, I heard this story.&lt;/p&gt;
&lt;p&gt;There’s a man who loves the Yankees. He loves photography. And he dreams one day of being good enough to photograph them professionally. But, unfortunately, he’s all grown up with a respectable job and and a family to feed, so advancements on the professional photography front are hard to come by. He ends up photographing his kid’s tee-ball league on the weekends and lamenting about what could have been.&lt;/p&gt;
&lt;p&gt;Eventually, he gets tired of the pity party. He got into all this to shoot the Yankees and, low stakes be damned, he’s going to shoot that tee-ball league like they’re the Yankees. Predictably, as these anecdotal vignettes tend to go, he forgets his pride, focuses on the subject at hand and learns to shoot the greatest tee-ball pictures this world has ever seen. Word travels and travels and travels and finally he’s commissioned to shoot the team he’s always dreamed of. The moral ends and he lives happily ever after.&lt;/p&gt;
&lt;p&gt;Cliché though it may be, this story actually stuck with me. As a photographer on the school paper in college, I sometimes felt like the man shooting Little League tee-ball — bummed when I had to cover boring, repetitive meetings in bare, hideously lit multi-purpose rooms. Sure, I wanted to take an assignment for the team, and sure, I wanted to practice, but was I ever going to stick that photo of a student council meeting front and center in my portfolio? I doubted it.&lt;/p&gt;
&lt;p&gt;But then the university started getting some less than savory publicity about some unfortunate events that occurred in the Greek life community. Meetings were held by the administration. The story got picked up by the New York Times and all of a sudden, a photo of that boring room in the student union was accompanying a piece of world-class journalism. A photographer for the New York Times can’t exactly go up to their editor after an assignment and say, “Welp, the lighting sucked and the folding chairs didn’t appeal to my refined sensibilities, so I didn’t take any interesting photos.” They shot that meeting like they’d shoot a session of Congress and there was nothing magic about it except their resolve to capture something compelling in something very, very dull.&lt;/p&gt;
&lt;p&gt;That whole incident made taking on those kinds of assignments a lot easier. In a certain way, a really exciting subject might be a crutch of sorts…armed with thousands of dollars of photography equipment and some nice, bright light, could anyone really take a bad picture of the Yankees? Well, probably, but the point is that it can be a much more engaging challenge to take a memorable photo of something mundane than to take one of something people are already excited about.&lt;/p&gt;
&lt;p&gt;The same is true in design. I’ve had my fair share of seemingly unsexy projects that just have to get done for one reason or another — deadlines, MVPs, mandates from on high. My feet drag. But if I took one of those projects to the designer I admire most and asked them to do it instead of me, it would be because I believed them to be capable of solving anything. So essentially, I already believe that the potential for an excellent solution exists…and I might as well tackle that project by trying to pursue it myself. If things start to feel tedious or discouraging, I remember the Yankees and tell myself that boring assignments are a state of mind.&lt;/p&gt;
&lt;p&gt;In any case, I wish I knew who told me that tee-ball story. I’d really like to thank them.&lt;/p&gt;</content:encoded></item></channel></rss>