<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Ted Goas</title>
    <description>The latest articles on Forem by Ted Goas (@tedgoas).</description>
    <link>https://forem.com/tedgoas</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F164501%2Fb1d7aa03-d7b1-4209-a8df-27e387ce8cf1.jpg</url>
      <title>Forem: Ted Goas</title>
      <link>https://forem.com/tedgoas</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/tedgoas"/>
    <language>en</language>
    <item>
      <title>Suddenly Working from Home? </title>
      <dc:creator>Ted Goas</dc:creator>
      <pubDate>Tue, 17 Mar 2020 00:47:05 +0000</pubDate>
      <link>https://forem.com/tedgoas/suddenly-working-from-home-55a6</link>
      <guid>https://forem.com/tedgoas/suddenly-working-from-home-55a6</guid>
      <description>&lt;p&gt;A Short Guide to Working Remotely for Co-located Teams&lt;/p&gt;




&lt;p&gt;COVID-19 is unlike anything we've seen in our lifetime. Companies are taking precautions to protect their employees and (hopefully) curb the Coronavirus's spread. This means many are closing their offices and asking employees to work from home.&lt;/p&gt;

&lt;p&gt;That's the right call for us privileged folk who &lt;em&gt;can&lt;/em&gt; work from home.&lt;/p&gt;

&lt;p&gt;But now you're scrambling to translate your team's office culture online. Let me tell you something:&lt;/p&gt;

&lt;p&gt;You can do this!&lt;/p&gt;

&lt;p&gt;Working remotely is less scary than it may feel like at first. It's about the people and the culture, not the tools. I'm not even gonna talk about tools in this article.&lt;/p&gt;

&lt;p&gt;Maybe you start by doing a few Google searches and seeing what tips are being shared on social media. Companies like Buffer, Zapier, GitLab, Basecamp, and Automattic come up a lot.&lt;/p&gt;

&lt;p&gt;If you only take one thing away here, make it this:&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Do not compare yourself to these companies&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;These companies have years of experience working with a distributed workforce. It's in their DNA. Sure it's insightful to see how they overcome the challenges of working remotely, but it's a lot to take in for a team trying to salvage some resemblance of productivity amidst a pandemic.&lt;/p&gt;

&lt;p&gt;Remember, this isn't about remote work, it's about forced isolation. As &lt;a href="https://klinger.io/post/612591504694919168/close-your-office-now-how-operate-your-startup"&gt;Andreas Klinger says&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Your goal right now is not to become a fully functional remote team overnight. Your first goal is to establish an emergency work-from-home setup that sustains your productivity.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Got it? Good. &lt;em&gt;Phew!&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;With that out of the way, think about the most important parts of your team's culture. Remote work isn’t an all or none concept, so you can pick the parts that work best for you and your team.&lt;/p&gt;

&lt;p&gt;I've worked remotely since 2016 when I joined Stack Overflow, but I worked in office jobs for 15+ years before that. I remember what it's like to be on both sides. Here are a few random thoughts based on that transition: &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Productivity will probably decrease.&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;"Can you hear me?" "Can you see my screen?" There will be technical glitches. Folks won't grok all the new tools right away. That's ok. Remember we're just trying to salvage what we can here, especially in the first few weeks.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Establish working hours and norms.&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If your company has an ass-in-chair mentality (hey we've all been there), set up a &lt;code&gt;#current-status&lt;/code&gt; or &lt;code&gt;#hi-bye&lt;/code&gt; channel in chat where folks can signal when they're available and when they're away. It's also important to be more aware of the time, especially late in the day. Since you're already at home and might not notice that it's dark out and you've been working for 12 hours because you're at home!&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Remember to walk around.&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Commuting and navigating an office involves walking. Working at home really doesn't. Your bed, kitchen, and bathroom are likely only a few steps away from your work area, so it's important to get intentional exercise. Going for a walk around your neighborhood seems to be one of a few safe things to do. I'm also digging into at-home workouts.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Remember the idle chat.&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Spontaneous conversations at work are important. Conversations around the coffee machine and having lunch together are great ways to bond with coworkers in an office. You can recreate some of this online by creating non-work channels in chat (eg. &lt;code&gt;#random&lt;/code&gt;, &lt;code&gt;#listening-room&lt;/code&gt;, &lt;code&gt;#coffee-n-tea&lt;/code&gt;, &lt;code&gt;#work-from-home-tips&lt;/code&gt;), having a happy hour over video chat (hey I'm doing that with my &lt;em&gt;non-work&lt;/em&gt; friends), and holding team building exercises on a Google Meet call. &lt;a href="https://www.tedgoas.com/blog/distributed-design"&gt;I've found there's almost nothing you can't recreate in video chat&lt;/a&gt;, you just have to be creative for a while.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Be transparent with your communication.&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;When communication is moved from an office to 100% online, folks might be afraid they're missing out on key conversations and decisions they might otherwise see in the office. Transparent communication solves this issue.&lt;/p&gt;

&lt;p&gt;Use public chat rooms whenever possible. As &lt;a href="https://jlericson.com/2020/03/09/remote_tips.html"&gt;Jon Ericson says&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Instead of asking 'Who needs to know this?', ask 'Is there any reason this should be private?' The answer is almost always No.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;"Public by default, private if you have to."&lt;/p&gt;




&lt;p&gt;I promised this'd be short, so I'll stop there. I'm happy to keep the discussion going in the comments 💬&lt;/p&gt;

&lt;p&gt;Remember this isn't about transforming your culture to be remote-first or rethinking your companies core values and processes. We're just trying to get by in this strange, new world.&lt;/p&gt;

&lt;p&gt;I won't hit you will a million WFH links published within the last week, but here are two worth reading:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://klinger.io/post/612591504694919168/close-your-office-now-how-operate-your-startup"&gt;Close your office&lt;/a&gt; - Andreas Klinger&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://benediktlehnert.github.io/#omg-im-working-remotely"&gt;OMG WFH&lt;/a&gt; - Benedikt Lehnert&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Stay safe our there friends ✌️&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>management</category>
      <category>covid19</category>
      <category>discuss</category>
    </item>
    <item>
      <title>How do you find and apply to speak at conferences?</title>
      <dc:creator>Ted Goas</dc:creator>
      <pubDate>Tue, 04 Feb 2020 14:08:14 +0000</pubDate>
      <link>https://forem.com/tedgoas/how-do-you-find-and-apply-to-speak-at-conferences-38ah</link>
      <guid>https://forem.com/tedgoas/how-do-you-find-and-apply-to-speak-at-conferences-38ah</guid>
      <description>&lt;p&gt;Howdy y’all, I’m wondering how y’all find out about conferences you’d like to attend. And more specifically, how would you find ones that are accepting speaker proposals.&lt;/p&gt;

&lt;p&gt;I have a handful of topics I’ve given talks about, but am struggling to find conferences that are looking for speakers or soliciting CFPs (call for proposals).&lt;/p&gt;

&lt;p&gt;For conference goers and speakers alike, how do you find them?&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>techtalks</category>
      <category>speaking</category>
    </item>
    <item>
      <title>Getting Started with Maizzle, a Framework for Rapid Email Prototyping</title>
      <dc:creator>Ted Goas</dc:creator>
      <pubDate>Mon, 03 Feb 2020 14:47:12 +0000</pubDate>
      <link>https://forem.com/tedgoas/getting-started-with-maizzle-a-framework-for-rapid-email-prototyping-1k0n</link>
      <guid>https://forem.com/tedgoas/getting-started-with-maizzle-a-framework-for-rapid-email-prototyping-1k0n</guid>
      <description>&lt;p&gt;For the past several years, coding HTML emails has been part of every job I've had. However, despite all the modern front-end tooling that's been created in recent years, my email development process has remained relatively basic and manual. Write static HTML, inline CSS by hand, copy/paste, etc.&lt;/p&gt;

&lt;p&gt;A few times I tried twisting a framework into outputting high-quality HTML emails, but was never successful.&lt;/p&gt;

&lt;p&gt;Fast forward to last week, I saw a tweet about &lt;a href="https://maizzle.com/" rel="noopener noreferrer"&gt;Maizzle&lt;/a&gt;, another framework for building HTML emails. I was initially skeptical, but that changed after a few minutes clicking around the documentation.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Maizzle is an email framework that helps you quickly build emails with utility-first CSS and advanced, email-specific post-processing.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This piqued my interest: utility classes are &lt;em&gt;kinda&lt;/em&gt; like writing inline CSS, which is how I currently develop emails.&lt;/p&gt;

&lt;p&gt;So last week I set aside a few hours to dive in. I also opened up a blank text document to record my reactions as I went through the process. This is that document. 😀&lt;/p&gt;




&lt;h1&gt;
  
  
  Getting started
&lt;/h1&gt;

&lt;p&gt;Alright &lt;em&gt;(cracks knuckles)&lt;/em&gt;, let's start by setting up a new project.&lt;/p&gt;

&lt;p&gt;I followed the instructions in &lt;a href="https://maizzle.com/docs/installation/" rel="noopener noreferrer"&gt;Maizzle's installation docs&lt;/a&gt;. I’m not the most comfortable using the command line, but I was able to follow these instructions and get a new project up and running locally within in a few minutes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FRhk9DbK.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FRhk9DbK.png" alt="starter templates rendered locally."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Nice, that wasn’t too bad.&lt;/p&gt;

&lt;h1&gt;
  
  
  Editing
&lt;/h1&gt;

&lt;p&gt;Let’s open up the transactional email and see if I can change the title of &lt;code&gt;templates/transactional.njk&lt;/code&gt;…&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FIqjtvGx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FIqjtvGx.png" alt="Two emails side by side, the second with an updated title."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Nice, so this is where the template files live, I can edit them and see my changes in a browser, and better than best &lt;code&gt;browsersync&lt;/code&gt; automatically reloads the browser even time I save a change in my editor.&lt;/p&gt;

&lt;p&gt;I love this idea of building emails using JavaScript partials. Not the newest idea, but there aren’t many off-the-shelf options to do this specifically for email (I’ve tried unsuccessfully to hack a few static site generators to build emails.&lt;/p&gt;

&lt;h1&gt;
  
  
  Configuring
&lt;/h1&gt;

&lt;p&gt;Ok so the Javascript part of this is cool, but let's check the actual HTML that was rendered since that’s the final email that someone would actually experience.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FgBRit2Q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FgBRit2Q.png" alt="Email files in Finder with a large file size."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Whoa…! This email is &lt;code&gt;433kb&lt;/code&gt;??? For this tiny little thing? Let’s open up the rendered HTML and see what’s going on.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Ffee6m3D.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Ffee6m3D.png" alt="HTML source with lots of unused CSS included."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Oh… the email includes ALL of TailwindCSS 🤦‍♂️&lt;/p&gt;

&lt;p&gt;TailWindCSS is a utility-first CSS framework comprised of tons of tiny, single-purpose CSS classes. And it looks like our email has the entire framework included in the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt;. All 25,000+ lines of CSS would certainly account for that file size!&lt;/p&gt;

&lt;p&gt;I remember seeing something about this in Maizzle's docs…&lt;/p&gt;

&lt;p&gt;&lt;a href="https://maizzle.com/docs/environments/" rel="noopener noreferrer"&gt;Here it is&lt;/a&gt;. We can configure build environments by editing their respective &lt;code&gt;config.js&lt;/code&gt; files. Looks like &lt;code&gt;config.js&lt;/code&gt; is for local development, so let’s pop that open.&lt;/p&gt;

&lt;p&gt;Looks like &lt;code&gt;inlineCSS&lt;/code&gt; and &lt;code&gt;removeUnusedCSS&lt;/code&gt; are both set to &lt;code&gt;false&lt;/code&gt;. Let’s change those to &lt;code&gt;true&lt;/code&gt; so that our CSS is inlined (still a thing in email development, yea) and all unused CSS classes are removed.&lt;/p&gt;

&lt;p&gt;Let’s save and re-run Maizzle.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FrRYnflA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FrRYnflA.png" alt="Email files in Finder with a small file size."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Much better!&lt;/p&gt;

&lt;p&gt;There are some nice options in the config file. I’ll review in-depth later, but we’re back on track for now.&lt;/p&gt;

&lt;h1&gt;
  
  
  Templates and Partials
&lt;/h1&gt;

&lt;p&gt;Checking out the folder for partials and thinking of use cases…&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A header + logo for each product line&lt;/li&gt;
&lt;li&gt;A footer for each ESP (and their unsubscription info).&lt;/li&gt;
&lt;li&gt;Spacers and other non-editable components&lt;/li&gt;
&lt;li&gt;🤔 I wonder if you can specify a component and send in variables (Eg. Define the code / design of a button but send in a unique URL and text for each instance). Will research.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I also like the option to have multiple base templates… handy for those one-off fancy designs.&lt;/p&gt;

&lt;h1&gt;
  
  
  Tailored for Email Development
&lt;/h1&gt;

&lt;p&gt;I love the choice of utility classes for email development. Writing a bunch of small, single-purpose CSS classes to style a component is really a more efficient way to writing inline CSS. (✋ I still write most of my email code by hand and inline the CSS.)&lt;/p&gt;

&lt;p&gt;Maizzle also includes a lot of niceties specific to email developers, such as &lt;a href="https://maizzle.com/docs/css-inlining/" rel="noopener noreferrer"&gt;sensible and customizable CSS inlining&lt;/a&gt;, &lt;a href="https://maizzle.com/docs/extra-attributes/" rel="noopener noreferrer"&gt;accessible &lt;code&gt;&amp;lt;table&amp;gt;&lt;/code&gt; tags&lt;/a&gt;, &lt;a href="https://maizzle.com/docs/base-image-url/" rel="noopener noreferrer"&gt;setting base image url ONCE&lt;/a&gt;, &lt;a href="https://maizzle.com/docs/url-parameters/" rel="noopener noreferrer"&gt;automatically adding url parameters&lt;/a&gt; automatically prevent widows, and more.&lt;/p&gt;

&lt;p&gt;Also while TailwindCSS defaults to modern units like &lt;code&gt;rem&lt;/code&gt; and &lt;code&gt;vh&lt;/code&gt;, Maizzle’s default output uses units like &lt;code&gt;px&lt;/code&gt; and attributes like &lt;code&gt;bgcolor&lt;/code&gt; (also still a thing in email development). Maizzle does this by customizing &lt;code&gt;tailwind.config.js&lt;/code&gt; with email-friendly CSS. This is a huge piece that I was missing from previous attempts to use a modern web framework to build emails 🔥.&lt;/p&gt;

&lt;p&gt;Worth noting is that we’re still writing HTML in Maizzle. Other options like MJML and Foundation abstract away some of the verbose HTML in custom tags like &lt;code&gt;&amp;lt;column&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;row&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;button&amp;gt;&lt;/code&gt;. While some find that freeing, I find it limiting. Maizzle allows us to write the HTML we &lt;em&gt;really&lt;/em&gt; want.&lt;/p&gt;

&lt;p&gt;Maizzle abstracts away &lt;em&gt;some&lt;/em&gt; annoyances of email development by solving them with modern web technologies, allowing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;web devs to code proper emails using tools &amp;amp; techniques they're already familiar with.&lt;/li&gt;
&lt;li&gt;email devs to build emails quick without losing control of their code.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;I’m excited to start porting over parts of &lt;a href="https://stackoverflow.design/email/" rel="noopener noreferrer"&gt;our email design system&lt;/a&gt; into a Maizzle project to see how it holds up.&lt;/p&gt;

</description>
      <category>todayilearned</category>
      <category>html</category>
      <category>css</category>
      <category>emaildev</category>
    </item>
    <item>
      <title>My first interactive email</title>
      <dc:creator>Ted Goas</dc:creator>
      <pubDate>Thu, 02 Jan 2020 13:33:52 +0000</pubDate>
      <link>https://forem.com/tedgoas/my-first-interactive-email-94</link>
      <guid>https://forem.com/tedgoas/my-first-interactive-email-94</guid>
      <description>&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; I coded my first interactive email using radio buttons to toggle on/off states without using JavaScript.&lt;/p&gt;




&lt;p&gt;I was first introduced to interactive email in 2015 when I attended Mark Robbins’ presentation at Litmus Live in Boston.&lt;/p&gt;

&lt;p&gt;JavaScript isn’t supported in any email client, so up to that point the only interactive things I’d done in email were relatively basic (like creating a &lt;code&gt;:hover&lt;/code&gt; effect on a button using CSS).&lt;/p&gt;

&lt;p&gt;But in his presentation, Mark introduced me to the concept of punched card coding: using checkbox and radio button tags in email to mimic on/off functionally that JavaScript typically enables on the web.&lt;/p&gt;

&lt;p&gt;I was blown away by &lt;a href="https://www.youtube.com/watch?v=xhUfiOSOk3g" rel="noopener noreferrer"&gt;Mark’s talk&lt;/a&gt;. I told myself to look out for an opportunity to use what I learned at work, but promptly forgot about it for four years as “regular” work took the front seat 😬.&lt;/p&gt;

&lt;h1&gt;
  
  
  The Pilot
&lt;/h1&gt;

&lt;p&gt;Fast forward to 2019, I now work on Stack Overflow’s private Q&amp;amp;A products. Teams can ask questions, post answers, and vote on the best ones in a private setting.&lt;/p&gt;

&lt;p&gt;However some teams have mentioned they’d like to improve their culture of voting. Eg. The team posts useful answers, but folks don’t upvote or accept the best ones to signal a high quality answer to rest of the team.&lt;/p&gt;

&lt;p&gt;Folks don't spend all day with Stack Overflow open in a browser tab, so how can we meet folks where they already are?&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“What if you could vote on questions right from your email, without even visiting the site? I bet that’s something an interactive email would be able to do!”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Four years after learning about punched card coding, I finally found a good pilot project, tied it to a business need, and set aside a day to code my first interactive email.&lt;/p&gt;

&lt;h1&gt;
  
  
  What We Built
&lt;/h1&gt;

&lt;p&gt;The “Happy Path UX" allows someone to view an answer to their question and optionally vote on or accept it as the best answer, all without leaving their inbox. This is what I built:&lt;/p&gt;

&lt;p&gt;&lt;br&gt;
&lt;iframe height="600" src="https://codepen.io/tedgoas/embed/MWYpazJ?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;
Try clicking the icons on the left!





&lt;h1&gt;
  
  
  The Code
&lt;/h1&gt;

&lt;p&gt;The HTML uses the radio input along with the &lt;code&gt;:checked&lt;/code&gt; attribute to show and hide content using CSS.&lt;/p&gt;

&lt;h3&gt;
  
  
  HTML
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;input type="radio" name="vote" id="ArrowUpLg" style="display: none !important; max-height: 0; visibility: hidden;"&amp;gt;
&amp;lt;label for="ArrowUpLg" class="ArrowUpLg" style="cursor: pointer;"&amp;gt;
  &amp;lt;img src="ArrowUpLg.png" height="36" width="36"&amp;gt;
&amp;lt;/label&amp;gt;

&amp;lt;input type="radio" name="vote" id="ArrowUpLgactive" style="display: none!important; max-height: 0; visibility: hidden;"&amp;gt;
&amp;lt;label for="ArrowUpLgactive" class="ArrowUpLgactive" style="cursor: pointer; display: none;"&amp;gt;
  &amp;lt;img src="ArrowUpLgactive.png" height="36" width="36"&amp;gt;
&amp;lt;/label&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The actual radio button is visually hidden and linked to from their &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt; tag using the &lt;code&gt;for&lt;/code&gt; and &lt;code&gt;id&lt;/code&gt; attributes. The image file is wrapped inside the &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt; to make the click/tap area nice and big.&lt;/p&gt;

&lt;p&gt;For each icon, I created two almost identical versions of the code: one for the “initial” state and another for the “active” state. The “active” state is hidden by default with inline CSS (Inline CSS is still the most universal way to style HTML in email).&lt;/p&gt;

&lt;p&gt;So the base HTML and CSS inserts and positions each icon state in the email, and hides the “active” image for each icon. With this foundation, the CSS in the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; adds the functionality.&lt;/p&gt;

&lt;h3&gt;
  
  
  CSS
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#ArrowUpLg:checked + .ArrowUpLg {
  display: none !important;
}
#ArrowUpLg:checked ~ .ArrowUpLgactive {
  display: block !important;
}
#ArrowDownLg:checked + .ArrowDownLg {
  display: none !important;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When an icon is clicked, the &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt; tag, it checks the hidden radio button.&lt;/p&gt;

&lt;p&gt;In the CSS, the &lt;code&gt;:checked&lt;/code&gt; selector is used to toggle the &lt;code&gt;display&lt;/code&gt; property of the adjacent &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; between &lt;code&gt;block&lt;/code&gt; and &lt;code&gt;none&lt;/code&gt;. The first time an icon is clicked or tapped, I hide the initial state (&lt;code&gt;display: none !important&lt;/code&gt;) and show the “active” state (&lt;code&gt;display: block !important&lt;/code&gt;). The &lt;code&gt;!important&lt;/code&gt; is necessary to override inline CSS styles.&lt;/p&gt;

&lt;h1&gt;
  
  
  The Happy Path UX
&lt;/h1&gt;

&lt;p&gt;The end result is an email with working upvote and downvote arrows, and a checkmark to accept the answer.&lt;/p&gt;

&lt;p&gt;We should only be able to upvote or downvote an answer, but not both. So we used radio buttons and included the upvote and downvote arrows in a single group using the &lt;code&gt;name&lt;/code&gt; attribute. This means that if the upvote arrow is active, and then the downvote arrow is selected, the upvote arrow is unselected in the process.&lt;/p&gt;

&lt;p&gt;The “accepted” checkmark is independent of the voting arrows, so I gave that its own &lt;code&gt;name&lt;/code&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Email Client Fallbacks
&lt;/h1&gt;

&lt;p&gt;I’ve been using the term “Happy Path UX” to describe the ideal state. Unfortunately not all email clients support &lt;a href="http://freshinbox.com/resources/css.php" rel="noopener noreferrer"&gt;this level of interactivity&lt;/a&gt;, so I have to think about fallbacks.&lt;/p&gt;

&lt;p&gt;For instance, desktop Outlook on Windows does not support HTML form tags in email. Left alone, Outlook would display each icon… but nothing would happen when they’re clicked. Both confusing and frustrating for a user.&lt;/p&gt;

&lt;p&gt;In this cases like this, we can target email clients that don’t support our desired UX and code in a fallback (Like say, static image files that click to the website).&lt;/p&gt;

&lt;p&gt;In this example, I targeted Outlook using &lt;code&gt;&amp;lt;!--[if mso]&amp;gt;&amp;lt;![endif]—&amp;gt;&lt;/code&gt; tags to hide the interactive form content from Outlook but display it in other email clients.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://howtotarget.email/" rel="noopener noreferrer"&gt;How to Target Email&lt;/a&gt; contains a long list of ways to target different email clients. I'll use this to display the interactivity to clients that support it and hide it from the rest.&lt;/p&gt;

&lt;h1&gt;
  
  
  Punched Card Coding
&lt;/h1&gt;

&lt;p&gt;This was my first foray into punched card coding. It’s a pretty steep learning curve, but I had a giant “A-Ha!” moment the first time I got a proof of concept working.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/3oKIPjHdsUZOlJXTQQ/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/3oKIPjHdsUZOlJXTQQ/giphy.gif" alt="Mind blown animation"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Punched card coding can involve radio buttons, checkboxes, or button tags to achieve a number of things. Javascript still isn’t supported in any email client, but we can still toggle state, build tabs, reveal a hidden menu, build a carousel, and more.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Fb1b23iq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Fb1b23iq.png" alt="illustrations of types of interactive emails, c/o Email Monks"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.webdesignerdepot.com/2015/10/punched-card-coding-the-secret-of-interactive-email/" rel="noopener noreferrer"&gt;More on punched card coding&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Known Issues and Questions
&lt;/h1&gt;

&lt;p&gt;My example above poses several questions outside of the HTML and CSS.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Can we maintain state?&lt;/strong&gt; Eg. What happens if I vote in an email, close the email, and re-open it? Is the arrow still active? If it’s not and I vote again, what happens?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What about security?&lt;/strong&gt; Eg. If I forward my email, can someone else vote on my behalf?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What about testing?&lt;/strong&gt; Eg. Emulators like Litmus only produce static screenshots. I’ll need a working version of every email client we want to test.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you’re a Stack Overflow user, I’m not sure when we’ll figure this out, but I’m working on it! This is simply and exploration of what’s possible using interactive email.&lt;/p&gt;

&lt;p&gt;If you’ve written markup using punched card coding or "the checkbox hack,” I’ve love input on how I could improve and optimize this.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If you’re a Stack Overflow user, would this be useful?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;💌 ✌️&lt;/p&gt;

</description>
      <category>todayilearned</category>
      <category>html</category>
      <category>css</category>
      <category>emaildev</category>
    </item>
  </channel>
</rss>
