<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Danny Smith - Articles</title><description>Latest articles from Danny Smith</description><link>https://danny.is/</link><item><title>Introducing Astro Editor</title><link>https://danny.is/writing/introducing-astro-editor/</link><guid isPermaLink="true">https://danny.is/writing/introducing-astro-editor/</guid><pubDate>Thu, 08 Jan 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;I’ve launched &lt;a href=&quot;https://astroeditor.danny.is/&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Astro Editor&lt;/a&gt;, a desktop app for authoring and editing Markdown and MDX content in local &lt;a href=&quot;https://astro.build/&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Astro&lt;/a&gt; Content Collections! I’m actually a bit late with this blog post since I shipped 1.0.0 six weeks ago, but hey – better late than never!&lt;/p&gt;
&lt;h2 id=&quot;what-is-it&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#what-is-it&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;What is it?&lt;/h2&gt;
&lt;p&gt;Most Astro &lt;a href=&quot;https://docs.astro.build/en/guides/content-collections/#what-are-content-collections&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;content collections&lt;/a&gt; basically comprise two things: a folder containing markdown files with their &lt;em&gt;metadata&lt;/em&gt; as YAML frontmatter, and a Zod schema describing the structure that frontmatter should have. These content files live alongside your code.&lt;/p&gt;
&lt;p&gt;Astro Editor provides an interface for working with these markdown files which is designed for &lt;strong&gt;writing&lt;/strong&gt; not coding. The editor itself is a distractionless flow-state writing environment – it’s minimalist and gets out of your way. The frontmatter isn’t shown in the document, it appears as suitable UI components in a hideable sidebar. This shows both the frontmatter in the actual file &lt;strong&gt;and the available fields from the content collections schema&lt;/strong&gt;. Here’s a screenshot of me writing this article right now.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/_astro/2026-01-08-ae-screenshot-1.CpFADRAn_172B5F.webp&quot; srcset=&quot;/_astro/2026-01-08-ae-screenshot-1.CpFADRAn_22DnXR.webp 640w, /_astro/2026-01-08-ae-screenshot-1.CpFADRAn_Z1Q6ijd.webp 750w, /_astro/2026-01-08-ae-screenshot-1.CpFADRAn_1BBhOV.webp 828w, /_astro/2026-01-08-ae-screenshot-1.CpFADRAn_ZqEoCO.webp 1080w, /_astro/2026-01-08-ae-screenshot-1.CpFADRAn_Z2rmYN5.webp 1280w, /_astro/2026-01-08-ae-screenshot-1.CpFADRAn_1wz2Nr.webp 1668w, /_astro/2026-01-08-ae-screenshot-1.CpFADRAn_Z2tbxx2.webp 2048w, /_astro/2026-01-08-ae-screenshot-1.CpFADRAn_Z1w49FO.webp 2560w, /_astro/2026-01-08-ae-screenshot-1.CpFADRAn_172B5F.webp 3840w&quot; alt=&quot;AE Screenshot 1.png&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; sizes=&quot;(min-width: 3840px) 3840px, 100vw&quot; data-astro-image=&quot;constrained&quot; data-astro-image-fit=&quot;cover&quot; data-astro-image-pos=&quot;center&quot; width=&quot;3840&quot; height=&quot;2160&quot;&gt;&lt;/p&gt;
&lt;p&gt;When I dragged that screenshot into the editor it was automatically copied to the right folder in my project and renamed appropriately before the markdown image tag was inserted. I can check it’s the right one by holding &lt;kbd&gt;⌥&lt;/kbd&gt; while hovering over the image tag, which shows a little preview. Astro Editor is full of little features like this, all of which are intended to let you focus on &lt;strong&gt;writing words&lt;/strong&gt; without getting distracted. You can see the main features on the &lt;a href=&quot;https://astroeditor.danny.is/&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;website&lt;/a&gt; (more in the &lt;a href=&quot;https://github.com/dannysmith/astro-editor/blob/main/docs/user-guide.md&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;userguide&lt;/a&gt;). Here’s a full explanation and demo:&lt;/p&gt;
&lt;lite-youtube videoid=&quot;SJkXD59gQ5U&quot; style=&quot;background-image: url(&apos;https://i.ytimg.com/vi/SJkXD59gQ5U/hqdefault.jpg&apos;)&quot;&gt; &lt;a href=&quot;https://youtube.com/watch?v=SJkXD59gQ5U&quot; class=&quot;lyt-playbtn&quot;&gt; &lt;span class=&quot;lyt-visually-hidden&quot;&gt;Play&lt;/span&gt; &lt;/a&gt; &lt;/lite-youtube&gt; &lt;script type=&quot;module&quot; src=&quot;/home/runner/work/dannyis-astro/dannyis-astro/node_modules/@astro-community/astro-embed-youtube/YouTube.astro?astro&amp;type=script&amp;index=0&amp;lang.ts&quot;&gt;&lt;/script&gt;
&lt;h2 id=&quot;why&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#why&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Why?&lt;/h2&gt;
&lt;p&gt;Because I’ve wanted this myself for ages and the closest I ever got was &lt;a href=&quot;https://getdarkmatter.dev/&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Darkmatter&lt;/a&gt; – which I paid for and used regularly but never &lt;em&gt;quite&lt;/em&gt; did what I wanted.&lt;/p&gt;
&lt;h3 id=&quot;but-why&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#but-why&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;But &lt;em&gt;why&lt;/em&gt;?&lt;/h3&gt;
&lt;p&gt;Most folks who publish content with Astro work in two distinct &lt;em&gt;modes&lt;/em&gt;. We’re in &lt;strong&gt;coder mode&lt;/strong&gt; when we’re editing Astro components, pages, CSS etc. This is best done in a &lt;em&gt;coding tool&lt;/em&gt; like VSCode. We’re in &lt;strong&gt;writer mode&lt;/strong&gt; when we’re writing or editing prose in markdown. Editors designed for coding are not well suited to this - they have too many distractions and lack the kinds of tools which help with writing and editing prose.&lt;/p&gt;
&lt;p&gt;Because of this, it’s common for people to &lt;strong&gt;write&lt;/strong&gt; in tools like &lt;a href=&quot;https://ia.net/writer&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;iA Writer&lt;/a&gt; or &lt;a href=&quot;https://obsidian.md/&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Obsidian&lt;/a&gt; and then switch to VSCode to add frontmatter, build and publish. The workflow often looks something like this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create a new draft markdown file &amp;amp; start writing&lt;/li&gt;
&lt;li&gt;Edit and tweak (maybe over a number of sessions)&lt;/li&gt;
&lt;li&gt;Add frontmatter for things like description, tags etc&lt;/li&gt;
&lt;li&gt;Build &amp;amp; run locally to check everything works&lt;/li&gt;
&lt;li&gt;Push to github and deploy/publish&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Steps 1-3 are very much &lt;em&gt;writer mode&lt;/em&gt; tasks, while 4 &amp;amp; 5 are definitely &lt;em&gt;coder mode&lt;/em&gt; tasks. Astro Editor is only concerned with the former which means things like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Code blocks are not syntax highlighted because writing example code should be done in a code editor.&lt;/li&gt;
&lt;li&gt;You can’t commit or publish because that’s best done in a code editor or terminal.&lt;/li&gt;
&lt;li&gt;You can’t preview your writing because that’s best done in a browser while running your site on localhost.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And because the goal is &lt;strong&gt;simplicity when in writer mode&lt;/strong&gt;, Astro Editor is intentionally opinionated about its UI and limits the user customisation features to &lt;em&gt;“making it work with your Astro project and no more”&lt;/em&gt;. It’s not possible to customise colour schemes, typefaces etc.&lt;/p&gt;
&lt;h2 id=&quot;where-we-at-now&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#where-we-at-now&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Where we at now?&lt;/h2&gt;
&lt;p&gt;At time of writing &lt;a href=&quot;https://github.com/dannysmith/astro-editor/releases/tag/v1.0.5&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;1.0.5&lt;/a&gt; is stable for macOS and Windows and the GitHub repo has &lt;strong&gt;328 stars&lt;/strong&gt;. While I don’t collect analytics, I do get a ping whenever the auto-updater checks for a new version (which only happens automatically on launch). This includes only the currently installed version, the OS (&lt;code&gt;mac&lt;/code&gt; or &lt;code&gt;win&lt;/code&gt;) and a random UUID unique to each install. So I know that as of Thursday 8 January 2026:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;There are 276 unique installs, 264 of which are on macOS and 12 on Windows.&lt;/li&gt;
&lt;li&gt;Only 20 installs are pre-1.0.0&lt;/li&gt;
&lt;li&gt;14 people opened Astro Editor today (probably, including me).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;More importantly though… I’m writing in it basically every day. And I &lt;strong&gt;really fucking enjoy it&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id=&quot;so-whats-next&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#so-whats-next&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;So what’s Next?&lt;/h2&gt;
&lt;p&gt;Short answer: &lt;strong&gt;Finished Software&lt;/strong&gt;. After years working in VC-funded startups which by definition can never be “finished”, it’s weirdly exciting to look at a 6-month-old Astro Editor and think &lt;em&gt;“yeah I think it might be finished soon”&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;I do still have one or two things on the &lt;a href=&quot;https://github.com/users/dannysmith/projects/5&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;roadmap&lt;/a&gt; though…&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;A &lt;a href=&quot;https://github.com/dannysmith/astro-editor/issues/82&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;complete reworking&lt;/a&gt; of how project config is managed, including some new options to control &lt;a href=&quot;https://github.com/dannysmith/astro-editor/issues/87&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;file naming&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/dannysmith/astro-editor/issues/69&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Internationalization&lt;/a&gt; and basic RTL support.&lt;/li&gt;
&lt;li&gt;Better &lt;a href=&quot;https://github.com/dannysmith/astro-editor/issues/10&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;quick search and internal link insertion&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;And maybe better Linux support someday.&lt;/p&gt;
&lt;h2 id=&quot;like--subscribe-plz&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#like--subscribe-plz&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Like &amp;amp; Subscribe plz&lt;/h2&gt;
&lt;p&gt;If you have an Astro site, please give Astro Editor a go. It’s only got to where it is now thanks to a bunch of folks trying it out and sharing feedback on &lt;a href=&quot;https://github.com/dannysmith/astro-editor/issues&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;And as a free open-source side project, the only marketing it’s gonna get is from people who like it saying so on their socials &amp;amp; websites. So tell your mates. Plz 🙏&lt;/p&gt;
&lt;h2 id=&quot;quite-the-journey&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#quite-the-journey&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Quite The Journey&lt;/h2&gt;
&lt;p&gt;I didn’t mean to build anything proper here. In July ‘25 I was just starting to &lt;em&gt;properly&lt;/em&gt; experiment with AI coding beyond Copilot &amp;amp; Cursor autocomplete and was looking for a project to use as a guinea pig. My basic requirements were:&lt;/p&gt;
&lt;ol class=&quot;long-list-items&quot;&gt;
&lt;li&gt;&lt;strong&gt;It can’t be throwaway&lt;/strong&gt; because learning how to hold these new AI tools &lt;em&gt;properly&lt;/em&gt; meant more than blind vibe coding.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;It can’t be a toy&lt;/strong&gt; for the same reason.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;It must be something I’ll use daily if it works&lt;/strong&gt; because otherwise I’d not have been invested in its quality.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;It must have a GUI&lt;/strong&gt; because at the time LLMs were turbo-shit at UI design, which made this a key learning goal.&lt;/li&gt;
&lt;li&gt;Ideally, &lt;strong&gt;it’s designed to run locally&lt;/strong&gt; because any non-toy web app involves a bunch of third-party services to handle auth and emails and file storage and all the rest. Some of which cost money and all of which require me – the human – to manage them.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;So I settled on &lt;em&gt;iA Writer but how I want it to write my blog&lt;/em&gt;, which ticked all the boxes. And duly dictated some nonsense requirements into a markdown file and had cursor turn it into what I thought would be a good PRD, which became Astro Editor’s &lt;a href=&quot;https://github.com/dannysmith/astro-editor/commit/69faa816914e415fba43fc07e363ab6bf2f87923&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;first commit&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;As an AI Coding noob the maybe-kinda-working app Cursor built from this felt like magic, but after a few hours going round in circles I actually read the code and realised it was (obviously) dogshit slop. And so began the very interesting process of working out how to do that better, which I’ll write about in another article.&lt;/p&gt;
&lt;p&gt;Fast forward a few months and I had a completely rewritten Astro Editor with a not-so-insane architecture, which both me and my new friend Claude could reason about well enough to iterate on features quickly and reliably. And on 18 Aug I shipped a feature-complete &lt;a href=&quot;https://github.com/dannysmith/astro-editor/releases/tag/v0.1.20&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;0.1.20&lt;/a&gt; and shared in the Astro Discord! 🎉&lt;/p&gt;
&lt;p&gt;Feature complete my arse.&lt;/p&gt;
&lt;p&gt;Turns out not everyone has the same Astro setup as me. So I spent September-November dealing with that, which involved a completely different approach to schema reading/parsing, lots of testing on weird and wonderful Astro projects and a smattering of new features.&lt;/p&gt;
&lt;p&gt;I &lt;a href=&quot;https://github.com/dannysmith/astro-editor/releases/tag/v1.0.0&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;released 1.0.0&lt;/a&gt; on 22 November 2025.&lt;/p&gt;</content:encoded></item><item><title>Moving this site to Astro</title><link>https://danny.is/writing/moving-to-astro/</link><guid isPermaLink="true">https://danny.is/writing/moving-to-astro/</guid><pubDate>Sat, 25 Oct 2025 00:00:00 GMT</pubDate><content:encoded>&lt;div class=&quot;intro-paragraph&quot; data-astro-cid-awc6y372&gt; I started on a redesign of this site &amp;lt;a href=&amp;quot;/writing/website-redesign-i&amp;quot;&amp;gt;back in May 2020&amp;lt;/a&amp;gt; after deciding I wanted a simpler, content-first statically generated site. My main goals were to keep the core as simple as possible – writing in markdown and minimal boilerplate code – while allowing me to noodle around with new-fangled CSS &amp;amp;amp; web-native stuff when I want to. &lt;/div&gt;  &lt;script type=&quot;module&quot; src=&quot;/home/runner/work/dannyis-astro/dannyis-astro/src/components/mdx/IntroParagraph.astro?astro&amp;type=script&amp;index=0&amp;lang.ts&quot;&gt;&lt;/script&gt;
&lt;p&gt;After about three years running on Jekyll I started to get frustrated at some of the stuff I couldn’t do easily - primarily the difficulty of working with custom components in markdown. I was using some kinda-janky markdown pre-parsers to let me insert things like callouts…&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;/_astro/ec.7syh9.css&quot;/&gt;&lt;script type=&quot;module&quot; src=&quot;/_astro/ec.0vx5m.js&quot;&gt;&lt;/script&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#f6f3ea&quot;&gt;{:.callout}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#f6f3ea&quot;&gt;This is a callout&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;{:.callout}This is a callout&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Which wasn’t exactly easy to work with and more importantly, if I ever decided to switch away from Jekyll and export all my markdown files, wasn’t exactly obvious or intuitive.&lt;/p&gt;
&lt;p&gt;What I really wanted was the ability to use HTML- or React-like components in my markdown. And as with web components or react components, I wanted to define these as self-contained components with scoped CSS and the like.&lt;/p&gt;
&lt;p&gt;So in early 2023 I started playing with &lt;a href=&quot;https://astro.build/&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;AstroJS&lt;/a&gt;. The most appealing thing about it was the native support for &lt;a href=&quot;https://mdxjs.com/&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;MDX&lt;/a&gt;, its React-like component architecture where &lt;code&gt;.astro&lt;/code&gt; files contain scoped HTML, CSS and JS, and the relatively small amount of boilerplate needed to get a blog up-and-running.&lt;/p&gt;
&lt;p&gt;I quietly ported this site over to Astro, but with the release of Astro 3.0 in August ‘23 so much had changed that it made more sense to start again from scratch. So I switched to the &lt;a href=&quot;https://github.com/dannysmith/dannyis-astro/&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;current codebase&lt;/a&gt; around the time Astro 4.0 dropped in December ‘23.&lt;/p&gt;
&lt;h2 id=&quot;why-astro&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#why-astro&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Why Astro?&lt;/h2&gt;
&lt;h3 id=&quot;modern-simple--content-first&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#modern-simple--content-first&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Modern, Simple &amp;amp; Content-First&lt;/h3&gt;
&lt;p&gt;Astro is very well designed, and because it’s built with a modern TypeScript-based stack, it comes with all the advantages you’d expect (typesafe javascript among them).&lt;/p&gt;
&lt;p&gt;When used as an SSG, Astro is also very simple. File-based routing, markdown parsing and YAML frontmatter Just Work™ and stuff like image optimisation come out-of-the-box. And while composing pages from astro components &lt;em&gt;feels&lt;/em&gt; very Reactish, it’s “zero JavaScript by default” – the generated site will only include client-side JS when necessary, which for this site is hardly ever.&lt;/p&gt;
&lt;p&gt;Astro has an extremely strong ecosystem of plugins, tools and themes around it.&lt;/p&gt;
&lt;h3 id=&quot;astro-components--mdx&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#astro-components--mdx&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Astro Components &amp;amp; MDX&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.astro.build/en/basics/astro-components/&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Components&lt;/a&gt; can be anything from a tiny snippet of HTML to a reusable UI component (which takes props and/or content) to a whole page layout. Here’s an &lt;code&gt;example.astro&lt;/code&gt; component:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;html&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;---&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;const { title } = Astro.props;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;const theNumber = Math.random();&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;---&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;section&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;mything&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;h1&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;gt;{title}&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;h1&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;p&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;gt;Number: {theNumber}&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;p&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;section&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;style&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;h1&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;color&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;red&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;style&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;is:inline&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2&quot;&gt;alert&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;Hello&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;---const { title } = Astro.props;const theNumber = Math.random();---&lt;section class=&amp;#34;mything&amp;#34;&gt;  &lt;h1&gt;{title}&lt;/h1&gt;  &lt;p&gt;Number: {theNumber}&lt;/p&gt;&lt;/section&gt;&lt;style&gt;  h1 {    color: red;  }&lt;/style&gt;&lt;script is:inline&gt;  alert(&apos;Hello&apos;);&lt;/script&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;ol class=&quot;long-list-items&quot;&gt;
&lt;li&gt;The TypeScript in the &lt;em&gt;component script&lt;/em&gt; at the top runs only at build time. The ability to co-locate this “server-side” code with the component is useful for keeping things organised.&lt;/li&gt;
&lt;li&gt;The &lt;em&gt;component template&lt;/em&gt; (below the last &lt;code&gt;---&lt;/code&gt;) is the HTML which will be rendered when the component is used, except (much like JSX) you can use variables defined in the &lt;em&gt;component script&lt;/em&gt;, or other Astro components imported in it.&lt;/li&gt;
&lt;li&gt;The CSS in the style tag is scoped to this astro component only.&lt;/li&gt;
&lt;li&gt;The script tag at the bottom uses a special astro directive, and will be executed client-side.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Building a site using Astro components is much the same as using React components (or &lt;em&gt;partials&lt;/em&gt; in other SSGs). But the real power is using them &lt;strong&gt;inside Markdown Content&lt;/strong&gt;.&lt;/p&gt;
&lt;h4 id=&quot;mdx-components&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#mdx-components&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;MDX Components&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://mdxjs.com/&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;MDX&lt;/a&gt; lets you use JSX inside markdown files, and is one of the main reasons I chose Astro over other SSGs. In Astro, you can import &lt;code&gt;.astro&lt;/code&gt; components into &lt;code&gt;mdx&lt;/code&gt; files and use them in the same way you can anywhere else. I’ve ended up with quite a lot of &lt;em&gt;really simple&lt;/em&gt; components which just render some HTML and apply some scoped CSS to it. Here’s my &lt;code&gt;highlight.astro&lt;/code&gt; component:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;html&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;span&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;highlight&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;slot&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#FF7B71;--0fs:italic;--0td:underline&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;span&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;style&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;.highlight&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;background&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(--color-highlight-bg);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;padding&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;8&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;px&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;px&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;border-radius&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;px&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;style&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;&lt;span class=&amp;#34;highlight&amp;#34;&gt;&lt;slot /&gt;&lt;/span&gt;&lt;style&gt;  .highlight {    background: var(--color-highlight-bg);    padding: 0 8px 4px;    border-radius: 4px;  }&lt;/style&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;And now when I’m writing in markdown I can use it like this:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;md&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;Here is some text &amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;highlight&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;gt;that is highlighted&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;highlight&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;gt;.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;Here is some text &lt;highlight&gt;that is highlighted&lt;/highlight&gt;.&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;And with more complex components like callouts…&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;md&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;Callout&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;emoji&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;💡&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;blue&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;Lorem ipsum dolor sit amet consectetur adipisicing elit. Earum hic a dolorem ipsa labore cum.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;Callout&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;&lt;Callout emoji=&amp;#34;💡&amp;#34; type=&amp;#34;blue&amp;#34;&gt;  Lorem ipsum dolor sit amet consectetur adipisicing elit. Earum hic a dolorem ipsa labore cum.&lt;/Callout&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;…which renders…&lt;/p&gt;
&lt;aside class=&quot;callout&quot; data-callout-color=&quot;blue&quot; data-astro-cid-pyumqe5w&gt; &lt;div class=&quot;icon-wrapper&quot; data-astro-cid-pyumqe5w&gt; &lt;div class=&quot;icon&quot; data-astro-cid-pyumqe5w&gt; 💡 &lt;/div&gt; &lt;/div&gt; &lt;div class=&quot;content-wrapper&quot; data-astro-cid-pyumqe5w&gt;  &lt;div class=&quot;content content-trim&quot; data-astro-cid-pyumqe5w&gt; &amp;lt;p&amp;gt;Lorem ipsum dolor sit amet consectetur adipisicing elit. Earum hic a dolorem ipsa labore cum.&amp;lt;/p&amp;gt; &lt;/div&gt; &lt;/div&gt; &lt;/aside&gt;
&lt;p&gt;The combination of Astro’s component-based architecture and &lt;em&gt;components-in-MDX-files&lt;/em&gt; ticks some important boxes for me:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components make for easy maintenance long term, especially when dealing with CSS.&lt;/li&gt;
&lt;li&gt;Scoped CSS and JavaScript mean I can iterate on styles without worrying about breaking other parts of the site.&lt;/li&gt;
&lt;li&gt;Using components in Markdown makes it extremely easy and quick to write fully featured content.&lt;/li&gt;
&lt;li&gt;If I ever want to switch away from Astro, the structure of Astro components and how they’re used in Markdown files should make it fairly easy to port my content to another system.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;so-where-am-i-now&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#so-where-am-i-now&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;So Where Am I Now?&lt;/h2&gt;
&lt;p&gt;Two years into running this site on Astro, I’ve settled into a setup that gives me everything I need without much fuss.&lt;/p&gt;
&lt;h3 id=&quot;content-collections&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#content-collections&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Content Collections&lt;/h3&gt;
&lt;p&gt;The site uses two main collections: &lt;strong&gt;Articles&lt;/strong&gt; and &lt;strong&gt;Notes&lt;/strong&gt;. Articles are long-form pieces like this one – they live in &lt;code&gt;/writing/&lt;/code&gt; and support cover images, tags, and a bunch of other metadata. Notes are shorter, usually links to interesting things I’ve found with a bit of commentary. They’re deliberately minimal: just a title, optional source URL, and publication date. Both use the same filename pattern (&lt;code&gt;YYYY-MM-DD-slug.mdx&lt;/code&gt;) which keeps things organised and makes it dead simple to create new content.&lt;/p&gt;
&lt;h3 id=&quot;plugins&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#plugins&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Plugins&lt;/h3&gt;
&lt;p&gt;I’m using a handful of plugins that handle the boring stuff so I don’t have to think about it:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Expressive Code&lt;/strong&gt; handles syntax highlighting for code blocks.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Astro Icon&lt;/strong&gt; lets me use SVG icons without manually importing and managing them. I can just drop &lt;code&gt;&amp;lt;Icon name=&amp;quot;heroicons:home&amp;quot; /&amp;gt;&lt;/code&gt; into any component.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sitemap&lt;/strong&gt; generates a sitemap.xml automatically, which is one of those things that’s trivial but annoying to maintain by hand.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;On the markdown processing side, I’m using a few rehype plugins:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;rehype-autolink-headings&lt;/strong&gt; adds anchor links to headings (so you can link to specific sections)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;rehype-external-links&lt;/strong&gt; automatically opens external links in new tabs&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;rehype-mermaid&lt;/strong&gt; renders mermaid diagrams at build time.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I’ve also got a custom remark plugin that calculates reading time for articles.&lt;/p&gt;
&lt;h3 id=&quot;components&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#components&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Components&lt;/h3&gt;
&lt;p&gt;I’ve got about fifteen components in &lt;code&gt;src/components/mdx/&lt;/code&gt; – things like &lt;code&gt;&amp;lt;Callout&amp;gt;&lt;/code&gt; for highlighted notes, &lt;code&gt;&amp;lt;Accordion&amp;gt;&lt;/code&gt; for collapsible sections, &lt;code&gt;&amp;lt;BookmarkCard&amp;gt;&lt;/code&gt; for pretty link cards, and &lt;code&gt;&amp;lt;Notion&amp;gt;&lt;/code&gt; for embedding Notion links. Nothing fancy – just small bits of HTML with scoped styles.&lt;/p&gt;
&lt;p&gt;The page layouts are simple – components like &lt;code&gt;BaseHead&lt;/code&gt;, &lt;code&gt;MainNavigation&lt;/code&gt;, and &lt;code&gt;Footer&lt;/code&gt; get composed into layout templates like &lt;code&gt;Article.astro&lt;/code&gt; and &lt;code&gt;Note.astro&lt;/code&gt;, which wrap the markdown content. The whole design system is based on CSS custom properties defined in &lt;code&gt;global.css&lt;/code&gt;, so switching between light and dark themes (or tweaking colours) is just a matter of changing a few variable values.&lt;/p&gt;
&lt;h2 id=&quot;future-plans&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#future-plans&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Future Plans&lt;/h2&gt;
&lt;p&gt;There are some notes &amp;amp; ideas &lt;a href=&quot;https://github.com/users/dannysmith/projects/1&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;on GitHub&lt;/a&gt;, but I’m not in a particular rush to ship any of it. I’d rather spend my time working on &lt;a href=&quot;http://astroeditor.danny.is/&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Astro Editor&lt;/a&gt; or using it to write stuff here.&lt;/p&gt;</content:encoded></item><item><title>AI and ADHD</title><link>https://danny.is/writing/ai-and-adhd/</link><guid isPermaLink="true">https://danny.is/writing/ai-and-adhd/</guid><description>Thoughts on ADHD and Artificial Intelligence</description><pubDate>Thu, 10 Jul 2025 00:00:00 GMT</pubDate><content:encoded>&lt;div class=&quot;intro-paragraph&quot; data-astro-cid-awc6y372&gt; My friend Vicki’s “mate have you considered maybe youse got ADHD” was the first time I remember this topic coming up. That was six years back and I promptly forgot about it. Then two years ago – while ADHD was all the rage on TikTok – my friend Janina had a period of revelation about herself and made me do a bunch of tests. Turns out I probably have Adult ADHD. &lt;/div&gt;  &lt;script type=&quot;module&quot; src=&quot;/home/runner/work/dannyis-astro/dannyis-astro/src/components/mdx/IntroParagraph.astro?astro&amp;type=script&amp;index=0&amp;lang.ts&quot;&gt;&lt;/script&gt;
&lt;p&gt;I’m writing this because I read a couple of posts this week which got me thinking about ADHD again, and because I’ve been knee-deep in AI-related things for the last month. The article below is a response to DHH’s &lt;a href=&quot;https://web.archive.org/web/20241121071802/https://world.hey.com/dhh/cold-reading-an-adhd-affliction-44163793&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;rant&lt;/a&gt; about ADHD, which I remember skimming last year. I only just found Schneems’ response, which had me in stitches more than once…&lt;/p&gt;
&lt;div class=&quot;bookmark-card cq &quot; data-astro-cid-pqznbby6&gt; &lt;a href=&quot;https://www.schneems.com/2024/11/21/my-red-hot-adhd-programming-affliction/&quot; class=&quot;bookmark-link&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; data-astro-cid-pqznbby6&gt; &lt;div class=&quot;bookmark-content&quot; data-astro-cid-pqznbby6&gt; &lt;span class=&quot;bookmark-title&quot; data-astro-cid-pqznbby6&gt;My Red Hot ADHD Programming &amp;#39;Affliction&amp;#39;&lt;/span&gt; &lt;p class=&quot;bookmark-description&quot; data-astro-cid-pqznbby6&gt;Sorry, Dave, ADHD is real, and (not acknowledging it) can hurt you. Hi. I’m Richard. I’m a Ruby Core Contributor. I also code in Rust, and enjoy giving talks...&lt;/p&gt; &lt;span class=&quot;bookmark-domain&quot; data-astro-cid-pqznbby6&gt;schneems.com&lt;/span&gt;  &lt;/div&gt; &lt;img src=&quot;https://www.dropbox.com/s/42clbofxmhu97ct/Screenshot%202024-11-21%20at%208.26.53%E2%80%AFPM.png?raw=1&quot; alt=&quot;&quot; loading=&quot;lazy&quot; data-astro-cid-pqznbby6&gt; &lt;/a&gt; &lt;/div&gt;
&lt;p&gt;He makes a lot of good points, but two bits cracked me up &lt;strong&gt;in relation to myself&lt;/strong&gt;…&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;My biggest behavioral issue was that I snuck books into class and read them under my desk. If your mental picture of someone with ADHD is an out-of-control “little monster,” then this seems like the opposite. I got through college with a degree, taught myself Ruby on Rails&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I also snuck books into school to read under the desk. One teacher gave me detention for it. Others brought me &lt;em&gt;really interesting&lt;/em&gt; books from home (in one case a giant stack of New Scientist magazines), and occasionally let me get away with reading &lt;em&gt;over&lt;/em&gt; the desk instead of doing whatever I was supposed to be doing. And like Schneems, I also got through university with a degree and taught myself Ruby on Rails.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;One day, I was having an argument with my wife. It was about how I never planned dates. It got heated. She had to go to a meeting, and I planned to return to the conversation “Hey, how about we grab lunch after your meeting to talk it over.” I realized that I needed to meet the basic expectations of planning events and trying to compensate for them by taking action then and there. The suggestion might seem trite or pandering, but she thought it was good and agreed.&lt;/p&gt;
&lt;p&gt;An hour later, she walked into my office (garage), and I literally couldn’t remember why she was there. Or rather, I was in the middle of another task, and when she walked in, I had to rack my brain to quickly retrieve the info that would provide context to her: “I’m here.” It took a split second too long, and she noticed. Turns out that I don’t “have a good memory.” What I have is the ability to recall extremely detailed information about a situation, given that I’m primed with the context.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I laughed out loud at this for like five minutes. In the two years since my friend Janina made me do those tests, we’ve laughed a lot at how differently this stuff affects each of us. The venn diagram of our symptoms barely overlaps. What Schneems describes here is not a thing for her at all, but it &lt;strong&gt;very much is for me&lt;/strong&gt;. Janina and I share a house, so she’s seen (and been frustrated by) many versions of this over the years. See also my ex-girlfriends. And colleagues. And friends. Every single person I sent that quote to laughed – especially at the last two sentences.&lt;/p&gt;
&lt;p&gt;Those last sentences are a beautifully concise version of something I’ve always struggled to articulate about myself: &lt;em&gt;“What I have is the ability to recall extremely detailed information about a situation, given that I’m primed with the context.”&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;You and me both, Schneems. You and me both.&lt;/p&gt;
&lt;hr/&gt;
&lt;p&gt;Entirely unrelated, I stumbled upon this wonderfully creative site:&lt;/p&gt;
&lt;div class=&quot;bookmark-card cq &quot; data-astro-cid-pqznbby6&gt; &lt;a href=&quot;https://www.adhdexperience.com/&quot; class=&quot;bookmark-link&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; data-astro-cid-pqznbby6&gt; &lt;div class=&quot;bookmark-content&quot; data-astro-cid-pqznbby6&gt; &lt;span class=&quot;bookmark-title&quot; data-astro-cid-pqznbby6&gt;https://www.adhdexperience.com/&lt;/span&gt;  &lt;span class=&quot;bookmark-domain&quot; data-astro-cid-pqznbby6&gt;adhdexperience.com&lt;/span&gt; &lt;p class=&quot;bookmark-fallback&quot; data-astro-cid-pqznbby6&gt;Preview unavailable - click to visit&lt;/p&gt; &lt;/div&gt;  &lt;/a&gt; &lt;/div&gt;
&lt;p&gt;Once I’d stopped puzzling over how on earth this was built on Wix, I read the list of symptoms. It’s been two years since I read a list of ADHD symptoms and I properly chuckled at how many apply to me. I’ve circled those which I &lt;strong&gt;definitely&lt;/strong&gt; experience (and I’m sure my friends would recognise) below.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/_astro/adhd-screenshot.C9e6aqIX_Z21u1g5.webp&quot; srcset=&quot;/_astro/adhd-screenshot.C9e6aqIX_SbSVK.webp 640w, /_astro/adhd-screenshot.C9e6aqIX_ZU8sO0.webp 750w, /_astro/adhd-screenshot.C9e6aqIX_Z2kDVrn.webp 828w, /_astro/adhd-screenshot.C9e6aqIX_Z2x4rOH.webp 1080w, /_astro/adhd-screenshot.C9e6aqIX_Z1oUdjr.webp 1280w, /_astro/adhd-screenshot.C9e6aqIX_2nbSmN.webp 1668w, /_astro/adhd-screenshot.C9e6aqIX_1IcTl0.webp 2048w, /_astro/adhd-screenshot.C9e6aqIX_Z21u1g5.webp 2155w&quot; alt=&quot;Screenshot of ADHD Symptoms&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; sizes=&quot;(min-width: 2155px) 2155px, 100vw&quot; data-astro-image=&quot;constrained&quot; data-astro-image-fit=&quot;cover&quot; data-astro-image-pos=&quot;center&quot; width=&quot;2155&quot; height=&quot;1577&quot;&gt;&lt;/p&gt;
&lt;aside class=&quot;callout&quot; data-callout-color=&quot;default&quot; data-astro-cid-pyumqe5w&gt;  &lt;div class=&quot;content-wrapper&quot; data-astro-cid-pyumqe5w&gt;  &lt;div class=&quot;content content-trim&quot; data-astro-cid-pyumqe5w&gt; Over the last 20 years I’ve developed some &amp;lt;strong&amp;gt;extremely good&amp;lt;/strong&amp;gt; mechanisms for dealing with many of these symptoms (without which I’d have circled &amp;lt;em&amp;gt;everything&amp;lt;/em&amp;gt; bar four). I also have fairly good mechanisms for many of those I circled, but not yet to the extent they don’t affect me. &lt;/div&gt; &lt;/div&gt; &lt;/aside&gt;
&lt;h2 id=&quot;me-and-adhd&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#me-and-adhd&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Me and ADHD&lt;/h2&gt;
&lt;p&gt;When ADHD was all over TikTok, loads of friends were prodding me about getting a formal diagnosis. I didn’t seek one because knowing whether I &lt;em&gt;Have ADHD&lt;/em&gt; or not wasn’t &lt;strong&gt;useful to me&lt;/strong&gt;, and still isn’t.&lt;/p&gt;
&lt;p&gt;Most people I know – when faced with mountains of evidence that &lt;em&gt;you very obviously have ADHD&lt;/em&gt; – reacted with some version of “OMG this explains soooo much, this is really helpful to know”. And for most of them it’s been &lt;strong&gt;really&lt;/strong&gt; fucking helpful.&lt;/p&gt;
&lt;p&gt;My own reaction was one of mild interest. Because while &lt;em&gt;“you very obviously have ADHD”&lt;/em&gt; was news to me, &lt;strong&gt;not one of the symptoms was&lt;/strong&gt; news. I’ve always held the view that these “symptoms” were just kinda &lt;em&gt;how my brain is&lt;/em&gt;. Sure, they make me super-shit at a bunch of things, but they also make weirdly great at other things. Whether I like it or not, they’re how my brain is. And always has been.&lt;/p&gt;
&lt;p&gt;This muted reaction is partly because I’ve been an accidental stoic from a young age – I’ve always thought it insane to try to control the uncontrollable. Things are how they are and unless we can &lt;strong&gt;actually&lt;/strong&gt; change them it’s better to embrace reality and look for what we &lt;em&gt;can&lt;/em&gt; change. I can no more control the symptoms I circled above than I can my emotions. But I can control how I &lt;strong&gt;respond&lt;/strong&gt; to them.&lt;/p&gt;
&lt;p&gt;I realised years ago that my brain was a bit weird. I also learned that any attempt to fundamentally change it was utterly exhausting, felt turbo-shit, and – most importantly – &lt;strong&gt;didn’t work at all&lt;/strong&gt;. And if I couldn’t change how my brain worked, the only sensible response was to happily accept reality, and focus on useful things I &lt;strong&gt;could change&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Which is why I read &lt;em&gt;Getting Things Done&lt;/em&gt; as a weed-smoking seventeen-year-old: I had some vague notion that I couldn’t rely on my brain to stay organised. All my mates thought this was very weird. And when – like most folks who read it – I failed to stick to the “GTD Way” for more than a minute, I took the bits that &lt;strong&gt;actually helped me&lt;/strong&gt; and left the rest behind. And I’ve kinda been doing that ever since.&lt;/p&gt;
&lt;p&gt;The result is: I’m self-employed, work remotely for multiple clients and intentionally avoid anything requiring a fixed 9-5 or Mon-Fri schedule. I write &lt;strong&gt;everything&lt;/strong&gt; down immediately, lest it’s gone when my mental context changes 10 seconds later. Every time-based thing goes straight in my calendar, which is always with me. I own an Apple Watch specifically to poke me when I have meetings. I’ve internalised a bunch of habits which keep my physical space tidy without any conscious mental effort. I have hard rules to avoid impulse purchases and hasty big decisions (fundamentally: “always sleep on it”). &lt;em&gt;And I could go on and on…&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The point is: I’ve been finding out how to work &lt;em&gt;well&lt;/em&gt; with my own brain for decades. Far from being exhausting, the kinda stuff above is &lt;strong&gt;liberating&lt;/strong&gt; when I get it right, because it &lt;strong&gt;feels easy for once&lt;/strong&gt;. Figuring this stuff out, however, is often &lt;em&gt;not&lt;/em&gt; easy. The hard work is always the &lt;strong&gt;figuring out&lt;/strong&gt;, not the sustained doing. Because if sustaining a thing feels hard, I haven’t figured out the hard bit of it yet.&lt;/p&gt;
&lt;p&gt;Whether you have ADHD or not, finding ways to work &lt;strong&gt;with&lt;/strong&gt; your brain rather than &lt;em&gt;against&lt;/em&gt; it will never be a bad thing. And after working heavily with AI for the last few months, I have some embryonic thoughts which I’ll expand on some other time.&lt;/p&gt;
&lt;h2 id=&quot;embryonic-thoughts-on-ai--adhd&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#embryonic-thoughts-on-ai--adhd&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Embryonic Thoughts on AI &amp;amp; ADHD&lt;/h2&gt;
&lt;p&gt;In no particular order, some embryonic thoughts on AI, me, and possibly ADHD…&lt;/p&gt;
&lt;h3 id=&quot;1️⃣-a-focussed-context-window-for-me-not-the-llm&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#1️⃣-a-focussed-context-window-for-me-not-the-llm&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;1️⃣ A Focussed Context Window (for me, not the LLM)&lt;/h3&gt;
&lt;p&gt;When most folks get a WhatsApp message asking if they’re free on such-and-such date they’ll open their calendar app and either reply with an alternative date or add an event to their calendar, before closing it and carrying on with whatever they were doing before.&lt;/p&gt;
&lt;p&gt;When I get a message, 50% likely to do exactly this. But in the other 50% I’ll catch sight of some unrelated meeting or event next week and my brain will instantly switch context to thinking about that. Worst case, this means I forget to deal with the message which caused me to open my calendar in the first place. Best case it takes 15 minutes to refocus my brain on whatever I was doing before.&lt;/p&gt;
&lt;p&gt;And this applies to &lt;strong&gt;loads of shit&lt;/strong&gt;. It’s why I check email at designated times and why none of my tech sends me notifications. This problem is easily solvable by deliberatly doing &lt;em&gt;One Thing At A Time&lt;/em&gt; in an isolated context. Right now I’m writing this post in a super-zen minimalist editor precisely so I don’t get distracted.&lt;/p&gt;
&lt;p&gt;But that’s not how most knowledge work works. Most work constantly requires &lt;strong&gt;context and information&lt;/strong&gt; from places other than where we’re currently working – calendar, meeting notes, slack, notion, the web, etc etc etc etc.&lt;/p&gt;
&lt;p&gt;So the real challenge for me here is creating an environment where I always have the &lt;strong&gt;full context I need for what I’m doing right now but nothing more&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;While I can kinda do this manually it takes way more energy than it does for most folks, so I’m particularly excited about the potential for AI tools to help with this. Which is kinda amusing because – like me – LLMs also operate best when their context window contains &lt;em&gt;exactly&lt;/em&gt; the right stuff.&lt;/p&gt;
&lt;h3 id=&quot;2️⃣-meetings-etc&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#2️⃣-meetings-etc&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;2️⃣ Meetings Etc&lt;/h3&gt;
&lt;p&gt;Meeting recording and transcription tools are a big deal. For most of my life I’ve waged an internal battle between losing myself in the experience of a good meeting and ensuring something useful comes out of it after. Whether I’m stream-of-consciousness jabbering while excitedly hand-waving or listening rapt while others do so, I’m concious that creating &amp;amp; guiding &lt;strong&gt;effective&lt;/strong&gt; conversation – and &lt;strong&gt;capturing the useful bits of it&lt;/strong&gt; – requires skilled facilitation. I often end up in that role, requiring a decision on whether I want to do it well &lt;strong&gt;or&lt;/strong&gt; fully participate in the conversation. Because I absolutely cannot do justice to both at the same time.&lt;/p&gt;
&lt;p&gt;AI cannot &lt;strong&gt;ever&lt;/strong&gt; replace skilled human facilitators. But in the (many) situations where my de facto facilitation role is just preventing unhelpful tangents and ensuring we remember the important bits after… AI &lt;strong&gt;can totally take the latter away from me during the meeting itself&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Paired with &lt;a href=&quot;https://betterat.work/tool/meetings&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;vaguely sensible meeting practices&lt;/a&gt;, AI tools like &lt;a href=&quot;https://www.notion.com/en-gb/product/ai-meeting-notes&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Notion’s meeting recorder&lt;/a&gt; have really helped me to stay present and focussed during calls.&lt;/p&gt;
&lt;h3 id=&quot;3️⃣-faster-side-quests&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#3️⃣-faster-side-quests&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;3️⃣ Faster Side Quests&lt;/h3&gt;
&lt;p&gt;I’m certain there’s a subreddit dedicated to the partners of ADHDish people sharing funny-but-exasperated stories about this afternoon’s progression from &lt;em&gt;quickly cleaning the garage&lt;/em&gt; to &lt;em&gt;driving forty miles for a custom-machined nozzle for the tool that oils the leaf blower&lt;/em&gt; while the contents of the garage remains 50% organised and labelled in excruciating detail and 50% &lt;strong&gt;definitely not going back in the garage before nightfall&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;I’m like this, and I fucking love it. I love that custom-machined nozzle and its metaphorical brothers. I could legitimately argue that my whole career has been a series of semi-random side-quests stacked on top of each other.&lt;/p&gt;
&lt;p&gt;I’m lucky that given enough time I’m pretty good at working back up the chain of side-quests until eventually &lt;strong&gt;the garage ends up clean&lt;/strong&gt;. But that often takes a bit too long, and I run out of time, and the stuff on the drive gets nicked or rained on otherwise ruined. &lt;strong&gt;If only today was longer and I had a floodlight etc&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;LLMs won’t help me with my garage, but they can make a lot of computer-based side-quests &lt;strong&gt;waaaaaay faster&lt;/strong&gt;. More importantly, they significantly reduce the time between me embarking on a side-quest and realising either A) it’s more than a side-quest and I should treat it as such or B) it’s not worth persuing. I’m talking weeks to hours in some cases.&lt;/p&gt;
&lt;p&gt;TL;DR: LLMs have allowed me to follow side-on-side-on-side-quests and come back up the &lt;em&gt;callback chain&lt;/em&gt; in a reasonable timeframe way more than I could before. Which is both fun and useful.&lt;/p&gt;
&lt;h3 id=&quot;4️⃣-context-switching-when-bored&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#4️⃣-context-switching-when-bored&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;4️⃣ Context Switching When Bored&lt;/h3&gt;
&lt;p&gt;I get bored way to easily. But I also hyperfocus easily. I’m lucky enough that I’ve worked out how to blend those things into something which makes me good at learning things and doing things.&lt;/p&gt;
&lt;p&gt;A large part of that is my ability to maintain focus on things in a macro sense over periods of time. But the one thing I &lt;strong&gt;cannot fucking do&lt;/strong&gt; is maintain focus in a micro-sense when it’s gone. In the course of writing this article I’ve walked downstairs six times to smoke a cigarette and twice to make a cup of tea. I’ve folded five T-Shirts, weighed myself and noted the result in my journal and resisted countless urges to open a web browser.&lt;/p&gt;
&lt;p&gt;None of those things took more than 5 minutes and none distracted my macro-brain from this article. But without them I’d have been impotently raging at my keyboard.&lt;/p&gt;
&lt;p&gt;Because while I need that &lt;strong&gt;focused context window&lt;/strong&gt; in a macro-sense, I need regular mini-distractions in the micro sense.&lt;/p&gt;
&lt;p&gt;Surprisingly, I’ve found that doing &lt;strong&gt;at most two things at once&lt;/strong&gt; with agentic AI tools ticks this box. I legit smoke fewer cigarettes when working on two unrelated tasks using AI agents. When I need a break from hard thinking about Thing A, I set an agent off doing something useful on it and context switch to checking in on what AI has done on Thing B. Prodding Thing B’s AI towards the next thing is just enough of a break to bring my brain back to Thing A. 🔄.&lt;/p&gt;
&lt;p&gt;This only seems to work if Things A &amp;amp; B are not the same complexity. AI coding agents (in Aug 2025) don’t have sufficiently nuanced mental models to make non-trivial decisions about software engineering – nuanced mental models is my job as the human overseer. But if I’m doing that for Thing A, I need Thing B to need the same &lt;em&gt;nuanced mental models&lt;/em&gt; I’d give to smoking a cigarette or making a cuppa.&lt;/p&gt;
&lt;p&gt;When this works, context switching between two tasks &lt;strong&gt;improves my ability to focus on both&lt;/strong&gt;. Which is new to me (despite many attempts to kid myself otherwise in the past).&lt;/p&gt;
&lt;h2 id=&quot;wrapping-up&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#wrapping-up&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Wrapping up…&lt;/h2&gt;
&lt;p&gt;Writing this has been weirdly cathartic because it’s the first time I’ve properly ordered &lt;em&gt;any&lt;/em&gt; thoughts about this stuff. But also because whether we’re talking about AI or our own brains my parting message is the same…&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;This is what it is, and pretending otherwise is foolish. Our job is to work out how to use it in a way that’s positive for both ourselves and the wider world&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;I don’t think AI will ever be better at 👆 than humans. Solong as we give it the time of day.&lt;/p&gt;</content:encoded></item><item><title>Personal CRMs Aren&apos;t What I Need</title><link>https://danny.is/writing/personal-crms-clay-earth-is-not-what-i-need/</link><guid isPermaLink="true">https://danny.is/writing/personal-crms-clay-earth-is-not-what-i-need/</guid><description>My honest take on why personal CRMs fail for relationship-building. Alternative approaches to managing professional networks by remote work expert Danny Smith.</description><pubDate>Mon, 05 Feb 2024 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;I paid a 12-month subscription for a Personal CRM called &lt;a href=&quot;https://clay.earth/&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Clay&lt;/a&gt; because I need help “managing my personal and professional relationships”. It’s not bad software. BUT…&lt;/p&gt;
&lt;p&gt;It turns out what I need is &lt;strong&gt;not Clay&lt;/strong&gt;, or any other “Personal CRM” I’ve found.&lt;/p&gt;
&lt;p&gt;It feels like most of these Personal CRMs are made by folks with very different problems to me.&lt;/p&gt;
&lt;p&gt;I know a lot of founders, execs, freelancers (and salespeople) who are very good at building and maintaining their personal relationships… it’s a &lt;strong&gt;huge&lt;/strong&gt; part of their job after all. Most of them reach out to people, meet new people and get/make a lot of useful intros on a daily basis.&lt;/p&gt;
&lt;p&gt;For them, Clay’s features are probably pretty useful. I can imagine it’s useful knowing it’s Andy’s birthday today, and when you last spoke 9 months Andy was struggling with X, Y and Z and had a baby due in August. And that Andy’s job on LinkedIn changed 3 months ago. Etc. Because all that makes excellent context for a quick email to reopen a conversation.&lt;/p&gt;
&lt;p&gt;If you read that and thought “well duuh what’s a CRM for?” you’re one of the founders/execs/freelancers/salespeople I’m talking about 👆. We probably agree that the job of a personal CRM is keeping information about the people you know organised, current and readily available.&lt;/p&gt;
&lt;p&gt;Which is exactly what all CRMs are for… sales CRMs were originally designed to help salespeople manage exactly this kind of information in a sane way, making it easier to maintain meaningful contextual relationships with customers &amp;#x26; leads.&lt;/p&gt;
&lt;p&gt;But that’s not at all what &lt;strong&gt;I need&lt;/strong&gt; from a “Personal CRM”. If it was I’d happily be using a janky setup of Hubspot, Zoho, Salesforce (💸) or similar to manage my personal relationships.&lt;/p&gt;
&lt;p&gt;What I need is a tool that solves a different set of problems. I need a tool that makes maintaining and growing my personal relationships &amp;#x26; network easy and fun. I need a tool for people who are not good at this stuff in the first place.&lt;/p&gt;
&lt;p&gt;I need a tool that pings me before I meet someone new and suggests context-aware questions &amp;#x26; conversation points. I need a frictionless way to note the important bits down and resurface them appropriately. I need to know when two of my contacts have something non-obvious in common, and an easy way to intro them. I need to be magically reminded that when I last spoke to Anna from Random Startup Ltd she was excited about her family trip to Croatia, and I want that reminder (with context) 3 days after she gets home – or when I happen to end up in Croatia myself.&lt;/p&gt;
&lt;p&gt;When I meet people in real life I invariably have a million great conversations, intro people all over the place and get excited. I am by no means bad at building genuine relationships. I need a tool that helps me feel like that when I’m sat at my desk.&lt;/p&gt;
&lt;p&gt;Most of all, I need a “Personal CRM” which solves an unsolved problem for me…&lt;/p&gt;
&lt;p&gt;I need a tool that makes managing my network of personal relationships feel like the opposite of what salespeople use CRMs for.&lt;/p&gt;
&lt;p&gt;I have a large extended network of people with whom I have potential mutually meaningful relationships. In sales parlance, they’re almost all “very warm”. But for the most part, none of us is trying to sell shit to each other. In common with a lot of other people in that network, I’m crap at maintaining the relationships that constitute it and even crappier at cultivating the second-order relationships that could expand it.&lt;/p&gt;
&lt;p&gt;I need tooling to help me with that.&lt;/p&gt;
&lt;p&gt;Since we’re discussing &lt;strong&gt;Personal CRM&lt;/strong&gt;s, here’s a not-at-all-work-related take…&lt;/p&gt;
&lt;p&gt;My housemate is amazing at maintaining her myriad personal relationships. Nothing to do with her work. She &lt;strong&gt;loves&lt;/strong&gt; buying super-thoughtful presents for people she barely knows. She always remembers to invite randos from the pub to stuff they’d enjoy. She always remembers to message about important stuff in folks’ lives. And very quickly “barely knows” doesn’t apply. This is genuine relationship building done well.&lt;/p&gt;
&lt;p&gt;Meanwhile I’m the opposite (I’d forget my own birthday if said housemate didn’t remind me). Sure, I could learn to behave like her, but it would never be natural and I’d never get off on it the same way she does.&lt;/p&gt;
&lt;p&gt;It feels like every Personal CRM I’ve seen is designed for people like my housemate, or even worse… the I-Am-At-Work equivalent of her. ie. Folks who enjoy and are somewhat good at this stuff.&lt;/p&gt;
&lt;p&gt;Perhaps obviously, it also feels like every Personal CRM I’ve seen &lt;strong&gt;designed by&lt;/strong&gt; this kind of person.&lt;/p&gt;
&lt;p&gt;And it feels like for this kind of person the core value prop of a “Personal CRM” has already been solved by CRMs in general. (Every good salesperson I know maintains a personal CRM of sorts… none use a specific &lt;em&gt;Personal CRM&lt;/em&gt; tool.)&lt;/p&gt;
&lt;p&gt;It feels like at best, a &lt;em&gt;Personal CRM&lt;/em&gt; is slightly tweaked UX presented as a skin over an already-solved problem.&lt;/p&gt;
&lt;p&gt;Meanwhile the problems I have are mostly unsolved by software. I signed up for Clay because I need help “managing my personal and professional relationships”. But what I need is not a tool like Clay. Because everything I said above.&lt;/p&gt;
&lt;p&gt;And I’m convinced I’m not alone here. I know too many people like me who are excellent at building deep, meaningful relationships with a few people, but can’t bridge the gap to doing so more widely.&lt;/p&gt;
&lt;p&gt;I’m equally convinced that &lt;em&gt;none of us&lt;/em&gt; is likely to found a “Personal CRM” startup to address this.&lt;/p&gt;
&lt;p&gt;But my goodness would we throw money at someone who did.&lt;/p&gt;
&lt;p&gt;Does this chime with anyone else? 👆&lt;/p&gt;
&lt;p&gt;PS. I’d love to see Clay’s churn data, segmented by a yes/no to “Do you enjoy buying gifts &amp;#x26; organising birthday parties, and when you have amazing convos with people at conferences, do you message them afterwards?” Then label with &lt;em&gt;potential high-value customer&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;EDIT: Practical Example…&lt;/p&gt;
&lt;p&gt;I bumped into Chase Warrington a bit ago. I’ve been a fan of Chase’s work for ages, and very much look up to him in a work context. He’s exactly the kind of person that should see me stuffing everything I know about him into my “Personal CRM” so I can extract the maximum value from our relationship.&lt;/p&gt;
&lt;p&gt;But that’d be mental because neither of us are arseholes, we’ve got nothing to sell each other and &lt;strong&gt;fuck basing any relationship on the extraction of value&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;I want a Personal CRM that’s like “Chase just interviewed someone you know on his podcast, you should listen to that one and then maybe WhatsApp them both?” or “Chase is in London right now and he’d definitely like this band you’re going to see tomorrow but FYI he’s here for a funeral”.&lt;/p&gt;</content:encoded></item><item><title>Building Healthy Remote Organizations - The Silent Enabler of Success</title><link>https://danny.is/writing/organisational-health/</link><guid isPermaLink="true">https://danny.is/writing/organisational-health/</guid><description>How to build resilient, calm organizations that scale successfully. Proven strategies for organizational health and team effectiveness.</description><pubDate>Thu, 10 Feb 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;For a long time I’ve believed that &lt;strong&gt;organisational health&lt;/strong&gt; is a hugely undervalued ingredient for success – especially for startups that are scaling fast. &lt;strong&gt;It’s the silent enabler of so much else&lt;/strong&gt;. Before I give you my take on it, here’s a succinct definition of Organisational Health…&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;An organization’s ability to function effectively, to cope adequately, to change appropriately, and to grow from within.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;For me it’s about intentionally creating a resilient, cohesive organisation that can operate with a sustained sense of &lt;strong&gt;calm&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Really healthy organisations tend to feel calm even when they’re ploughing through unknown waters at a thousand miles per hour. They’re able to operate on the edge of chaos without becoming chaotic.&lt;/p&gt;
&lt;p&gt;Despite the obvious benefits of a healthy organisation, it’s often neglected – I think for a few reasons…&lt;/p&gt;
&lt;ol class=&quot;long-list-items&quot;&gt;
&lt;li&gt;It seems &lt;strong&gt;kinda boring&lt;/strong&gt; – we’re conditioned to believe the best solutions come from fancy, innovative approaches. Being healthy isn’t complex or innovative… but it does takes sustained &lt;strong&gt;effort&lt;/strong&gt;. And there’s none of the adrenaline which usually comes with startup leadership.&lt;/li&gt;
&lt;li&gt;It’s &lt;strong&gt;very hard to quantify results&lt;/strong&gt;. The best measurements of organisational health are whatever we use to measure general success (growth, revenue etc) but this makes it very hard to measure the effect of work. As always, &lt;em&gt;useful&lt;/em&gt; proxy metrics are hard to find.&lt;/li&gt;
&lt;li&gt;It needs a &lt;strong&gt;holistic approach&lt;/strong&gt; - it cuts across leadership, operations and people functions, as well as every other function in a business. Which makes it hard.&lt;/li&gt;
&lt;li&gt;Founders are often &lt;strong&gt;unskilled in this domain&lt;/strong&gt; – the skills needed to grow a healthy organisation often feel quite at odds with the other skills required to be a good founder. (Some only realise this when the wheels fall off but I’ve met a lot who realised from the start, felt horribly inadequate as leaders and stuck their heads in the sand.)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Remote and distributed companies need to be &lt;strong&gt;much healthier&lt;/strong&gt; than office-based firms because co-location allows us to paper over &lt;strong&gt;an awful lot of cracks&lt;/strong&gt;. And systemic health problems have a disproportionately large effect on remote teams, which quickly compounds with scale.&lt;/p&gt;
&lt;h2 id=&quot;so-what-does-a-healthy-organisation-look-like-to-me&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#so-what-does-a-healthy-organisation-look-like-to-me&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;So what does a healthy organisation look like to me?&lt;/h2&gt;
&lt;p&gt;These kinds of things…&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Happy&lt;/strong&gt;, autonomous and empowered people (obviously).&lt;/li&gt;
&lt;li&gt;A unified, coherent senior leadership &lt;strong&gt;team&lt;/strong&gt; exhibiting all the traits &amp;amp; behaviours we’d expect of &lt;em&gt;any other great team&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;Common, well-understood &lt;strong&gt;shared&lt;/strong&gt; norms, habits, behaviours &amp;amp; ways of working. (We could label this “culture”.)&lt;/li&gt;
&lt;li&gt;Common, well-understood &lt;strong&gt;values&lt;/strong&gt; and &lt;strong&gt;principles&lt;/strong&gt; which facilitate aligned independent decision-making at all levels.&lt;/li&gt;
&lt;li&gt;A clear, &lt;em&gt;truthful&lt;/em&gt; and well-understood &lt;strong&gt;structure&lt;/strong&gt; (org design, teams, career levels, salaries etc).&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Excellent&lt;/em&gt; communication everywhere.&lt;/li&gt;
&lt;li&gt;A culture that values &lt;strong&gt;clarity&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;A culture of &lt;strong&gt;trust&lt;/strong&gt; and psychological &lt;strong&gt;safety&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;A culture that cares about &lt;strong&gt;how&lt;/strong&gt; we work, and actively tries to make it better.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Systems&lt;/strong&gt;, processes and &lt;strong&gt;tools&lt;/strong&gt; that make it easy to “operationalise” repetitive work.&lt;/li&gt;
&lt;li&gt;Managers who have the &lt;strong&gt;time&lt;/strong&gt;, &lt;strong&gt;skill&lt;/strong&gt; and &lt;strong&gt;motivation&lt;/strong&gt; to lead and manage well.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;None of these things happen by accident.&lt;/p&gt;
&lt;aside class=&quot;callout&quot; data-callout-color=&quot;default&quot; data-astro-cid-pyumqe5w&gt; &lt;div class=&quot;icon-wrapper&quot; data-astro-cid-pyumqe5w&gt; &lt;div class=&quot;icon&quot; data-astro-cid-pyumqe5w&gt; 💡 &lt;/div&gt; &lt;/div&gt; &lt;div class=&quot;content-wrapper&quot; data-astro-cid-pyumqe5w&gt;  &lt;div class=&quot;content content-trim&quot; data-astro-cid-pyumqe5w&gt; &amp;lt;p&amp;gt;While it helps and is amazing to be part of, &amp;lt;strong&amp;gt;I don’t think shared passion for the mission is
necessary&amp;lt;/strong&amp;gt; – there are thousands of very healthy companies whose people don’t really give a damn
about the mission. (Potential exception: your senior leadership team.)&amp;lt;/p&amp;gt; &lt;/div&gt; &lt;/div&gt; &lt;/aside&gt;
&lt;h2 id=&quot;so-when-should-you-start-thinking-about-organisational-health&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#so-when-should-you-start-thinking-about-organisational-health&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;So when should you start thinking about organisational health?&lt;/h2&gt;
&lt;p&gt;Short answer: &lt;strong&gt;as soon as you reasonably can.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Small, young companies get disproportionally large gains from the effort, which &lt;strong&gt;compound over time&lt;/strong&gt;. Without the right foundations this all gets exponentially harder as you scale (and as your collective habits and ways of working become entrenched). I’ve seen way too many companies ignore this stuff until they’ve raised a Series B and the wheels start falling off.&lt;/p&gt;
&lt;p&gt;Having the foundations for a &lt;strong&gt;super healthy&lt;/strong&gt; organisation allow you to scale quickly without as much pain, and help things stay calm as the organisation rapidly becomes more complex.&lt;/p&gt;
&lt;aside class=&quot;callout&quot; data-callout-color=&quot;default&quot; data-astro-cid-pyumqe5w&gt; &lt;div class=&quot;icon-wrapper&quot; data-astro-cid-pyumqe5w&gt; &lt;div class=&quot;icon&quot; data-astro-cid-pyumqe5w&gt; 💡 &lt;/div&gt; &lt;/div&gt; &lt;div class=&quot;content-wrapper&quot; data-astro-cid-pyumqe5w&gt;  &lt;div class=&quot;content content-trim&quot; data-astro-cid-pyumqe5w&gt; &amp;lt;p&amp;gt;If you’re a tiny seed-stage startup scrambling to find product-market fit, you should probably
focus 💯 on that (solid foundations are useless if they’re the wrong shape for the house, or you
never build it). But &amp;lt;strong&amp;gt;as soon as you reasonably can&amp;lt;/strong&amp;gt;, step back and think about how to build a
healthy organisation.&amp;lt;/p&amp;gt; &lt;/div&gt; &lt;/div&gt; &lt;/aside&gt;
&lt;h2 id=&quot;so-how-do-we-start-getting-healthier-&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#so-how-do-we-start-getting-healthier-&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;So how do we start getting healthier? 🌱&lt;/h2&gt;
&lt;p&gt;Firstly, we need to believe it’s &lt;em&gt;at least&lt;/em&gt; as important as our other business aims. Being healthy is unlikely to be the number one goal but, as with human health, unless we make a strong commitment to it, it’ll always lose out to other more pressing stuff.&lt;/p&gt;
&lt;p&gt;Secondly, we need at least one person who’s wholly focussed on keeping our organisation healthy. I’ve seen some amazing small startups where this is the &lt;strong&gt;fundamental&lt;/strong&gt; job of the COO. More recently, I’ve seen this owned by a &lt;em&gt;Head of Remote&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;In larger firms I’ve seen teams called &lt;em&gt;Workplace Design&lt;/em&gt;, &lt;em&gt;Office of the COO&lt;/em&gt;, &lt;em&gt;Remote Operations&lt;/em&gt;, &lt;em&gt;People Operations&lt;/em&gt;, (plain old) &lt;em&gt;Operations&lt;/em&gt;, and the like. The one thing these have in common is that they are 100% focussed on making the &lt;strong&gt;company itself&lt;/strong&gt; as healthy as possible.&lt;/p&gt;
&lt;p&gt;Ultimately, keeping an organisation healthy will always be a joint effort led by people like…&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;COO, VP Ops etc&lt;/li&gt;
&lt;li&gt;CPO, VP People etc&lt;/li&gt;
&lt;li&gt;Chief of Staff, Head of Remote etc&lt;/li&gt;
&lt;li&gt;Leaders specific to the company’s core business (eg CTO for tech companies)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;None of this happens by accident.&lt;/p&gt;
&lt;aside class=&quot;callout&quot; data-callout-color=&quot;default&quot; data-astro-cid-pyumqe5w&gt; &lt;div class=&quot;icon-wrapper&quot; data-astro-cid-pyumqe5w&gt; &lt;div class=&quot;icon&quot; data-astro-cid-pyumqe5w&gt; 💡 &lt;/div&gt; &lt;/div&gt; &lt;div class=&quot;content-wrapper&quot; data-astro-cid-pyumqe5w&gt;  &lt;div class=&quot;content content-trim&quot; data-astro-cid-pyumqe5w&gt; &amp;lt;p&amp;gt;I nicked the term &amp;lt;strong&amp;gt;Organisational Health&amp;lt;/strong&amp;gt; from &amp;lt;em&amp;gt;&amp;lt;a href=&amp;quot;https://www.tablegroup.com/books/the-advantage/&amp;quot; rel=&amp;quot;noopener noreferrer&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;The Advantage by Patrick
Lencioni&amp;lt;/a&amp;gt;.&amp;lt;/em&amp;gt; The first chapter makes a much fuller
argument for its importance than I have here.&amp;lt;/p&amp;gt; &lt;/div&gt; &lt;/div&gt; &lt;/aside&gt;
&lt;h2 id=&quot;guiding-principles-&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#guiding-principles-&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Guiding Principles 📜&lt;/h2&gt;
&lt;p&gt;Here are a few loose principles I’ve found useful for helping folks approach organisational health. (I could – and probably will – write a whole article on each of them.)&lt;/p&gt;
&lt;h3 id=&quot;1️⃣have-an-internal-focus&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#1️⃣have-an-internal-focus&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;1️⃣ Have an internal focus&lt;/h3&gt;
&lt;p&gt;Most functions in a startup are led by external needs &amp;amp; drivers: Product, Engineering, Sales, Marketing, Strategy, etc… all &lt;em&gt;should&lt;/em&gt; have their eyes set mostly on the outside world.&lt;/p&gt;
&lt;p&gt;We need at least one function which has an internal focus, &lt;strong&gt;treats the company like a product&lt;/strong&gt;, itself as a product team and its employees as users. And this function needs a good product manager.&lt;/p&gt;
&lt;p&gt;Done well, this function is a huge force multiplier for all the others.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“We design how our company works &lt;strong&gt;as thoughtfully as our products&lt;/strong&gt;.”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;2️⃣beware-organisational-debt&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#2️⃣beware-organisational-debt&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;2️⃣ Beware organisational debt&lt;/h3&gt;
&lt;p&gt;Just like a software product accrues technical debt, a company accrues organisational debt. The effects are similar - it gets increasingly harder to get stuff done over time.&lt;/p&gt;
&lt;p&gt;Used strategically, this kind of debt is useful because it lets us move faster, but the tweet below explains why we &lt;strong&gt;must&lt;/strong&gt; be intentional about how we incur it. And how we pay it down.&lt;/p&gt;
&lt;blockquote class=&quot;twitter-tweet&quot;&gt;&lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;&lt;p&gt;The opposite of technical debt isn’t zero debt, it’s compounding gains: each new thing
makes it easier and faster to build new things.&lt;/p&gt;&lt;/p&gt;&lt;p&gt;— Matt Wensing 🐙 (@mattwensing) &lt;/p&gt;&lt;a href=&quot;https://twitter.com/mattwensing/status/1270837000069840896?ref_src=twsrc%5Etfw&quot;&gt;&lt;p&gt;June 10, 2020&lt;/p&gt;&lt;/a&gt;&lt;/blockquote&gt;
&lt;script async src=&quot;https://platform.twitter.com/widgets.js&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;
&lt;h3 id=&quot;3️⃣human--system&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#3️⃣human--system&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;3️⃣ Human + System&lt;/h3&gt;
&lt;p&gt;These are the two fundamental components, and Internal Operations should focus on both:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Human&lt;/strong&gt; - Relationships, culture, leadership, human growth, shared mindset, “vibes” etc.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;System&lt;/strong&gt; - Structure, process, policy, tooling, automation etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These need to be viewed and tackled together and the highest leverage stuff addresses both human &amp;amp; system concerns at the same time (eg. shared behaviours &amp;amp; habits).&lt;/p&gt;
&lt;aside class=&quot;callout&quot; data-callout-color=&quot;default&quot; data-astro-cid-pyumqe5w&gt; &lt;div class=&quot;icon-wrapper&quot; data-astro-cid-pyumqe5w&gt; &lt;div class=&quot;icon&quot; data-astro-cid-pyumqe5w&gt; 🌱 &lt;/div&gt; &lt;/div&gt; &lt;div class=&quot;content-wrapper&quot; data-astro-cid-pyumqe5w&gt;  &lt;div class=&quot;content content-trim&quot; data-astro-cid-pyumqe5w&gt; &amp;lt;p&amp;gt;A garden needs plants (humans) that take their own path. These need thoughtful nurturing. It also
needs pots, trellises, paths (systems) to support the plants. These aren’t nurtured, they’re
engineered. If we want an awesome garden we need to engineer the right systems and nurture the
plants right – this will only work if view both together as a whole. 🌱&amp;lt;/p&amp;gt; &lt;/div&gt; &lt;/div&gt; &lt;/aside&gt;
&lt;h3 id=&quot;4️⃣behaviours--habits-over-processes--tools&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#4️⃣behaviours--habits-over-processes--tools&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;4️⃣ Behaviours &amp;amp; habits &lt;em&gt;over&lt;/em&gt; processes &amp;amp; tools&lt;/h3&gt;
&lt;p&gt;While processes and tools are important, the most effective way to improve an organisation’s health is by improving the habits and default behaviours of its people.&lt;/p&gt;
&lt;p&gt;If you’ve ever tried to impose a new system or process without considering behavioural change, you’ve probably seen a lot of folks ignore it and revert to what they know. &lt;strong&gt;People always fall back on their habits and default behaviours. Especially in groups.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;On the plus side, given the right habits, behaviours, principles, environment etc, people will likely create effective systems &amp;amp; tools on their own.&lt;/p&gt;
&lt;p&gt;That said… used intentionally, processes and tools &lt;strong&gt;can be very powerful tools&lt;/strong&gt; for affecting behaviour &amp;amp; habits. Especially in groups.&lt;/p&gt;
&lt;h3 id=&quot;5️⃣strive-for-clarity&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#5️⃣strive-for-clarity&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;5️⃣ Strive for clarity&lt;/h3&gt;
&lt;p&gt;A culture of clarity reduces day-to-day uncertainty and tends plenty of efficiency savings (especially in distributed companies). But its greatest value comes from how it &lt;strong&gt;reduces the cognitive load on people&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;At best, lack of clarity leads to increased cognitive load as folks struggle to make sense of things and make decisions themselves. At worst, it leads to a culture of uncertainty and stress because in the absence of facts people always assume the worst. In either case, it means people are spending a lot of time thinking and talking about unnecessary stuff.&lt;/p&gt;
&lt;p&gt;Creating clarity in a complex and inherently unclear environment is one of the hardest things about leadership, so leaders often think about clarity in a very macro sense: is everyone clear on our mission? Or our Q3 goals?&lt;/p&gt;
&lt;p&gt;Yet most of the uncertainty, inefficiency &amp;amp; stress I’ve seen comes from lack of clarity on tiny things:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I’ve found five different versions of this template and have two conflicting answers about which one to use here.&lt;/li&gt;
&lt;li&gt;What’s this meeting about? I don’t really know what’s expected of me and what are these weird notes I’ve been sent all about?&lt;/li&gt;
&lt;li&gt;Is it okay to expense my new headphones? How do I do that? Who do I even ask?&lt;/li&gt;
&lt;li&gt;Who should I talk to on the marketing team about this thing? Misha told me Andy, but which Andy? He’s not on the org chart? Wait, is Marketing even the right team?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Creating clarity &amp;amp; consistency on stuff like this is often much harder than it seems – especially in large, fast-growing or globally distributed companies. But done right, it can have an insanely big effect on organisational health.&lt;/p&gt;
&lt;aside aria-label=&quot;Examples&quot; class=&quot;callout&quot; data-callout-color=&quot;default&quot; data-astro-cid-pyumqe5w&gt; &lt;div class=&quot;icon-wrapper&quot; data-astro-cid-pyumqe5w&gt; &lt;div class=&quot;icon&quot; data-astro-cid-pyumqe5w&gt; 💡 &lt;/div&gt; &lt;/div&gt; &lt;div class=&quot;content-wrapper&quot; data-astro-cid-pyumqe5w&gt; &lt;h3 class=&quot;title&quot; data-astro-cid-pyumqe5w&gt;Examples&lt;/h3&gt; &lt;div class=&quot;content content-trim&quot; data-astro-cid-pyumqe5w&gt; &amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Vision &amp;amp;amp; values provide clarity on why we’re all here.&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Consistent systems and processes create clarity about how things work (and &amp;lt;b&amp;gt;why&amp;lt;/b&amp;gt;).&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;Strong principles provide clarity on how to make decisions.&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;Org structure provides contextualised clarity on who’s responsible for what.&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;Mission → strategy → plans provide clarity on where we’re going and how.&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Clear, consistent internal messaging &amp;lt;b&amp;gt;communicates&amp;lt;/b&amp;gt; clarity re everything &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;p&amp;gt;above.
&amp;lt;li&amp;gt;etc.&amp;lt;/li&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/ul&amp;gt; &lt;/div&gt; &lt;/div&gt; &lt;/aside&gt;
&lt;h3 id=&quot;6️⃣practice-simplicity&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#6️⃣practice-simplicity&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;6️⃣ Practice simplicity&lt;/h3&gt;
&lt;p&gt;Simplicity matters because simple things are easy for people to &lt;em&gt;fully&lt;/em&gt; understand and reason about. When designing systems we have to consider the &lt;strong&gt;usefulness and accuracy of the mental models folks form about them&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;It’s much easier to augment folks’ existing &lt;em&gt;correct&lt;/em&gt; mental models than to fix their incorrect ones.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A complex system that works is invariably found to have evolved from a simple system that worked. A complex system designed from scratch never works and cannot be patched up to make it work. You have to start over with a working simple system. — &lt;strong&gt;John Gall&lt;/strong&gt; (1975, p.71)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Designing simple solutions for complicated problems is almost never simple itself, but wherever possible we should aggressively err on the side of simplicity.&lt;/p&gt;
&lt;h3 id=&quot;7️⃣harness-the-power-of-principles&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#7️⃣harness-the-power-of-principles&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;7️⃣ Harness the power of principles&lt;/h3&gt;
&lt;p&gt;Principles are often more useful than rigid rules because when they’re fully understood they allow people to confidently make decisions without constant recourse to others. They also help people understand &lt;strong&gt;the why&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Even when you need rigid rules, clearly explaining the principles which underpin them increases transparency &amp;amp; shared understanding, and helps folks to adapt the rules intelligently.&lt;/p&gt;
&lt;p&gt;For any principles to be useful they need to be well-thought-out, easy to understand and &lt;strong&gt;constantly reinforced by everyone&lt;/strong&gt;. Otherwise, they’re just more words in a document somewhere.&lt;/p&gt;
&lt;h3 id=&quot;8️⃣create-frameworks-as-well-as-tools&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#8️⃣create-frameworks-as-well-as-tools&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;8️⃣ Create frameworks (as well as tools)&lt;/h3&gt;
&lt;p&gt;Our inwards-facing function needs to build an environment &amp;amp; toolset that helps other functions do their best work. But also go one step further and create the environment &amp;amp; meta-tools that allow others to design their own.&lt;/p&gt;
&lt;p&gt;We can’t design an entire company from the top. Nor can we design by general consensus on everything. Instead, we need to provide a framework of strong, consistent guide-rails (principles, tools, practices, structures etc) that everyone trusts.&lt;/p&gt;
&lt;p&gt;This is the kernel of our “Operating System”. If everyone &lt;strong&gt;really&lt;/strong&gt; understands this framework and buys into it, (with a little help) they’ll be able to create their own systems of work on top of it. And our kernel helps keep those systems compatible with each other.&lt;/p&gt;
&lt;p&gt;Doing this is the only real way to create a &lt;strong&gt;truly agile organisation&lt;/strong&gt; that can evolve as it scales.&lt;/p&gt;
&lt;p&gt;Of course, keeping the kernel fit for purpose takes ongoing effort. As does guiding and nurturing the people and systems that use it.&lt;/p&gt;
&lt;hr/&gt;
&lt;p&gt;These are just a few of my thoughts on what it takes to keep an organisation healthy, but hopefully they’ve sparked a few thoughts for you.&lt;/p&gt;
&lt;p&gt;If you take one thing away from this, let it be the idea that creating a great company only happens when we set out to do so with intentionally, and when we get it right the sense of calm it can provide is a silent enabler of so much else.&lt;/p&gt;
&lt;p&gt;And with many of us moving towards remote, globally distributed organisations, all this matters &lt;strong&gt;much more&lt;/strong&gt;.&lt;/p&gt;</content:encoded></item><item><title>Website Redesign Part XVI - A Header and Footer for Articles</title><link>https://danny.is/writing/website-redesign-xvi/</link><guid isPermaLink="true">https://danny.is/writing/website-redesign-xvi/</guid><pubDate>Sat, 29 Aug 2020 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;I pretty much finished designing the article pages back in &lt;a href=&quot;/writing/website-redesign-xi&quot;&gt;Part XI&lt;/a&gt;, and after &lt;a href=&quot;/writing/website-redesign-xv&quot;&gt;deciding on a typeface and some general design rules&lt;/a&gt; for the rest of the site it’s time to finish it off by adding a header and footer to the article pages.&lt;/p&gt;
&lt;h2 id=&quot;the-article-header&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#the-article-header&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;The Article Header&lt;/h2&gt;
&lt;p&gt;Here are a few ideas I played around with for the header.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-08-13-headers1.png&quot; alt=&quot;Header Example 1&quot;&gt;
&lt;img src=&quot;/uploads/2020-08-13-headers2.png&quot; alt=&quot;Header Example 2&quot;&gt;
&lt;img src=&quot;/uploads/2020-08-13-headers3.png&quot; alt=&quot;Header Example 3&quot;&gt;
&lt;img src=&quot;/uploads/2020-08-13-headers4.png&quot; alt=&quot;Header Example 4&quot;&gt;&lt;/p&gt;
&lt;p&gt;Although I quite like some of these, it feels like I’m overcomplicating things a bit. It might be better to go with something really simple for now – just a link back to the homepage in the top left corner.&lt;/p&gt;
&lt;h2 id=&quot;the-article-footer&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#the-article-footer&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;The Article Footer&lt;/h2&gt;
&lt;p&gt;The footer needs to include some links, my name and a copyright notice. After a little playing about I ended up with something like this…&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-08-13-footers1.png&quot; alt=&quot;Footer Example&quot;&gt;&lt;/p&gt;
&lt;p&gt;While I like this, it needs more thought to make in work well on small screens, and I’ll be a challenge to implement without overcomplicating the code because of how I’ve set up the article CSS. So much like the header, I think it makes more sense to keep things simple and just provide a link to the articles index, rather than listing related/recent articles. I expect I’ll revisit this in the future.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-08-13-footers-final.png&quot; alt=&quot;Final Footer&quot;&gt;&lt;/p&gt;
&lt;h2 id=&quot;the-code&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#the-code&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;The Code&lt;/h2&gt;
&lt;p&gt;Here’s what I ended up with for the CSS…&lt;/p&gt;
&lt;script src=&quot;https://gist.github.com/dannysmith/e108ee4b0f243623182e98c6d5c1e8d5.js&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;https://gist.github.com/dannysmith/904d92a12f16a67cc3a0a0df47d4bc1e.js&quot;&gt;&lt;/script&gt;
&lt;p&gt;There’s definitely some scope to simplify this, and to add some more “features” to the footer, but this feels like it’s enough to call the articles &lt;em&gt;done&lt;/em&gt; and move on to the rest of the site.&lt;/p&gt;</content:encoded></item><item><title>Auto Generating Jekyll Posts that Redirect to Medium</title><link>https://danny.is/writing/auto-generating-jekyll-posts-from-medium/</link><guid isPermaLink="true">https://danny.is/writing/auto-generating-jekyll-posts-from-medium/</guid><pubDate>Thu, 13 Aug 2020 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;I’m making quite heavy use of the &lt;a href=&quot;https://github.com/jekyll/jekyll-redirect-from&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;jekyll-redirect-from&lt;/a&gt; plugin. This allows me to create a normal apge or post file with a special frontmatter item and have the page 301 redirect to the specified URL. I’m already using this to forward URLs like &amp;#x3C;danny.is/using&gt; to Notion, but I also want to use it for blog posts that I’ve written elsewhere.&lt;/p&gt;
&lt;p&gt;I’ve recently written an article for &lt;a href=&quot;https://www.delocate.co/&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Delocate&lt;/a&gt;, and I can quickly add that to this site by creating a file in &lt;code&gt;_posts&lt;/code&gt; called &lt;code&gt;2020-07-31-not-all-comms-needs-a-purpose.md&lt;/code&gt; with the following frontmatter.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;/_astro/ec.7syh9.css&quot;&gt;&lt;script type=&quot;module&quot; src=&quot;/_astro/ec.0vx5m.js&quot;&gt;&lt;/script&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;yaml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;title&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;Not all communication needs a definite purpose&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;redirectURL&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;https://www.delocate.co/blog/not-all-communication-needs-a-definite-purpose&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;platform&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;delocate&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;title: Not all communication needs a definite purposeredirectURL: &amp;#x27;https://www.delocate.co/blog/not-all-communication-needs-a-definite-purpose&amp;#x27;platform: delocate&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;The post will behave totally normally as far as Jekyll is concerned, but instead of rendering the empty body, it will 301 redirect to the specified URL.&lt;/p&gt;
&lt;p&gt;Although I’d like to move all my medium posts over to this site in the end, that’s a big job. So for now I want to create a file like this for every medium post I’ve written. Creating 40 of these files by hand isn’t very appealing, so I whipped up a quick ruby script to do it for me.&lt;/p&gt;
&lt;p&gt;I started out trying to parse medium’s RSS feed but it doesn’t include all the posts, so I’m using medium’s private API instead. The script hits the medium API, extracts the data I need into an array and then loops over it creating a correctly formatted file for each post. It lives in &lt;code&gt;scripts&lt;/code&gt; so I can run it whenever I want with &lt;code&gt;ruby ./scriipts/generate_medium_forwards.rb&lt;/code&gt; to pull any new medium articles in.(If the whole &lt;code&gt;Medium&lt;/code&gt; class seems like overkill, it’s because I based this on some old code that was more reusable.) Here’s the code…&lt;/p&gt;
&lt;script src=&quot;https://gist.github.com/dannysmith/f984e6fd68583af0a4ae1e2ea708a84f.js&quot;&gt;&lt;/script&gt;
&lt;p&gt;This worked a treat and I only had one hiccup: I spend far too long trying to work out why many of the articles had identical &lt;code&gt;published_at&lt;/code&gt; dates before I eventually realised that I needed the &lt;code&gt;firstPublishedAt&lt;/code&gt; value rather than the &lt;code&gt;publishedAt&lt;/code&gt; one – the latter gets updated every time the post is edited and re-published.&lt;/p&gt;</content:encoded></item><item><title>Website Redesign Part XV - A typographic system for the rest of this site</title><link>https://danny.is/writing/website-redesign-xv/</link><guid isPermaLink="true">https://danny.is/writing/website-redesign-xv/</guid><pubDate>Wed, 12 Aug 2020 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;When I started this redesign I already had a fairly clear idea of the aesthetic I wanted, based on the existing design. These two pages show that off quite well.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-03-17-dasmith1.png&quot; alt=&quot;Screenshot of existing website homepage&quot;&gt;
&lt;img src=&quot;/uploads/2020-03-17-dasmith2.png&quot; alt=&quot;Screenshot of existing website 404 page&quot;&gt;&lt;/p&gt;
&lt;p&gt;I’m not sure where I got this aesthetic from, but it’s clearly draws on the work of &lt;a href=&quot;https://en.wikipedia.org/wiki/Jan_Tschichold&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Jan Tschichold&lt;/a&gt;. Jan was a typographer and designer who’s famous for a whole load of stuff (go read his Wikipedia page). I particularly like this style, which is closely associated with him.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-08-12-jan1.png&quot; alt=&quot;Jan Tschichold Example 1&quot;&gt;
&lt;img src=&quot;/uploads/2020-08-12-jan2.png&quot; alt=&quot;Jan Tschichold Example 2&quot;&gt;
&lt;img src=&quot;/uploads/2020-08-12-jan3.jpg&quot; alt=&quot;Jan Tschichold Example 3&quot;&gt;
&lt;img src=&quot;/uploads/2020-08-12-jan4.jpg&quot; alt=&quot;Jan Tschichold Example 4&quot;&gt;&lt;/p&gt;
&lt;p&gt;I spent quite a while trying to establish some sort of typographic hierarchy for the rest of the site based partly on some thoughts from my &lt;a href=&quot;/writing/website-redesign-xiii&quot;&gt;last article&lt;/a&gt;. Eventually I realised that this is really hard when I’m going for a deliberately “whacky” aesthetic. The kind of style I’m after doesn’t lend itself well to rigid hierarchy. And the fact I’m likely to size some type with viewport units makes this approach even less sensible.&lt;/p&gt;
&lt;p&gt;So I went back to square one and decided on a few guidelines and constraints in place of a hierarchy:&lt;/p&gt;
&lt;ul class=&quot;contains-task-list&quot;&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; checked disabled&gt; Use type and layout over imagery and effects.&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; checked disabled&gt; The site should always look good in greyscale. While I can use colour, it should never be the main design element.&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; checked disabled&gt; One typeface only, but I can use it in any weight or size that feels right.&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; checked disabled&gt; Always consider visual hierarchy, and be consistent across pages where possible.&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; checked disabled&gt; A grid of 20px, but with permission to ignore wherever it makes sense.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I also settled on a modular component-based approach where possible, and identified a few core components that will be useful in all sorts of contexts going forward. They’re deliberately simple and extensible in their design.&lt;/p&gt;
&lt;h2 id=&quot;deciding-on-a-typeface&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#deciding-on-a-typeface&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Deciding on a typeface&lt;/h2&gt;
&lt;p&gt;I spent way too long &lt;a href=&quot;/writing/website-redesign-v&quot;&gt;choosing a typeface for articles&lt;/a&gt;, so I’m keeping the simple. I decided to stick with &lt;strong&gt;Futura PT&lt;/strong&gt;. It works perfectly for the look I’m going for and looks good in all caps, which I’ll probably be using a lot. This choice has some downsides though: the biggest being that it’s not available for free so I’d have to keep my Adobe Fonts license and accept the dependancy on Adobe’s service.&lt;/p&gt;
&lt;p&gt;I’d pretty much decided to suck that up when I discovered &lt;a href=&quot;https://indestructibletype.com/Jost.html&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Jost*&lt;/a&gt;. It’s a pretty close match for Futura, is open source and available as a variable font. It’s slightly larger than Futura but after a bit of trial and error I think it’s a good trade-off.&lt;/p&gt;
&lt;h2 id=&quot;text-styles--components&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#text-styles--components&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Text Styles &amp;#x26; Components&lt;/h2&gt;
&lt;p&gt;With that decision made, I threw together a few basic components and text styles in Figma. there’s no real system for this – I started with the components, extracted text styles from them and then did my best to consolidate them a bit.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-08-12-typography.png&quot; alt=&quot;Text Styles in Figma&quot;&gt;
&lt;img src=&quot;/uploads/2020-08-12-components.png&quot; alt=&quot;Components in Figma&quot;&gt;&lt;/p&gt;
&lt;p&gt;Having these styles and components is a great starting point for some experimentation. I’m gonna hold off coding them up until I’ve done a few iterations in Figma – I’m sure they’ll change a little bit as I play with them. The only technical work I’ve done is to build Jost’s variable version from source and bring it into my site.&lt;/p&gt;</content:encoded></item><item><title>Website Redesign Part XIII - Taking Stock of Content</title><link>https://danny.is/writing/website-redesign-xiii/</link><guid isPermaLink="true">https://danny.is/writing/website-redesign-xiii/</guid><pubDate>Sun, 12 Jul 2020 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;I’m now pretty happy with how the essays on here look, so it’s time to turn my attention to the rest of the site. Although I have an idea of the aesthetic I’m after, every time I’ve opened Figma to have a play I’ve found myself staring at a blank page wrought with indecision – the dreaded writers block. Or rather, &lt;em&gt;designers block&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;I didn’t feel this at all when designing the essay pages because I had a clear idea of what I was trying to do. I already had content to work with and my only job was to make it as readable and beautiful as possible while keeping things simple. Clear goal. Clear starting point.&lt;/p&gt;
&lt;p&gt;But with the rest of the site it’s not so clear. In Part IV I identified a list of pages I need to design, and I did some high-level pondering on goals and user needs in Part II. But beyond that, I’ve basically got no constrains and no starting point. And it’s paralysing me.&lt;/p&gt;
&lt;p&gt;Back when I made websites for a living, the first thing I’d look at after user goals was a content audit. If the client didn’t have any existing content to audit, we’d focus on the content they &lt;em&gt;thought they were going to have&lt;/em&gt;. So that’s just what I’m going to do now.&lt;/p&gt;
&lt;h2 id=&quot;a-content-audit-for-this-site&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#a-content-audit-for-this-site&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;A Content audit for this site&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-07-11-postit-content-unorganised.png&quot; alt=&quot;Post-it notes of content audit - unorganised&quot;&gt;&lt;/p&gt;
&lt;p&gt;I can think of a hundred other things I might want to put here &lt;em&gt;someday&lt;/em&gt;, but that’s all the stuff I’m thinking about putting here &lt;strong&gt;right now&lt;/strong&gt;.&lt;/p&gt;
&lt;h3 id=&quot;organising-the-post-its&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#organising-the-post-its&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Organising the post-its&lt;/h3&gt;
&lt;p&gt;Let’s take a stab at organising these post-its according to a few different taxonomies. This might seem like overkill for such a small set of content but this exercise often throws up unexpected and creative ideas for organising and grouping. Even if we don’t use them, they can help seed concepts we use elsewhere.&lt;/p&gt;
&lt;h4 id=&quot;by-type&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#by-type&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;By type&lt;/h4&gt;
&lt;p&gt;Let’s start with the most obvious, grouping by content type – the first word of each post-it is a good starting point. We could also group by whether the content is &lt;strong&gt;mostly writing&lt;/strong&gt; (yellow) or &lt;strong&gt;mostly something else&lt;/strong&gt; (orange).&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-07-11-postit-content-type.png&quot; alt=&quot;Post-it notes of content audit - by type&quot;&gt;&lt;/p&gt;
&lt;h4 id=&quot;by-author&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#by-author&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;By author&lt;/h4&gt;
&lt;p&gt;I’ve been thinking a lot about the creation and consumption of information lately, so it’s not surprising this springs to mind as a possible grouping: did I create it, or did I consume it? Some stuff is hard to categorise here – a book recommendation is clearly consumption, but what if I add my own review?&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-07-11-postit-create-consume.png&quot; alt=&quot;Post-it notes of content audit - by author&quot;&gt;&lt;/p&gt;
&lt;h4 id=&quot;by-professional-or-personal&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#by-professional-or-personal&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;By professional or personal&lt;/h4&gt;
&lt;p&gt;Since this is a personal site, we could consider grouping the content by whether or not it’s related to my work.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-07-11-postit-content-personalprofessional.png&quot; alt=&quot;Post-it notes of content audit - by professional or personal&quot;&gt;&lt;/p&gt;
&lt;p&gt;It’s pretty obvious that most of the content types here are focussed on my work. Looking at the &lt;em&gt;both&lt;/em&gt; pile, the vast majority of content represented by each post-it is work-oriented. (While I do read some non-work articles via pocket, they’re in the minority. Likewise for articles on this site. Etc.)&lt;/p&gt;
&lt;p&gt;So this grouping doesn’t feel very useful. Moreover, it doesn’t feel &lt;strong&gt;authentic&lt;/strong&gt; – I’ve always mixed work and play and I’m not really sure where the line between them is. That solitary orange sticky note makes me question whether my music videos belong on this site, though.&lt;/p&gt;
&lt;h4 id=&quot;by-importance&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#by-importance&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;By Importance&lt;/h4&gt;
&lt;p&gt;Some of these post-its are more important to me than others. My writing – whether on this site or elsewhere – is pretty core. As are links to my series’ on Notion. But the books I’m reading are much less important – I could live without having them on this site at all.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-07-11-postit-content-importance.png&quot; alt=&quot;Post-it notes of content audit - by importance&quot;&gt;&lt;/p&gt;
&lt;p&gt;Perhaps the design should emphasise the important and de-emphasise the less-important? Or perhaps the less-important shouldn’t live here at all? My view of what’s important is almost certain to change over time, so if I do emphasise some content based on this it should be easy to change.&lt;/p&gt;
&lt;h4 id=&quot;by-permanence&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#by-permanence&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;By Permanence&lt;/h4&gt;
&lt;p&gt;One of the main reasons I’m moving my writing to my own blog is permanence. I don’t like the fact that Medium controls my content and URLs. I want a more permanent place to put my words. Somewhere they can live forever – &lt;strong&gt;etched in stone&lt;/strong&gt;, as it were.&lt;/p&gt;
&lt;p&gt;The same is not true for other types of content. My tweets are ephemeral, for example: I wouldn’t be overly bothered if they all disappeared one day. Perhaps we could try grouping along these lines – stuff that I care about keeping vs stuff that I don’t.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-07-11-postit-content-permenance.png&quot; alt=&quot;Post-it notes of content audit - by permanence&quot;&gt;&lt;/p&gt;
&lt;h3 id=&quot;but-what-about-the-actual-content&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#but-what-about-the-actual-content&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;But what about the actual content?&lt;/h3&gt;
&lt;p&gt;If you’ve ever done any information architecture you’re probably shouting at your screen right now…&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;BUT YOU HAVEN’T CONSIDERED ANY &lt;strong&gt;ACTUAL CONTENT&lt;/strong&gt;! It doesn’t make sense to group based solely on &lt;em&gt;medium&lt;/em&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;You’ve got a point.&lt;/p&gt;
&lt;p&gt;It’s kind of ridiculous to go through this exercise based only on the medium in which the content exists. We should also be considering things like subject area, target audience and purpose. For large sets of information these things will probably suggest much more useful taxonomies than content type.&lt;/p&gt;
&lt;p&gt;I’ve ignored these so far because I don’t want to base the structure or conceptual design of this site on the topics I’m currently engaging with. I know too well how quickly they can change, and it’s important this site can adapt to those changes without much effort on my part.&lt;/p&gt;
&lt;p&gt;Having said that, I’d be foolish not to at least consider the kind of content I’m producing right now. For the past few years, my interests – and especially the stuff I write about –have fallen in one of four loose categories.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-07-11-postit-content-themes.png&quot; alt=&quot;Content Categories&quot;&gt;&lt;/p&gt;
&lt;p&gt;I’ve started to loosely group these into two super-categories: &lt;strong&gt;Human&lt;/strong&gt; and &lt;strong&gt;Systems&lt;/strong&gt;. The first includes everything where an actual human is the focus – think coaching, mentoring, nurturing etc. The second is focussed on the environment in which humans operate and how it can be engineered to provide the most useful support. I’ve been doing a lot of gardening during lockdown, so if you’ll excuse the metaphor…&lt;/p&gt;
&lt;p&gt;Caring for a garden requires system design and engineering. Plants need the right soil, pots and sunlight. Some need the support of a rigid framework like a trellis. Growing from seed often means adherence to a thoroughly-researched process of feeding and repotting. But on its own, this stuff can’t possibly create a beautiful, thriving garden. Plants need to be nurtured and guided, and they won’t always do what we expect. As gardeners, we must observe individual plants and do what’s best for them, using our intuition and experience to guide us.&lt;/p&gt;
&lt;p&gt;A creeper might grow without a trellis, but it will be in a random direction and will have to work much harder to get up the wall. But a trellis is useless without daily watering and occasionally guidance. And sometimes a creeper will ignore the trellis and decide to weave beautifully around a fence instead. It’s up to us to notice where it’s heading and either correct or encourage it. And perhaps remove the trellis, if it’s not proving useful.&lt;/p&gt;
&lt;p&gt;Like creepers, people need trellis’. They’re the systems, habits, processes and frameworks that support us and make our lives easier.&lt;/p&gt;
&lt;p&gt;We also need nurturing and the freedom to explore our own path. If we have good gardeners looking after us, we can rely on them to guide and prune as needed, and to move or replace the trellis when it isn’t helping.&lt;/p&gt;
&lt;p&gt;The more I reflect, the more sense these two categories make to me. Both &lt;strong&gt;Human&lt;/strong&gt; and &lt;strong&gt;Systems&lt;/strong&gt; work need to be in balance, and my interests can be sorted fairly well into those two buckets. (It’s interesting that the least happy bits of my career have occurred when I’ve been &lt;em&gt;too&lt;/em&gt; focussed on one or the other)&lt;/p&gt;
&lt;p&gt;I’ll explore this idea further outside the context of this redesign, but it provides a reasonable starting point for a top-level grouping of my content.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-07-11-postit-content-themes-super.png&quot; alt=&quot;Content Super Categories&quot;&gt;&lt;/p&gt;
&lt;h3 id=&quot;how-is-all-this-useful&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#how-is-all-this-useful&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;How is all this useful?&lt;/h3&gt;
&lt;p&gt;What can we take from all this, and does any of it help with my &lt;em&gt;designers block&lt;/em&gt;? This process has certainly sparked a few interesting thoughts which I’ll definitely come back to in the future. It’s also sparked a few that are useful now.&lt;/p&gt;
&lt;p&gt;Grouping by &lt;strong&gt;type&lt;/strong&gt; provides a good indication of the components I should think about (Link, Video, Book, Page, Article, Other), but is not useful as a way of actually organising content.&lt;/p&gt;
&lt;p&gt;Grouping by &lt;strong&gt;author&lt;/strong&gt; raises the possibility of subtly differentiating content I’ve created from content I’ve consumed/curated. I’m not sure how useful this distinction will be for readers, but it still appeals to me as something to consider.&lt;/p&gt;
&lt;p&gt;Grouping by &lt;strong&gt;professional/personal&lt;/strong&gt; isn’t really useful, though perhaps my music doesn’t belong on this site and I should just link to youtube.&lt;/p&gt;
&lt;p&gt;Grouping by &lt;strong&gt;importance&lt;/strong&gt; raises the need for flexibility. I need way of focusing attention on stuff that’s important to me right now, knowing it might change over time. This might be as simple as moving stuff that’s currently important to the top of some list, but this has design implications. It should be easy for me to promote/highlight different types of content as my needs change.&lt;/p&gt;
&lt;p&gt;Grouping by &lt;strong&gt;permanence&lt;/strong&gt; doesn’t feel very useful at all.&lt;/p&gt;
&lt;p&gt;Grouping by &lt;strong&gt;Human/System&lt;/strong&gt;, and by the four categories of content feels like a good starting point for some labelling system which I should explore further.&lt;/p&gt;
&lt;h2 id=&quot;keeping-it-simple&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#keeping-it-simple&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Keeping it simple&lt;/h2&gt;
&lt;p&gt;Simplicity is a the core value of this redesign and working through this process has helped me reach a few decisions about how to simplify things.&lt;/p&gt;
&lt;ul class=&quot;contains-task-list long-list-items&quot;&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; checked disabled&gt; I’ve no need for a &lt;strong&gt;coaching&lt;/strong&gt; page right now. I can add this in the future.&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; checked disabled&gt; I still want a &lt;strong&gt;hire me&lt;/strong&gt; page but it makes much more sense for this to live in notion. I’ll forward &lt;code&gt;https://danny.is/lookingforwork&lt;/code&gt; and &lt;code&gt;https://danny.is/hireme&lt;/code&gt; to a public Notion page and be done with it.&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; checked disabled&gt; I won’t show any actual videos on my site. Instead, I’ll present any &lt;strong&gt;video series’&lt;/strong&gt; as links to notion pages or YouTube playlists. I already have these set up.&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; checked disabled&gt; I won’t have a page for my &lt;strong&gt;music&lt;/strong&gt;. I’ll just forward &lt;code&gt;https://danny.is/singing&lt;/code&gt; to my dormant youtube channel. I will show this link on the homepage, though – singing is a big part of who I am.&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; checked disabled&gt; I won’t worry about &lt;strong&gt;notes&lt;/strong&gt; for the moment&lt;sup&gt;&lt;a href=&quot;#user-content-fn-1&quot; id=&quot;user-content-fnref-1&quot; data-footnote-ref=&quot;&quot; aria-describedby=&quot;footnote-label&quot;&gt;1&lt;/a&gt;&lt;/sup&gt;. They’re an important part of how I’d like to share content but aren’t a priority and Notion might well be the best place for them.&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; checked disabled&gt; I don’t care about books at all right now. If I really want to write a book review I can just write an article.&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; checked disabled&gt; &lt;strong&gt;Core design concepts should be expandable to accommodate the unknown&lt;/strong&gt;. For example, these would be bad ideas:
&lt;ul&gt;
&lt;li&gt;Deciding I have three main types of content and basing my entire design concept on “threes”.&lt;/li&gt;
&lt;li&gt;Having all my videos on youtube and Loom, and using their brand colours as core design elements.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;wrapping-up&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#wrapping-up&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Wrapping up&lt;/h2&gt;
&lt;p&gt;I started this article as a way to get over writer’s block, hoping that a content audit would help provide a few constraints and possible design directions. It’s been an interesting little exercise and has definitely helped unblock me, but when I think about it all I’ve really done is intentionally focus my attention the same problem I had in the first place: &lt;em&gt;what should I have on this site and how should I organise it?&lt;/em&gt;. So while this “content audit” was interesting, its real value came from &lt;strong&gt;forcing&lt;/strong&gt; me to consider this problem in a structured, systematic way.&lt;/p&gt;
&lt;section data-footnotes=&quot;&quot; class=&quot;footnotes&quot;&gt;&lt;h2 class=&quot;sr-only&quot; id=&quot;footnote-label&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#footnote-label&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Footnotes&lt;/h2&gt;
&lt;ol&gt;
&lt;li id=&quot;user-content-fn-1&quot;&gt;
&lt;p&gt;If you’re wondering what I mean by &lt;em&gt;notes&lt;/em&gt;, &lt;a href=&quot;https://notes.danny.is/&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;I used to use tumblr for this sort of thing&lt;/a&gt;. &lt;a href=&quot;#user-content-fnref-1&quot; data-footnote-backref=&quot;&quot; aria-label=&quot;Back to reference 1&quot; class=&quot;data-footnote-backref&quot;&gt;↩&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;</content:encoded></item><item><title>Website Redesign Part XIV - Stepping Into Figma</title><link>https://danny.is/writing/website-redesign-xiv/</link><guid isPermaLink="true">https://danny.is/writing/website-redesign-xiv/</guid><pubDate>Sun, 12 Jul 2020 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Figma is one of my new favourite tools. I’ve been an avid fan of Sketch since I first picked it up in 2011. Compared to the other tools available at the time, it was a breath of fresh air. I still remember how excited I felt after I first used it for some actual work.&lt;/p&gt;
&lt;p&gt;The first time I used Figma I had a similar feeling. Everything was just &lt;strong&gt;easy&lt;/strong&gt;. Coming from Sketch, Figma felt comfortable and a lot of the keyboard shortcuts are the same so no need to reconfigure my finger-memory. Figma has some major advantages over Sketch. It’s &lt;strong&gt;web-based&lt;/strong&gt; so it runs on any machine with a browser and my files live in the cloud by default. Anything I can do to simplify my laptop’s setup is a win for me. It also has great multiplayer – working collaboratively is an absolute joy. And it feels simpler than Sketch. The interface feels more intuitive and the way it handles components feels way more natural. So I’m now using Figma for pretty much all my design work.&lt;/p&gt;
&lt;p&gt;Until now, I’ve been designing this site in the browser and haven’t felt the need for a design tool. But now I’m getting to the rest of the site, I know I’ll want to experiment with layout and colour faster than CSS allows. I also want to explore Figma’s component and shared styles features and this feels like a good excuse.&lt;/p&gt;
&lt;h2 id=&quot;text-styles&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#text-styles&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Text Styles&lt;/h2&gt;
&lt;p&gt;We can recreate the styles for these essays pretty easily. If we assume 16px as our base font size, it’s just a matter of doing some maths based on the &lt;code&gt;em&lt;/code&gt; values in our CSS to get the size and line-height of all our text styles. Figma also lets us control some of the more advanced font features we’ve been using in our CSS.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-07-12-figma-fontfeatures.png&quot; alt=&quot;Figma Font Feature Settings&quot;&gt;&lt;/p&gt;
&lt;p&gt;With very little work, we can create a styleguide and create corresponding text styles. Here’s what I ended up with.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-07-12-figma-sypestyles.png&quot; alt=&quot;Text Styles in Figma&quot;&gt;&lt;/p&gt;
&lt;h2 id=&quot;colour-styles&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#colour-styles&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Colour Styles&lt;/h2&gt;
&lt;p&gt;While I haven’t given much thought to colour there are a few colours that I’m using in the CSS, so it makes sense to create some named colour styles and a palette in Figma too.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-07-12-figma-colours.png&quot; alt=&quot;Colour Palette&quot;&gt;&lt;/p&gt;
&lt;h2 id=&quot;grids&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#grids&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Grids&lt;/h2&gt;
&lt;p&gt;Since the &lt;code&gt;line-height&lt;/code&gt; for my essays is 1.5, the baseline grid is 24. I use this measurement quite a lot in the CSS already, both for horizontal and vertical spacing. Figma allows us to create grid styles which we can apply to frames. Let’s create a simple grid style for 24px, and use it to position some content on the grid.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-07-12-figma-baselinegrid.png&quot; alt=&quot;Baseline Grid at 24px&quot;&gt;&lt;/p&gt;
&lt;p&gt;We can also create a grid that represents one line-height’s worth of padding around a frame, like this.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-07-12-figma-paddinggrid.png&quot; alt=&quot;Padding Grid&quot;&gt;&lt;/p&gt;
&lt;p&gt;The trick is to create two grids, one &lt;strong&gt;Rows&lt;/strong&gt; and one &lt;strong&gt;Columns&lt;/strong&gt;, both with the same settings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Count: &lt;strong&gt;1&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Type: &lt;strong&gt;Stretch&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Margin: &lt;strong&gt;24&lt;/strong&gt; (your desired padding)&lt;/li&gt;
&lt;li&gt;Gutter: &lt;strong&gt;0&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Then we can combine both grids by creating a Grid Style that includes them both. And voila, we have a grid that we can apply to any frame to give us the correct guides for padding.&lt;/p&gt;
&lt;h2 id=&quot;components&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#components&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Components&lt;/h2&gt;
&lt;p&gt;Before we can call this minimalist design system done, we need to account for a couple of components that we can’t create using text styles alone: code blocks, blockquotes, lists and horizontal rules. We’ll create these as components, using the text and colour styles we’ve already defined. By using constraints we can ensure the content adapts properly as component instances are resized. Here’s what I ended up with.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-07-12-figma-essay-components.png&quot; alt=&quot;Figma Components&quot;&gt;&lt;/p&gt;
&lt;h2 id=&quot;summary&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#summary&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Summary&lt;/h2&gt;
&lt;p&gt;None of this is especially useful right now, but it’s provided a starting point from which to design the rest of the site and taught me a few things I didn’t know about Figma.&lt;/p&gt;</content:encoded></item><item><title>Website Redesign Part XII - Responsive Images</title><link>https://danny.is/writing/website-redesign-xii/</link><guid isPermaLink="true">https://danny.is/writing/website-redesign-xii/</guid><pubDate>Wed, 01 Jul 2020 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;The last time I built a content-heavy website, responsive images weren’t really a thing. In fact they were a definite problem for most developers. We could control the visual size of an image with percentage widths and media queries, but we had no easy way of controlling the actual image used by the browser. The easiest thing to do was just supply a very big high-res image that would look good on wide viewports and accept that smaller viewport devices would end up downloading a file with more detail than they could use.&lt;/p&gt;
&lt;p&gt;The last time I gave any real attention to this problem I was working on a site with a lot of high-res background images. I dealt with it in three ways. Firstly, I used a jpeg that was too big for even the largest viewport, but with JPEG compression turned all the way up. This was then scaled down with CSS. This actually &lt;em&gt;reduced&lt;/em&gt; the file size, and generally looked pretty good – even on new-fangled retina screens&lt;sup&gt;&lt;a href=&quot;#user-content-fn-1&quot; id=&quot;user-content-fnref-1&quot; data-footnote-ref=&quot;&quot; aria-describedby=&quot;footnote-label&quot;&gt;1&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;
&lt;p&gt;Secondly, I spent ages blurring parts of the image in photoshop. The idea was that the fewer individual colours there were in the JPEG, the smaller the filesize. Take a look at this photo:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-07-02-hot-air-baloon.jpg&quot; alt=&quot;Hot air ballon in the sky&quot;&gt;&lt;/p&gt;
&lt;p&gt;There are probably hundreds of different shades of blue and grey in the sky, each one taking up bytes in the JPEG. By blurring the sky as much as possible, we end up with far fewer shades of blue and so reduce the filesize. Doing this was a pain in the arse.&lt;/p&gt;
&lt;p&gt;All the other stuff involved swapping out images with javascript.&lt;/p&gt;
&lt;p&gt;Thankfully that was ages ago, and we now have some much better ways of handling responsive images. Both &lt;code&gt;secret&lt;/code&gt; and the &lt;code&gt;&amp;#x3C;picture&gt;&lt;/code&gt; element were being talked about when I stopped making websites for a living, but both are now well-supported by modern browsers.&lt;/p&gt;
&lt;h2 id=&quot;srcset&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#srcset&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;SRCSET&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;srcset&lt;/code&gt; attribute allows us to specify different image files to use at different resolutions and viewport widths. It looks like this.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;/_astro/ec.7syh9.css&quot;&gt;&lt;script type=&quot;module&quot; src=&quot;/_astro/ec.0vx5m.js&quot;&gt;&lt;/script&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;html&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;img&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;src&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;small.png&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;alt&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;...&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;srcset&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;medium.png 1000w large.png 2000w&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;&lt;img src=&amp;#x22;small.png&amp;#x22; alt=&amp;#x22;...&amp;#x22; srcset=&amp;#x22;medium.png 1000w large.png 2000w&amp;#x22; /&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;This uses the small version by default, but on larger screens the browser will download and use either the medium or large version of the image. All we have to do is make the three versions and bung them in our &lt;code&gt;/images&lt;/code&gt; folder.&lt;/p&gt;
&lt;p&gt;The general rule here is to use an image of the same dimensions as the original and just scale it down to make the smaller versions. As &lt;a href=&quot;https://css-tricks.com/responsive-images-youre-just-changing-resolutions-use-srcset/&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Chris Coiyer says&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Most responsive images uses will be: “I have multiple versions of this graphic. Here they are, use the right one.”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&quot;the-picture-element&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#the-picture-element&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;The picture element&lt;/h2&gt;
&lt;p&gt;The picture element is far more powerful, but also more complex. It allows us to do a bit more at direction as our image size changes – we can use images of different dimensions and control how they are displayed using media query-like rules. A quick google will turn up umpteen articles on how to do this.&lt;/p&gt;
&lt;h2 id=&quot;images-on-this-website&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#images-on-this-website&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Images on this website&lt;/h2&gt;
&lt;p&gt;Right now, most images on this site are included via standard markdown image tags, and the generated HTML is pretty simple:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;html&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;img&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;src&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;/uploads/an-image.png&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;alt&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;An image&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;&lt;img src=&amp;#x22;/uploads/an-image.png&amp;#x22; alt=&amp;#x22;An image&amp;#x22; /&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;By default, these images would display at their natural size, so we’re using some CSS to constrain them to 100% of their container.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;css&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;img&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;display&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;block&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;max-width&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;100&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;%&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;img {  display: block;  max-width: 100%;}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Inside essays, this means that smallish images display at their natural size and will not be stretched (we’re using &lt;code&gt;max-width&lt;/code&gt; not &lt;code&gt;width&lt;/code&gt;), but very large images will be scaled down to fit in the essay container.&lt;/p&gt;
&lt;p&gt;The problem with this is that I often include quite large high-res images and set them to full-bleed (more on that later). This is fine for large viewports, but smaller devices will be forced to download the massive high-res file.&lt;/p&gt;
&lt;p&gt;The obvious solution is to generate smaller versions of these high-res images and then use &lt;code&gt;srcset&lt;/code&gt; to let the browser decide which one to show. Except that &lt;strong&gt;this is a blog&lt;/strong&gt;. And if I have to create multiple versions and write a long chunk of HTML every time I want to include an image in my markdown I’ll just stop writing altogether. Clearly, we need a way to automate this.&lt;/p&gt;
&lt;p&gt;While we’re at it, there are a few other things we should consider. Firstly, it’s a good idea to explicitly declare the dimensions of an image in the HTML using the &lt;code&gt;height&lt;/code&gt; and &lt;code&gt;width&lt;/code&gt; attributes. Assuming we don’t override it with CSS, this prevents reflow by telling the browser how much room the image will take up so it can draw the right sized box &lt;em&gt;before&lt;/em&gt; the image has downloaded. So while we’re automating image things we should probably add hight and width to image elements.&lt;/p&gt;
&lt;p&gt;What’s more, modern browsers will soon be able to infer the aspect ratio of an image based on these attributes, and use that to draw a correctly-sized content box &lt;em&gt;even if we’ve changed the width with CSS&lt;/em&gt;. Cool.&lt;/p&gt;
&lt;p&gt;Secondly, HTML &lt;a href=&quot;https://caniuse.com/#feat=loading-lazy-attr&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;now supports&lt;/a&gt; native lazy loading via the &lt;code&gt;loading&lt;/code&gt; attribute. This is obviously good for performance and is as easy as adding &lt;code&gt;loading=&quot;lazy&quot;&lt;/code&gt; to our image tags. Addy Osmani has a &lt;a href=&quot;https://addyosmani.com/blog/lazy-loading/&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;much more detailed explanation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This ten-minute video from Jen Simmons foes a great job of explaining how all of this works.&lt;/p&gt;
&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/4-d_SoCHeWE&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen&gt;&lt;/iframe&gt;
&lt;h2 id=&quot;how-do-we-automate-this-stuff&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#how-do-we-automate-this-stuff&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;How do we automate this stuff?&lt;/h2&gt;
&lt;p&gt;Good question. Back when I started this redesign, I made the decision to keep the tech super simple. Here are the principles I defined:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;As few dependencies as possible (both build-time and run-time dependancies).&lt;/li&gt;
&lt;li&gt;Use defaults wherever possible.&lt;/li&gt;
&lt;li&gt;Write as little code as possible.&lt;/li&gt;
&lt;li&gt;Do not over-abstract. Avoid fallbacks, polyfills and hacks.&lt;/li&gt;
&lt;li&gt;Bake accessibility in.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I &lt;em&gt;really&lt;/em&gt; don’t want to add unnecessary complexity to this site. But it feels like this is important enough to add a just little more complexity. If there’s a jekyll plugin that can read my markdown image tags, generate smaller versions of my images and insert appropriate &lt;code&gt;srcset&lt;/code&gt; attributes, I’ll take it. Bonus points if it can add &lt;code&gt;width&lt;/code&gt;, &lt;code&gt;height&lt;/code&gt; and &lt;code&gt;loading&lt;/code&gt; attributes too.&lt;/p&gt;
&lt;p&gt;My initial search actually led me to some awesome plugins for &lt;a href=&quot;https://www.11ty.dev/&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Eleventy&lt;/a&gt;. &lt;a href=&quot;https://github.com/liamfiddler/eleventy-plugin-lazyimages#readme&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;This one&lt;/a&gt; does some cool lazy-loading with javascript and data URLs, &lt;a href=&quot;https://github.com/nhoizey/eleventy-plugin-images-responsiver&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;this one&lt;/a&gt; creates picture elements, &lt;a href=&quot;https://github.com/eeeps/eleventy-respimg#readme&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;this one&lt;/a&gt; does just what I want for cloud-hosted images and &lt;a href=&quot;https://github.com/chromeos/static-site-scaffold-modules/tree/master/modules/eleventy-plugin-local-respimg&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;this one&lt;/a&gt; basically does what I want but without the bonus points.&lt;/p&gt;
&lt;p&gt;Reading though the source code of these was super interesting, and had nudged me to look further at Eleventy (there are some strong arguments for moving this site to it). But since we’re on Jekyll here, none of these are much use. What we need is the &lt;a href=&quot;https://github.com/wildlyinaccurate/jekyll-responsive-image&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Jekyll Responsive Image&lt;/a&gt; plugin.&lt;/p&gt;
&lt;p&gt;This looks like it solves half the problem. It lets us specify &lt;a href=&quot;https://github.com/wildlyinaccurate/jekyll-responsive-image/tree/master/sample-templates&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;our own template&lt;/a&gt; for the generated image HTML which means we can add width, height and lazy loading ourselves. The only downside is that we have to use a liquid tag rather than standard markdown to insert images. No thanks.&lt;/p&gt;
&lt;p&gt;And then jekyll hooks came to the rescue with &lt;a href=&quot;https://medium.com/@ivo.v.valchev/jekyll-responsive-images-with-srcset-5da131415d0f&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;this tutorial from Ivo Valchev&lt;/a&gt;. Let’s walk through the process…&lt;/p&gt;
&lt;h3 id=&quot;install-the-stuff&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#install-the-stuff&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Install the stuff&lt;/h3&gt;
&lt;p&gt;The plugin uses Rmagick which is a wrapper around imagemagick which is – and has always been – a nightmare. So first step is to update or install it and then try installing the gem manually.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;shell&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2&quot;&gt;brew&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;install&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;imagemagick&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2&quot;&gt;gem&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;install&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;jekyll-responsive-image&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;brew install imagemagickgem install jekyll-responsive-image&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Now we can add it to our Gemfile and Jekyll config as per the README. There are a lot of config options available but I started with these: a path to the template, the sizes to generate and an instruction to only save the generated files in the build folder.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;yaml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;responsive_image&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;template&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;_includes/responsive-image.html&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;sizes&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;width&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;480&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;width&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;800&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;width&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;1400&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;save_to_source&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;false&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;responsive_image:  template: _includes/responsive-image.html  sizes:    - width: 480    - width: 800    - width: 1400  save_to_source: false&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;How we need to create our template. I stole most of this straignt from the docs, but I’ve added lazy loading and width/height attributes.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;html&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;{% raw %} {% capture srcset %} {% for i in resized %} /{{ i.path }} {{ i.width }}w, {% endfor %} {%&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;endcapture %}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;img&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;src&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;/{{ path }}&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;alt&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;{{ alt }}&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;loading&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;lazy&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;srcset&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;{{ srcset | strip_newlines }}&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;width&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;{{ original.width }}&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;height&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;{{ original.height }}&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;/&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;{% endraw %}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;{% raw %} {% capture srcset %} {% for i in resized %} /{{ i.path }} {{ i.width }}w, {% endfor %} {%endcapture %}&lt;img  src=&amp;#x22;/{{ path }}&amp;#x22;  alt=&amp;#x22;{{ alt }}&amp;#x22;  loading=&amp;#x22;lazy&amp;#x22;  srcset=&amp;#x22;{{ srcset | strip_newlines }}&amp;#x22;  width=&amp;#x22;{{ original.width }}&amp;#x22;  height=&amp;#x22;{{ original.height }}&amp;#x22;/&gt;{% endraw %}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;So far so good. We can now insert responsive images with&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;html&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;{% raw %} {% responsive_image path: image.jpg alt: &quot;My Image&quot; %} {% endraw %}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;{% raw %} {% responsive_image path: image.jpg alt: &amp;#x22;My Image&amp;#x22; %} {% endraw %}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;To get this working with standard markdown, we need to register a hook that replaces markdown image syntax with this new tag at build-time. We can create &lt;code&gt;_plugins/img_tag_transform.rb&lt;/code&gt; and add the following.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;ruby&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6AAAD1;--0fs:italic&quot;&gt;Jekyll&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1;--0fs:italic&quot;&gt;Hooks&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2&quot;&gt;register&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;:posts&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;:pre_render&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;do&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; |post, _payload|&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;docExt &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; post.&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2&quot;&gt;extname&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2&quot;&gt;tr&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;post.&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2&quot;&gt;content&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; post.&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2&quot;&gt;content&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;gsub&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;/!&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;\[&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;(.*)&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;\]\(&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;([^&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;\)&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;]+)&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;\)&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;(?:{:([^}]+)})*/&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;{% raw %}{% responsive_image path: \2 \3 %}{% endraw %}&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;post.&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2&quot;&gt;content&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; post.&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2&quot;&gt;content&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;gsub&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;path: /&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;path: &lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;end&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;Jekyll::Hooks.register :posts, :pre_render do |post, _payload|  docExt = post.extname.tr(&amp;#x27;.&amp;#x27;, &amp;#x27;&amp;#x27;)  post.content = post.content.gsub(/!\[(.*)\]\(([^\)]+)\)(?:{:([^}]+)})*/, &amp;#x27;{% raw %}{% responsive_image path: \2 \3 %}{% endraw %}&amp;#x27;)  post.content = post.content.gsub &amp;#x27;path: /&amp;#x27;, &amp;#x27;path: &amp;#x27;end&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;It’s a bit hacky, but it works.&lt;/p&gt;
&lt;h2 id=&quot;is-it-worth-it&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#is-it-worth-it&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Is it worth it?&lt;/h2&gt;
&lt;p&gt;My biggest concern with this approach is the added complexity. Not only have I added Imagemagick as a dependancy, I’ve also added a new jekyll plugin and a slightly hacky custom plugin.&lt;/p&gt;
&lt;p&gt;For now, this feels like an acceptable trade-off, but if I find myself adding more similar stuff in the future I’ll have to revisit this and reconsider the value/complexity ratio.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;full-bleed-images&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#full-bleed-images&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Full-bleed Images&lt;/h2&gt;
&lt;p&gt;While we’re on the subject of images, I’ve also added a few utility classes to make my images a little more interesting. Normal images are constrained to the width of the element they appear in, but sometimes I want full-bleed images that extend out to the edges of the viewport, like this:&lt;/p&gt;
&lt;p&gt;We can do this with a utility class and some &lt;code&gt;calc()&lt;/code&gt; magic.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;css&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;.essay&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;.full-bleed {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;width&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;100&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;vw&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;margin-left&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;calc&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;50&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;%&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;50&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;vw&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;// For images that are not wide enough to &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;fill&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; the &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;gap&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;display&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;flex&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;justify-content&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;center&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;align-items&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;flex-start&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;.essay {  .full-bleed {    width: 100vw;    margin-left: calc(50% - 50vw);    // For images that are not wide enough to fill the gap    display: flex;    justify-content: center;    align-items: flex-start;  }}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;These styles are applied to the &lt;em&gt;container&lt;/em&gt; rather than the image itself so that images smaller than the container are never scaled up. We can apply this style in markdown like this&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;markdown&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;{% raw %}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;{:.full-bleed}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;![&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;Image&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;](&lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1;--0td:underline&quot;&gt;/uploads/2020-07-02-hot-air-baloon.jpg&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;{% endraw %}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;{% raw %}{:.full-bleed}![Image](/uploads/2020-07-02-hot-air-baloon.jpg){% endraw %}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Which will produce the following HTML&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;html&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;p&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;full-bleed&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;img&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;src&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;/uploads/images.jpg&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;alt&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;Image&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;...&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;#x3C;/&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;p&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;&lt;p class=&amp;#x22;full-bleed&amp;#x22;&gt;  &lt;img src=&amp;#x22;/uploads/images.jpg&amp;#x22; alt=&amp;#x22;Image&amp;#x22; ... /&gt;&lt;/p&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;As well as full bleed, I’ve also added classes for left and right bleed&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;scss&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;.essay&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;.left-bleed&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;margin-left&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;calc&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;50&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;%&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;50&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;vw&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;display&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;flex&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;justify-content&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;flex-end&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;align-items&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;flex-start&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;.right-bleed&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;margin-right&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;calc&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;50&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;%&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;50&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;vw&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;display&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;flex&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;justify-content&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;flex-start&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;align-items&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;flex-start&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;.essay {  .left-bleed {    margin-left: calc(50% - 50vw);    display: flex;    justify-content: flex-end;    align-items: flex-start;  }  .right-bleed {    margin-right: calc(50% - 50vw);    display: flex;    justify-content: flex-start;    align-items: flex-start;  }}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h2 id=&quot;summing-up&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#summing-up&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Summing up&lt;/h2&gt;
&lt;p&gt;Although it’s ben years since I’ve built a proper website like this, I’ve kept myself fairly up-to-speed with developments in CSS. Digging into responsive images has been a nice reminder that there is a whole raft of standards that I’ve ignored and know very little about. I’m now itching to explore some of the other stuff that I remember being discussed and has since matured. I expect I’ll have a play with with SVG (a lot has changed), web components and browser APIs for audio, motion and the like sometime.&lt;/p&gt;
&lt;p&gt;That said, it wasn’t really my intention to go this deep into any performance-related stuff at this stage of the redesign, so while I’m tempted to follow up on this with a load more optimisation I’m gong to force myself back into design mode for a little while and focus on getting the non-blog bits of the site looking nice. Until next time.&lt;/p&gt;
&lt;section data-footnotes=&quot;&quot; class=&quot;footnotes&quot;&gt;&lt;h2 class=&quot;sr-only&quot; id=&quot;footnote-label&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#footnote-label&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Footnotes&lt;/h2&gt;
&lt;ol&gt;
&lt;li id=&quot;user-content-fn-1&quot;&gt;
&lt;p&gt;There was an excellent article on this at the time, but I can’t seem to find it. &lt;a href=&quot;#user-content-fnref-1&quot; data-footnote-backref=&quot;&quot; aria-label=&quot;Back to reference 1&quot; class=&quot;data-footnote-backref&quot;&gt;↩&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;</content:encoded></item><item><title>Website Redesign Part XI - Code Blocks and Section Rules</title><link>https://danny.is/writing/website-redesign-xi/</link><guid isPermaLink="true">https://danny.is/writing/website-redesign-xi/</guid><pubDate>Sun, 28 Jun 2020 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;I spent a long time [deciding on a typeface]({% post_url 2020-06-20-website-redesign-v %}) for these essays and I don’t want to spend nearly as long on code snippets. Although this series involves a lot of code snippets, I generally write about code a lot less than I used to, so it doesn’t make sense to spend ages on this. I use the wonderful &lt;a href=&quot;https://www.typography.com/blog/introducing-operator&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Operator Mono&lt;/a&gt; in my text editor and I briefly considered paying for a web license so I could use it here too. But while &lt;em&gt;I&lt;/em&gt; love it, it’s quite unusual and is definitely not suited to everyone’s taste. Both the typeface itself and the act of buying a web license are the opposite of simple, one of my stated values for this site. So instead, I’ll stick with the same requirements I used before: open source, ideally with variable and static versions, with nice ligatures and a range of weights.&lt;/p&gt;
&lt;p&gt;The first thing that came to mind was Fira Code, an extension of Mozilla’s Fira Mono which was designed specifically for legibility. Fira Code adds a bunch of ligatures for character combinations commonly used in programming, as well as making a few adjustments to make code more readable.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-06-28-ligatures.png&quot; alt=&quot;Fira Code Ligature Sample&quot;&gt;
&lt;img src=&quot;/uploads/2020-06-28-typographics.png&quot; alt=&quot;Fira Code Typography Sample&quot;&gt;&lt;/p&gt;
&lt;h2 id=&quot;the-css&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#the-css&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;The CSS&lt;/h2&gt;
&lt;p&gt;Although Fira Code is available via google Fonts it doesn’t support all the opentype features I want, so I ended up cloning the repo and moving TFF, WOFF and WOFF2 versions into the the assets folder like I did for Literata. They’re included in &lt;code&gt;webfonts.scss&lt;/code&gt; and have a custom property set just like the other fonts too.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;/_astro/ec.7syh9.css&quot;&gt;&lt;script type=&quot;module&quot; src=&quot;/_astro/ec.0vx5m.js&quot;&gt;&lt;/script&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;css&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9;--0fs:italic&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;root&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;--font-code&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;Fira Code&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;Inconsolata&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;monospace&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;@supports (&lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-variation-settings&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;normal&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;) {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;--font-code&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;Fira Code Variable&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;Inconsolata&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;monospace&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;:root {  --font-code: &amp;#x27;Fira Code&amp;#x27;, &amp;#x27;Inconsolata&amp;#x27;, monospace;  @supports (font-variation-settings: normal) {    --font-code: &amp;#x27;Fira Code Variable&amp;#x27;, &amp;#x27;Inconsolata&amp;#x27;, monospace;  }}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Since we want to use Fira code &lt;em&gt;everywhere&lt;/em&gt; there’s code, we can set this as the default font for all &lt;code&gt;code&lt;/code&gt; elements, whether inside essays or not. We can also use some of the advanced stylistic settings to turn on a sans-serif lowercase ‘r’ and put gaps in double equals signs. I think this makes code a little more readable.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;scss&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;code&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-family&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(--font-code);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-feature-settings&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;ss01&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;ss08&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#9FA4A7&quot;&gt;// sso1 = sans-serif lowercase &quot;r&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#9FA4A7&quot;&gt;// ss08 = Gaps in double/tripple equals&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#9FA4A7&quot;&gt;// See https://github.com/tonsky/FiraCode/wiki/How-to-enable-stylistic-sets&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;code {  font-family: var(--font-code);  font-feature-settings: &amp;#x27;ss01&amp;#x27;, &amp;#x27;ss08&amp;#x27;;  // sso1 = sans-serif lowercase &amp;#x22;r&amp;#x22;  // ss08 = Gaps in double/tripple equals  // See https://github.com/tonsky/FiraCode/wiki/How-to-enable-stylistic-sets}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Fira code has a bunch of other features like this&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-06-28-stylistic-sets.png&quot; alt=&quot;Fira Code Stylistic Settings&quot;&gt;&lt;/p&gt;
&lt;h3 id=&quot;styling-inline-code&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#styling-inline-code&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Styling inline code&lt;/h3&gt;
&lt;p&gt;We’ll set the font size to the same as the samm-caps we’re using for abbreviations, which is about equal to the x-height of the body copy. Adding a border, background and a little padding to the left and right is the simplest thing I can think of to differentiate inline code snippets. We’ve also prevented breaking spaces with &lt;code&gt;white-space: pre&lt;/code&gt;, though I might need to revisit this if I end up writing some very long inline code snippets.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;css&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;.essay&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt; code&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-size&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0.85&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;em&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;padding&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0.5&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;ch&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;background-color&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;rgba&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0.05&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;border&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;px&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;solid&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;rgba&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0.1&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;border-radius&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;px&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;white-space&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;pre&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;.essay code {  font-size: 0.85em;  padding: 0 0.5ch;  background-color: rgba(0, 0, 0, 0.05);  border: 1px solid rgba(0, 0, 0, 0.1);  border-radius: 1px;  white-space: pre;}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h3 id=&quot;styling-code-blocks&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#styling-code-blocks&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Styling code blocks&lt;/h3&gt;
&lt;p&gt;We already set up some basic styles for &lt;code&gt;&amp;#x3C;pre&gt;&lt;/code&gt; elements, so all we need to do is remove the styles we just set for any &lt;code&gt;&amp;#x3C;code&gt;&lt;/code&gt; elements that appear within them.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;scss&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;pre&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;border&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;px&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;solid&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;rgba&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0.2&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;padding&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;calc&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;((&lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;em&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(--base-lh)) &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;px&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;background&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;rgba&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0.05&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;overflow-x&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;scroll&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;code&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;padding&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;background-color&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;transparent&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;border&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;none&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;pre {  border: 1px solid rgba(0, 0, 0, 0.2);  padding: calc((1em * var(--base-lh)) - 2px);  background: rgba(0, 0, 0, 0.05);  overflow-x: scroll;  code {    padding: 0;    background-color: transparent;    border: none;  }}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-06-28-codeblocks-screenshot.png&quot; alt=&quot;Screenshot of code block&quot;&gt;&lt;/p&gt;
&lt;p&gt;The final thing to do is add syntax highlighting. Since we’re using Jekyll, any fenced code blocks that have a language defined on them will use &lt;a href=&quot;http://rouge.jneen.net/&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Rouge&lt;/a&gt; to apply syntax-highlighing classes in the same way &lt;a href=&quot;https://pygments.org/&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Pygments&lt;/a&gt; does. This means we can take an existing theme stylesheet and include it in our bundle. I used &lt;a href=&quot;https://github.com/jwarby/jekyll-pygments-themes/blob/master/colorful.css&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;this one&lt;/a&gt; and tweaked a few of the colours slightly. I’ll come back to this once I have a colour palette for the site.&lt;/p&gt;
&lt;script src=&quot;https://gist.github.com/dannysmith/72a142f2d84f8c6768c6dff33277b5db.js&quot;&gt;&lt;/script&gt;
&lt;h2 id=&quot;horizontal-rules&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#horizontal-rules&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Horizontal Rules&lt;/h2&gt;
&lt;p&gt;I’ve always liked the section mark (§) and thought it might be nice to superimpose this on horizontal rules. The code for this is pretty simple – we’ll add a psuedo-element containing the mark and use flexbox to position the hr and psuedo element on top of each other. A bit of padding and a background on the psuedo element creates a gap in the line, and a little nudging with &lt;code&gt;translateY&lt;/code&gt; vertically centres the mark.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-06-28-hr.png&quot; alt=&quot;Horizontal Rule&quot;&gt;&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;scss&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;.essay&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;hr&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;display&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;flex&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;align-items&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;center&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;justify-content&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;center&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;border&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;border-bottom&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;px&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;solid&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;rgba&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0.2&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;&amp;#x26;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9;--0fs:italic&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;before&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;content:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;§&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;transform&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;translateY&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;-0.15&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;em&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;background&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(--color-white);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;padding&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0.5&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;em&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;.essay hr {  display: flex;  align-items: center;  justify-content: center;  border: 0;  border-bottom: 1px solid rgba(0, 0, 0, 0.2);  &amp;#x26;:before {    content: &amp;#x27;§&amp;#x27;;    transform: translateY(-0.15em);    background: var(--color-white);    padding: 0 0.5em;  }}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;It would also be nice to add a little more margin than usual either side of the rule. Since we’re using &lt;strong&gt;only&lt;/strong&gt; top-margin to maintain vertical rhythm, we need to use the sibling selector to add margin to the element immediatly following the &lt;code&gt;&amp;#x3C;hr&gt;&lt;/code&gt; as well as the rule itself.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;css&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;.essay&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt; hr&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;.essay&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt; hr + *&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;margin-top&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;calc&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;em&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(--base-lh));&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;.essay hr,.essay hr + * {  margin-top: calc(2em * var(--base-lh));}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;</content:encoded></item><item><title>Website Redesign Part IX - Lists</title><link>https://danny.is/writing/website-redesign-ix/</link><guid isPermaLink="true">https://danny.is/writing/website-redesign-ix/</guid><pubDate>Thu, 25 Jun 2020 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Lists are incredibly useful for certain sorts of article. I tend to make quite heavy use of lists in some of my articles, so it’s important that I give some thought to how they’re styled. Since I’m going for a “bookish” vibe, I’d rather keep the vertical rhythm the same as for all the other text on the page, so I’ll be sticking with the standard top-margin of 1 × &lt;em&gt;line height&lt;/em&gt; and leaving the margin and line height of the list items as they are. With that decision made, we only need to worry about styling the list markers: bullets, numbers and checkboxes.&lt;/p&gt;
&lt;p&gt;After a bit of playing around, I think it’s a bit too jarring to hand the markers in the margin and flush-align the text. If this was for print it might look less wierd, but we’re so used to seing indented lists on the web that it just feels wrong for this medium. So we’ll aim to flish-align the markers and set 1em of left-padding on all list items. As long as we keep the markers set to &lt;code&gt;outside&lt;/code&gt; we’ll end up with the start of out text neatly aligned at 1em from the left margin.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;/_astro/ec.7syh9.css&quot;&gt;&lt;script type=&quot;module&quot; src=&quot;/_astro/ec.0vx5m.js&quot;&gt;&lt;/script&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;css&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;.essay&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt; li&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;.essay&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt; li&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;padding-left&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;em&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;.essay li,.essay li {  padding-left: 1em;}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h2 id=&quot;bulleted-lists&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#bulleted-lists&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Bulleted Lists&lt;/h2&gt;
&lt;p&gt;After a bit of playing around, I’ve decided to keep the bullets super sumple. We’ll just use a mid-sized bullet and ad a little left padding to pull them inline with the margin.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;css&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;.essay&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt; ul&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;padding-left&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0.4&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;em&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;list-style-type&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;•&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;.essay ul {  padding-left: 0.4em;  list-style-type: &amp;#x27;•&amp;#x27;;}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Annoyingly, iOS Safari and Chrome don’t yet support string values for &lt;code&gt;list-style-type&lt;/code&gt;, but since they both support &lt;code&gt;@supports&lt;/code&gt;, we can add a fallback.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;scss&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;@supports&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;not&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;list-style-type&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;•&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;)) {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;&amp;#x26;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9;--0fs:italic&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;not&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;.task-list&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;) {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#9FA4A7&quot;&gt;// Begin fix for browsers that don&apos;t support list-style-type: &amp;#x3C;string&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;list-style-type&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;none&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;padding-left&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0.9&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;em&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;li&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;padding-left&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0.5&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;em&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;position&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;relative&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;&amp;#x26;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9;--0fs:italic&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;before&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;content:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;•&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;position&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;absolute&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;left&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;-1&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;em&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#9FA4A7&quot;&gt;// End fix&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;@supports (not (list-style-type: &amp;#x27;•&amp;#x27;)) {  &amp;#x26;:not(.task-list) {    // Begin fix for browsers that don&amp;#x27;t support list-style-type: &lt;string&gt;    list-style-type: none;    padding-left: 0.9em;    li {      padding-left: 0.5em;      position: relative;      &amp;#x26;:before {        content: &amp;#x27;•&amp;#x27;;        position: absolute;        left: -1em;      }    }    // End fix  }}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h2 id=&quot;numbered-lists&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#numbered-lists&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Numbered Lists&lt;/h2&gt;
&lt;p&gt;We’re decreasing both the size and optical size for numbers to the same as we did for for &lt;code&gt;abbr&lt;/code&gt; elements, and falling back to the &lt;em&gt;Literata Caption&lt;/em&gt; if variable fonts aren’t supported. We’re also making them slightly bolder than abbreviation since, as markers, it’s important they stand out a little more. We’re then adding some left padding to bring the first character inline with the left margin: single digit numbers will be flush with the margin while extra digits will extend outwards to the left.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Lorem ipsum dolor sit amet, consectetuer adipiscing elit.&lt;/li&gt;
&lt;li&gt;Aliquam tincidunt mauris eu risus.&lt;/li&gt;
&lt;li&gt;Vestibulum auctor dapibus neque.&lt;/li&gt;
&lt;li&gt;Nunc dignissim risus id metus.&lt;/li&gt;
&lt;li&gt;Cras ornare tristique elit.&lt;/li&gt;
&lt;li&gt;Vivamus vestibulum ntulla nec ante.&lt;/li&gt;
&lt;li&gt;Praesent placerat risus quis eros.&lt;/li&gt;
&lt;li&gt;Fusce pellentesque suscipit nibh.&lt;/li&gt;
&lt;li&gt;Integer vitae libero ac risus egestas placerat.&lt;/li&gt;
&lt;li&gt;Vestibulum commodo felis quis tortor.&lt;/li&gt;
&lt;li&gt;Ut aliquam sollicitudin leo.&lt;/li&gt;
&lt;li&gt;Cras iaculis ultricies nulla.&lt;/li&gt;
&lt;li&gt;Donec quis dui at dolor tempor interdum.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;scss&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;.essay&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;ol&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;padding-left&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0.8&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;em&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#E981B9;--0fs:italic&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;marker&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-size&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0.85&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;em&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-family&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;Literata Caption&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;Georgia&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;Times New Roman&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;serif&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-weight&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;600&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;@supports&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-variation-settings&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;normal&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;) {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-family&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;Literata Variable&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;Georgia&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;Times New Roman&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;serif&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-variation-settings&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;opsz&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-weight&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;610&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;.essay ol {  padding-left: 0.8em;  ::marker {    font-size: 0.85em;    font-family: &amp;#x27;Literata Caption&amp;#x27;, Georgia, &amp;#x27;Times New Roman&amp;#x27;, serif;    font-weight: 600;    @supports (font-variation-settings: normal) {      font-family: &amp;#x27;Literata Variable&amp;#x27;, Georgia, &amp;#x27;Times New Roman&amp;#x27;, serif;      font-variation-settings: &amp;#x27;opsz&amp;#x27; 10;      font-weight: 610;    }  }}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h2 id=&quot;checklists&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#checklists&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Checklists&lt;/h2&gt;
&lt;p&gt;Jekyll allows us to use &lt;a href=&quot;https://github.github.com/gfm/#task-list-items-extension-&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Github Flavoured Markdown task lists&lt;/a&gt;, and I occasionally make use of this in my articles. They work like this&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;markdown&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;- [ ] Item 1&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;- [&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;x&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;] Item 2&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;- [ ] Item 3&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;- [ ] Item 1- [x] Item 2- [ ] Item 3&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;This will produce the following output and HTML&lt;/p&gt;
&lt;ul class=&quot;contains-task-list&quot;&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Item 1&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; checked disabled&gt; Item 2&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Item 3&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;html&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;ul&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;task-list&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;li&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;task-list-item&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;checkbox&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;task-list-item-checkbox&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;disabled&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;disabled&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; /&gt;Item 1&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;#x3C;/&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;li&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;li&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;task-list-item&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;input&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;checkbox&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;task-list-item-checkbox&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;disabled&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;disabled&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;checked&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;checked&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;/&gt;Callout inline styles&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;#x3C;/&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;li&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;li&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;task-list-item&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;checkbox&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;task-list-item-checkbox&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;disabled&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;disabled&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; /&gt;Item 2&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;#x3C;/&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;li&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;li&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;task-list-item&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;checkbox&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;task-list-item-checkbox&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;disabled&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;disabled&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; /&gt;Item 3&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;#x3C;/&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;li&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&amp;#x3C;/&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;ul&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;&lt;ul class=&amp;#x22;task-list&amp;#x22;&gt;  &lt;li class=&amp;#x22;task-list-item&amp;#x22;&gt;    &lt;input type=&amp;#x22;checkbox&amp;#x22; class=&amp;#x22;task-list-item-checkbox&amp;#x22; disabled=&amp;#x22;disabled&amp;#x22; /&gt;Item 1  &lt;/li&gt;  &lt;li class=&amp;#x22;task-list-item&amp;#x22;&gt;    &lt;input      type=&amp;#x22;checkbox&amp;#x22;      class=&amp;#x22;task-list-item-checkbox&amp;#x22;      disabled=&amp;#x22;disabled&amp;#x22;      checked=&amp;#x22;checked&amp;#x22;    /&gt;Callout inline styles  &lt;/li&gt;  &lt;li class=&amp;#x22;task-list-item&amp;#x22;&gt;    &lt;input type=&amp;#x22;checkbox&amp;#x22; class=&amp;#x22;task-list-item-checkbox&amp;#x22; disabled=&amp;#x22;disabled&amp;#x22; /&gt;Item 2  &lt;/li&gt;  &lt;li class=&amp;#x22;task-list-item&amp;#x22;&gt;    &lt;input type=&amp;#x22;checkbox&amp;#x22; class=&amp;#x22;task-list-item-checkbox&amp;#x22; disabled=&amp;#x22;disabled&amp;#x22; /&gt;Item 3  &lt;/li&gt;&lt;/ul&gt;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;We can use these generated classes to style the checkboxes. We’ll remove the default list styles and padding and set up each &lt;code&gt;li&lt;/code&gt; as a flex container. Each have two flex items – the checkbox and the text. This ensures that the text doesn’t wrap dowin under the checkbox for multi-line items.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;css&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;.task-list&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;list-style-type&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;none&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;padding-left&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;.task-list-item&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;position&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;relative&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;display&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;flex&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;align-content&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;center&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;padding-left&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;.task-list {  list-style-type: none;  padding-left: 0;}.task-list-item {  position: relative;  display: flex;  align-content: center;  padding-left: 0;}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Next, we’ll remove the default appearance, set a hight and width and nudge the box with some margin so it’s about the same height as lowercase characters and is aligned a tiny bit above the baseline. We’ll also add a border of our own.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;css&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;.task-list-item-checkbox&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;margin&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0.5&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;em&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;em&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;height&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0.7&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;em&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;width&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0.7&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;em&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;min-width&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0.7&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;em&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;--0:#9FA4A7&quot;&gt;/* Prevent flex-shrinking */&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1;--0fs:italic&quot;&gt;-webkit-appearance&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;none&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1;--0fs:italic&quot;&gt;-moz-appearance&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;none&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1;--0fs:italic&quot;&gt;-o-appearance&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;none&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;appearance&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;none&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;outline&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;none&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;border&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;px&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;solid&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;rgba&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0.3&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;.task-list-item-checkbox {  margin: 0.5em 1em 0 0;  height: 0.7em;  width: 0.7em;  min-width: 0.7em; /* Prevent flex-shrinking */  -webkit-appearance: none;  -moz-appearance: none;  -o-appearance: none;  appearance: none;  outline: none;  border: 1px solid rgba(0, 0, 0, 0.3);}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Finally, we’ll add a tick (✓) to any that are checked, style it and position it properly within the box.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;css&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;.task-list-item-checkbox&lt;/span&gt;&lt;span style=&quot;--0:#E981B9;--0fs:italic&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;checked&lt;/span&gt;&lt;span style=&quot;--0:#E981B9;--0fs:italic&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;before&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;content&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;\2713&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;position&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;absolute&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;top&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0.645&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;em&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-size&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0.6&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;em&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-weight&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;600&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;.task-list-item-checkbox:checked:before {  content: &amp;#x27;\2713&amp;#x27;;  position: absolute;  top: 0.645em;  font-size: 0.6em;  font-weight: 600;}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;To make this work properly on iOS, we also need to explicitly set the background and border-radius, and bump the opacity of disabled checkboxes up to 1.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;scss&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;.task-list-item-checkbox&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#9FA4A7&quot;&gt;// ...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;border-radius&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;px&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;background&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;transparent&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#9FA4A7&quot;&gt;//...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;.task-list-item-checkbox&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;disabled&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;] {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;opacity&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;.task-list-item-checkbox {  // ...  border-radius: 0px;  background: transparent;  //...}.task-list-item-checkbox[disabled] {  opacity: 1;}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;And that just about wraps up styling for lists. I’m sure I’ll revisit some of this when I start to add colour to the site, but for now this is a definite improvement over the defaults.&lt;/p&gt;</content:encoded></item><item><title>Website Redesign Part X - Links</title><link>https://danny.is/writing/website-redesign-x/</link><guid isPermaLink="true">https://danny.is/writing/website-redesign-x/</guid><pubDate>Thu, 25 Jun 2020 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Hyperlinks are what makes the web special. They allow us move seamlessley from idea to idea at our own pace. While we tend to read books sequentially, websites are more like choose your own adventure books – hyperlinks let us choose how we experience them. And it’s that way by &lt;strong&gt;by default&lt;/strong&gt;. So links should be pretty prominent on this site. But at the same time, an article peppered with bright blue links is not easy on the eye. Where links are incidental to the text (as many are), they interrupt the flow of reading. I’ve spent a fair bit of time thinking about how I want links to work and I basically have two requirements.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;They must get out of the way when reading and not be a distraction.&lt;/li&gt;
&lt;li&gt;They should obviously be links for users who are looking for them. This includes differentiating between unvisited and visited links.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Let’s start off by removing styles from hyperlinks that have a class. This gives us a good starting point for styling UI links and also deals niceley with the footnote links that jekyll creates.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;/_astro/ec.7syh9.css&quot;&gt;&lt;script type=&quot;module&quot; src=&quot;/_astro/ec.0vx5m.js&quot;&gt;&lt;/script&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;css&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;] {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;text-decoration&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;inherit&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;color&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;inherit&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;a[class] {  text-decoration: inherit;  color: inherit;}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;The default clours in most browsers are blue for unvisited links and purple for visited links, so I like the idea of sticking with that since it’s alrreasy well-understood by most users. Rather than colouring the whole word, we might be able to get away with colouring just the underline. This makes the links far less intrusive. we can also pick much less saturated colours than the default.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-06-25-links-desktop.png&quot; alt=&quot;Links with coloured underlines&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-06-25-link-visited-desktop.png&quot; alt=&quot;Visited link with coloured underline&quot;&gt;&lt;/p&gt;
&lt;p&gt;The hover styles can afford to be a lot bolder and brighter. Something like…&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-06-25-link-activehover.png&quot; alt=&quot;Active and Hover style for links&quot;&gt;&lt;/p&gt;
&lt;p&gt;We can achieve this by setting links to inherit their text colour from their parent and styling the underline with &lt;code&gt;text-decoration-color&lt;/code&gt;. We’ll also add a subtle transition on hover and force the underline width to 1px on browser that support it.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;scss&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;--color-link-underline: rgba(111, 131, 222, 0&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;.5&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;--color-visited-link-underline: rgba(188, 127, 219, 0&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;.5&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;--color-active-link-underline: rgb(255, 30, 28);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;--0:#E981B9;--0fs:italic&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;not&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;([&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;]) {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;color&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;inherit&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;text-decoration-color&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(--color-link-underline);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;text-decoration-thickness&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;px&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;transition&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;all&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0.25&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;s&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;&amp;#x26;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9;--0fs:italic&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;visited&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;text-decoration-color&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(--color-visited-link-underline);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;&amp;#x26;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9;--0fs:italic&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;hover&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;&amp;#x26;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9;--0fs:italic&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;active&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;text-decoration-color&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(--color-active-link-underline);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;color&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(--color-active-link-text);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;--color-link-underline: rgba(111, 131, 222, 0.5);--color-visited-link-underline: rgba(188, 127, 219, 0.5);--color-active-link-underline: rgb(255, 30, 28);a:not([class]) {  color: inherit;  text-decoration-color: var(--color-link-underline);  text-decoration-thickness: 1px;  transition: all 0.25s;  &amp;#x26;:visited {    text-decoration-color: var(--color-visited-link-underline);  }  &amp;#x26;:hover,  &amp;#x26;:active {    text-decoration-color: var(--color-active-link-underline);    color: var(--color-active-link-text);  }}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;This feels okay on devices with a pointer. Although the underlines are subtle, if the user isn’t sure it’s a link, they can mouse over and the transation will make it pretty clear. But on touch devices this is impossible, so it feels sensible to make the links a little more ovbious somehow. On mobile devces the text also has a much smaller measure and therefore more multi-line links, whihc looks kinda ugly.&lt;/p&gt;
&lt;p&gt;We can alter our code to cremove the underline on touch devices and instead change the text-colour. I’m using a similar blue and purple here, but it’s nececarrily much darker and without an alpha channel. I tried to use a colour that didn’t affect the typographic colour of the text. If you try squinting and looking at the mobile version the links shouldn’t feel lighter or heavier than the rest of the text.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-06-25-links-mobile.png&quot; alt=&quot;2020-06-25-links-mobile&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-06-25-squint.png&quot; alt=&quot;Squint Test&quot;&gt;&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;scss&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;--0:#E981B9;--0fs:italic&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;not&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;([&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;]) {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#9FA4A7&quot;&gt;//...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;@media&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; (pointer&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; coarse) {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;text-decoration&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;none&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;color&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(--color-link-text);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;&amp;#x26;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9;--0fs:italic&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;visited&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;text-decoration-color&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(--color-visited-link-underline);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;@media&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; (pointer&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; coarse) {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;color&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(--color-visited-link-text);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#9FA4A7&quot;&gt;//...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;a:not([class]) {  //...  @media (pointer: coarse) {    text-decoration: none;    color: var(--color-link-text);  }  &amp;#x26;:visited {    text-decoration-color: var(--color-visited-link-underline);    @media (pointer: coarse) {      color: var(--color-visited-link-text);    }  }  //...}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Finally, I want to do something about the outline browsers apply when a link is focussed by keyboard. I don’t want to do too much with this for accessibility reasosns, so we’ll just change it from blue to our brand red using the &lt;a href=&quot;https://css-tricks.com/keyboard-only-focus-styles/&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;focus visible psutedo-selector&lt;/a&gt;. I’ll revisit keyboard navigation once I have a color palette for the site.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/iso-link-focus.png&quot; alt=&quot;Outline Example&quot;&gt;&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;css&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;--0:#E981B9;--0fs:italic&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;focus-visible&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;outline&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;px&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;solid&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(--color-red-trans50);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;a:focus-visible {  outline: 3px solid var(--color-red-trans50);}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;</content:encoded></item><item><title>Website Redesign Part VII - Responsive Typography</title><link>https://danny.is/writing/website-redesign-vii/</link><guid isPermaLink="true">https://danny.is/writing/website-redesign-vii/</guid><pubDate>Mon, 22 Jun 2020 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Having settled on a typeface for my essays, it’s time to set up some basic typography. In the past, I’ve spent a lot of time building maths-based ype systems with myriad variables and functions and it’s so tempting to go down that route this time and try to create a system that caters to every eventuality. But that would be at odds with my &lt;strong&gt;simplicity&lt;/strong&gt; value, so for the time being I’ll stick to the basics. We’re going to set up a base font size and line height and scale that as the viewport grows. We’ll also add just enough whitespace to create a nice vertical rhythm and create some visual hierachy by styling the headings. Everything else can wait.&lt;/p&gt;
&lt;h2 id=&quot;base-font-size&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#base-font-size&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Base font-size&lt;/h2&gt;
&lt;p&gt;We’ll start off by setting the font-size of the HTML element to 100%. This makes sure that &lt;code&gt;1rem&lt;/code&gt; will always represent the default font-size of the device or browser - usually 16px. We’ll use rems and ems to define pretty much every other size in the site, so we’ll also set the body &lt;code&gt;font-size&lt;/code&gt; in rems so it’s inherited by other elements.&lt;/p&gt;
&lt;p&gt;We also want to reset the heading sizes to &lt;code&gt;1em&lt;/code&gt;. We’ll probably redefine some of these later but I always think it’s a good idea to start with one size for &lt;em&gt;all elements&lt;/em&gt;, since it often makes sense to differentiate headings with weight, style or color rather than size. We’re using &lt;code&gt;ems&lt;/code&gt; rather than &lt;code&gt;rems&lt;/code&gt; here because we want them to scale if we change the font-size on their container.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;/_astro/ec.7syh9.css&quot;&gt;&lt;script type=&quot;module&quot; src=&quot;/_astro/ec.0vx5m.js&quot;&gt;&lt;/script&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;css&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;html&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-size&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;100&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;%&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;body&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-size&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;rem&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;h1&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;h2&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;h3&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;h4&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;h5&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-size&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;em&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;html {  font-size: 100%;}body {  font-size: 1rem;}h1,h2,h3,h4,h5 {  font-size: 1em;}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h2 id=&quot;scaling-type-size&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#scaling-type-size&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Scaling Type Size&lt;/h2&gt;
&lt;p&gt;We can use the new CSS &lt;code&gt;clamp()&lt;/code&gt; function to enable responsive type without the need for a million media queries. This will scale the type from &lt;code&gt;1rem&lt;/code&gt; (16px) to &lt;code&gt;1.375rems&lt;/code&gt; (22px). The middle value is calculated using both viewport units and rems: the &lt;code&gt;vw&lt;/code&gt; causes the type to scale with the viewport width and the rems ensure that user-initiated text resizing still works. I arrived at &lt;code&gt;0.6rem&lt;/code&gt; after a bit of experimentation.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;css&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;.essay&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-size&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;clamp&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;rem&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;calc&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0.6&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;rem&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;vw&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;), &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;1.375&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;rem&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;transition&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; font-size &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0.1&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;s&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;.essay {  font-size: clamp(1rem, calc(0.6rem + 1vw), 1.375rem);  transition: font-size 0.1s;}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h2 id=&quot;hyphens&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#hyphens&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Hyphens&lt;/h2&gt;
&lt;p&gt;Enabling hyphenation can make a big difference to readability on small screens, where an uneven right rag can cause very short lines. We can set up a SCSS variable for breakpoints and then use a media query to turn hyphenation off for larger viewports.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;scss&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;$breakpoint-m&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;42&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;em&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;.essay&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &gt; &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;p&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1;--0fs:italic&quot;&gt;-webkit-hyphens&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;auto&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;hyphens&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;auto&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;@media&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;min-width&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; $breakpoint-m) {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1;--0fs:italic&quot;&gt;-webkit-hyphens&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;none&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;hyphens&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;none&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;$breakpoint-m: 42em;.essay &gt; p {  -webkit-hyphens: auto;  hyphens: auto;  @media (min-width: $breakpoint-m) {    -webkit-hyphens: none;    hyphens: none;  }}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h2 id=&quot;vertical-rhythm&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#vertical-rhythm&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Vertical rhythm&lt;/h2&gt;
&lt;p&gt;The main purpose of a baseline grid is, unsusprisingly, &lt;strong&gt;aligning the baselines of text&lt;/strong&gt;. This makes a huge difference when we have multiple columns of text with differing fonts, sizes and the like.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-06-21-baseline1.png&quot; alt=&quot;Example 1: aligning text to a baseline &quot;&gt;
&lt;img src=&quot;/uploads/2020-06-21-baseline2.png&quot; alt=&quot;Example 2: aligning text to a baseline &quot;&gt;&lt;/p&gt;
&lt;p&gt;While this makes a huge difference to the feel of a page, the fluid nature of web pages (and the way line-height works) makes this quite hard to do consistently. We can avoid this problem entirely by only having one column.&lt;/p&gt;
&lt;p&gt;But baseline grids can also provide a sense of vertical rhythm – something we can do on the web without too much effort. We just need to work out how high each of our lines is and use multiples of that measurement to space things out vertically. (It can also make a good measurement for horizontal spacing.)&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-06-21-baseline-margins.png&quot; alt=&quot;Example: spacing with a baseline grid&quot;&gt;&lt;/p&gt;
&lt;p&gt;For the time being, we’ll keep our vertical rhythm super simple. First, we’ll remove all top and bottom margins - I’ve chosen to do this in my base stylesheet rather than just for the essays. Then we’ll set up a custom property to hold our base line-height and use that to set the line-height for all the elements in the essay container.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;css&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;--0:#E981B9;--0fs:italic&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;before&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;--0:#E981B9;--0fs:italic&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;after&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;margin-top&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;margin-bottom&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9;--0fs:italic&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;root&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;--base-lh&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;1.5&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;.essay&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt; &gt; *&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;line-height&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(--base-lh);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;*,*::before,*::after {  margin-top: 0;  margin-bottom: 0;}:root {  --base-lh: 1.5;}.essay &gt; * {  line-height: var(--base-lh);}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;We can now use this base line-height to set margins on our headings, paragraphs and the like. We can use the &lt;a href=&quot;https://alistapart.com/article/axiomatic-css-and-lobotomized-owls/&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;lobotomized owl selector&lt;/a&gt; to target all elements that have something above them and add a margin equal to our line-height. For now, we’re using ems so the margins will scale with the font-size.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;css&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;* + *&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;margin-top&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;calc&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;em&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(--base-lh));&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;&gt; * + * {  margin-top: calc(1em * var(--base-lh));}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;We can add top-margin in the same way to other elements. By sticking with top-margin and never using &lt;code&gt;margin-bottom&lt;/code&gt;, we have a simpler mental model for how spaces between elements are calculated: we never have to worry about margin collapsing or make a decision on whether to use top or bottom margin.&lt;/p&gt;
&lt;p&gt;While we’re here, I also used this tto set some horizintal padding on blockquotes&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;css&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;blockquote&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;border-left&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;px&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;solid&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;rgba&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0.2&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;padding-left&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;calc&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;((&lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;em&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(--base-lh)) - &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;px&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-style&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;italic&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;margin-left&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;blockquote {  border-left: 2px solid rgba(0, 0, 0, 0.2);  padding-left: calc((1em * var(--base-lh)) - 2px);  font-style: italic;  margin-left: 0;}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h2 id=&quot;styling-headings&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#styling-headings&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Styling Headings&lt;/h2&gt;
&lt;p&gt;Looking through my articles I dont’t tend to use H1s very often at all, apart from as the article title. This makes sense from a semantic point of view so we can assume that all H1s inside &lt;code&gt;.essay&lt;/code&gt; are an article title. I tend to use H2 and H3 fairly often to break my articles into sections, and H4s often appear in logner articles. I rarely, if ever use H5-6.&lt;/p&gt;
&lt;p&gt;With this in mind, it makes sense to keep things super-simple. Here’s what I initially settled on…&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-06-22-heading-type.png&quot; alt=&quot;Screenshot of headings&quot;&gt;&lt;/p&gt;
&lt;p&gt;Aside from H1s, all are set at the same size as the body copy. Five and Six are styled identically in italic with the same weight and margins as paragraphs. Four is set in small-caps with a semibold weight, again with the same margin as paragraphs. Three and Two are both set in bold with a bigger top margin, two being differentiated by being uppercase.&lt;/p&gt;
&lt;p&gt;The article title is bigger, and increases is size on larger viewports.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;css&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;.essay&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt; &gt; h1&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-size&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;rem&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;@media (&lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;min-width&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; $breakpoint-m) {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-size&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;rem&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;font-weight: 500;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;font-variation-settings: &apos;opsz&apos; 50;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;line-height: 1.3;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;.essay&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt; &gt; h2&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-weight&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;bold&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;text-transform&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;uppercase&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;letter-spacing&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0.15&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;ch&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;margin-top&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;calc&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;em&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(--base-lh));&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;.essay&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt; &gt; h3&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-weight&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;bold&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;margin-top&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;calc&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;em&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(--base-lh));&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;.essay&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt; &gt; h4&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-weight&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;600&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;text-transform&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;lowercase&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-variant&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;small-caps&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;letter-spacing&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0.05&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;ch&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;.essay&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt; &gt; h5&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;.essay&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt; &gt; h6&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-weight&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;normal&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-style&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;italic&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;.essay &gt; h1 {  font-size: 2rem;  @media (min-width: $breakpoint-m) {    font-size: 3rem;  }  font-weight: 500;  font-variation-settings: &amp;#x27;opsz&amp;#x27; 50;  line-height: 1.3;}.essay &gt; h2 {  font-weight: bold;  text-transform: uppercase;  letter-spacing: 0.15ch;  margin-top: calc(2em * var(--base-lh));}.essay &gt; h3 {  font-weight: bold;  margin-top: calc(2em * var(--base-lh));}.essay &gt; h4 {  font-weight: 600;  text-transform: lowercase;  font-variant: small-caps;  letter-spacing: 0.05ch;}.essay &gt; h5,.essay &gt; h6 {  font-weight: normal;  font-style: italic;}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;I’ve also turned off styling for any links inside headings by having them inherit their styles from the heading elements.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;scss&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;h1&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;h2&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;h3&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;h4&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;h5&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;--0:#E981B9;--0fs:italic&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;visited&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;--0:#E981B9;--0fs:italic&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;hover&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;--0:#E981B9;--0fs:italic&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;active&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;color&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;inherit&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;text-decoration&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;inherit&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;h1,h2,h3,h4,h5 {  a,  a:visited,  a:hover,  a:active {    color: inherit;    text-decoration: inherit;  }}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;I’m generally pretty happy with this, except for one thing. I use level two headings more than any other and because I’ve set them in uppercase I’m missing out on the loveley discretionary ligatures that Literata includes. So I might want to revisit this soon.&lt;/p&gt;</content:encoded></item><item><title>Website Redesign Part VIII - Adding some style</title><link>https://danny.is/writing/website-redesign-viii/</link><guid isPermaLink="true">https://danny.is/writing/website-redesign-viii/</guid><pubDate>Mon, 22 Jun 2020 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;The last part focussed on setting up a basic typographic system using margins and heading styles. In this part, I’m going to make a bunch of little tweaks to the typography of these essays. Over the next few months I’ll probably make a whole host of little incremental changes like this.&lt;/p&gt;
&lt;h2 id=&quot;old-style-figures--fractions&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#old-style-figures--fractions&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Old-style Figures &amp;#x26; Fractions&lt;/h2&gt;
&lt;p&gt;Most good typefaces contain two sorts of figures. Lining figures are designed to sit on the baseline and are generally all the same height. They’re great for headings, tables and UI. Old-style figures overhang the baseline and often vary in height. These are great for setting numbers in body copy.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/A_Figures.png&quot; alt=&quot;A_Figures&quot;&gt;&lt;/p&gt;
&lt;p&gt;I’m using the default lining figures in most places, but I want to use old-style figures in paragraphs, lists and blockquotes (eg. 1957). I also want to use proper fractions like this → 3/4.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;/_astro/ec.7syh9.css&quot;&gt;&lt;script type=&quot;module&quot; src=&quot;/_astro/ec.0vx5m.js&quot;&gt;&lt;/script&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;css&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;.essay&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt; &gt; p&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;.essay&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt; &gt; ol&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;.essay&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt; &gt; ul&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;.essay&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt; &gt; blockquote&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-variant-numeric&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;oldstyle-nums&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;diagonal-fractions&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;.essay &gt; p,.essay &gt; ol,.essay &gt; ul,.essay &gt; blockquote {  font-variant-numeric: oldstyle-nums diagonal-fractions;}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h2 id=&quot;bold&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#bold&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Bold&lt;/h2&gt;
&lt;p&gt;Where variable fonts are supported, I’m making strong tags a little bolder than normal.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;scss&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;strong&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-weight&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;600&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;@supports&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-variation-settings&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;normal&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;) {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-weight&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;625&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;strong {  font-weight: 600;  @supports (font-variation-settings: normal) {    font-weight: 625;  }}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h2 id=&quot;abbreviaions&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#abbreviaions&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Abbreviaions&lt;/h2&gt;
&lt;p&gt;Abbreviations like &lt;abbr title=&quot;Hyper Text Markup Language&quot;&gt;HTML&lt;/abbr&gt; nearly always look best rendered in small caps with a little space between the letters, so I’m doing that for any &lt;code&gt;&amp;#x3C;abbr&gt;&lt;/code&gt; elements:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Use small caps and transform the text to lowercase to we don’t get any &lt;em&gt;proper&lt;/em&gt; caps mixed in.&lt;/li&gt;
&lt;li&gt;Space out the letters a bit (I’m using &lt;code&gt;ch&lt;/code&gt; here, which is based on the width of the “0” character).&lt;/li&gt;
&lt;li&gt;Use a low optical size and fall back to &lt;em&gt;Literata Caption&lt;/em&gt; where variable fonts aren’t supported.&lt;/li&gt;
&lt;li&gt;Use a slightly heavier weight than normal - roughly equivilent to Semibold.&lt;/li&gt;
&lt;li&gt;Set the cursor to &lt;em&gt;help&lt;/em&gt; is it has a title attribute.&lt;/li&gt;
&lt;li&gt;Make the dotted underline almost invisible, and position it under the baseline rather than on the baseline.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;scss&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;.essay&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;abbr&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;text-transform&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;lowercase&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-variant&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;small-caps&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;letter-spacing&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0.05&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;ch&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-family&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;Literata Caption&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;Georgia&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;Times New Roman&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;serif&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-weight&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;400&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-size&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0.85&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;em&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;@supports&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-variation-settings&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;normal&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;) {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-family&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;Literata Variable&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;Georgia&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;Times New Roman&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;serif&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-variation-settings&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;opsz&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-weight&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;410&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;text-decoration-color&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;rgba&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0.15&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;text-underline-position&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;under&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;&amp;#x26;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;title&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;] {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;cursor:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;help&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;.essay abbr {  text-transform: lowercase;  font-variant: small-caps;  letter-spacing: 0.05ch;  font-family: &amp;#x27;Literata Caption&amp;#x27;, Georgia, &amp;#x27;Times New Roman&amp;#x27;, serif;  font-weight: 400;  font-size: 0.85em;  @supports (font-variation-settings: normal) {    font-family: &amp;#x27;Literata Variable&amp;#x27;, Georgia, &amp;#x27;Times New Roman&amp;#x27;, serif;    font-variation-settings: &amp;#x27;opsz&amp;#x27; 10;    font-weight: 410;  }  text-decoration-color: rgba(0, 0, 0, 0.15);  text-underline-position: under;  &amp;#x26;[title] {    cursor: help;  }}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h2 id=&quot;first-line--drop-caps&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#first-line--drop-caps&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;First line &amp;#x26; Drop Caps&lt;/h2&gt;
&lt;p&gt;I’m experimenting with adding drop-cap and small caps for the first line. I’m not yet sure whether I really like this, so will probably revisit later on. I’ve also added &lt;a href=&quot;https://css-tricks.com/almanac/properties/h/hanging-punctuation/&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;hanging punctuation&lt;/a&gt; for paragraphs (only supported by Safari at the moment)&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-06-22-drop-cap.png&quot; alt=&quot;Example: Drop Caps&quot;&gt;&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;scss&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;.essay&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &gt; &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;p&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;&amp;#x26;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9;--0fs:italic&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;first-of-type&lt;/span&gt;&lt;span style=&quot;--0:#E981B9;--0fs:italic&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;first-line&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;text-transform&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;lowercase&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-variant-caps&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;small-caps&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-weight&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;500&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;@supports&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-variation-settings&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;normal&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;) {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-weight&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;525&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;&amp;#x26;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9;--0fs:italic&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;first-of-type&lt;/span&gt;&lt;span style=&quot;--0:#E981B9;--0fs:italic&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;first-letter&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;text-transform&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;uppercase&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;float&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;left&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-size&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;em&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;line-height&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;padding-right&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0.5&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;ch&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;.essay &gt; p {  &amp;#x26;:first-of-type::first-line {    text-transform: lowercase;    font-variant-caps: small-caps;    font-weight: 500;    @supports (font-variation-settings: normal) {      font-weight: 525;    }  }  &amp;#x26;:first-of-type::first-letter {    text-transform: uppercase;    float: left;    font-size: 4em;    line-height: 1;    padding-right: 0.5ch;  }}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;That’s it for now. I’ll cover lists, code blocks and links in future articles.&lt;/p&gt;</content:encoded></item><item><title>Website Redesign Part VI - Adding a Typeface for Essays</title><link>https://danny.is/writing/website-redesign-vi/</link><guid isPermaLink="true">https://danny.is/writing/website-redesign-vi/</guid><pubDate>Sun, 21 Jun 2020 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;After much messing about with typefaces, I think I’ve narrowed the choice for essay copy down to two contenders: Literata and Lora. Both feel “bookish” and are designed for long-form reading on screens. Both are open source and available as variable fonts as well as static. Version 3 of Literata not only allows us to vary the weight, but also the optical size. The static version has four optical sizes – each in various weights and italic versions.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/literata-optical-sizes.png&quot; alt=&quot;Optical sizes&quot;&gt;&lt;/p&gt;
&lt;p&gt;The caption variant is designed for small sizes (around 7pt), the regular variant for body copy and the deck and display variants are meant for headings. The variable version gives me pretty fine-grained control over this.&lt;/p&gt;
&lt;p&gt;Since I’m not sure which of these two typefaces I prefer, I’ve decided to bring both of them into the website and switch them out regularly as I’m working to see if one starts to grow on me.&lt;/p&gt;
&lt;p&gt;Although I initially wanted to serve fonts via Google Fonts, I’ve changed my mind. One of my technical principles is &lt;em&gt;as few dependancies as possible&lt;/em&gt;, and these are both open source I can host the myself. I was finally tipped into this decision because Google Fonts doesn’t have the latest version of literate available.&lt;/p&gt;
&lt;h2 id=&quot;building-the-fonts&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#building-the-fonts&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Building the fonts&lt;/h2&gt;
&lt;p&gt;I’ve never had to build fonts from source before, but after much &lt;a href=&quot;https://en.wiktionary.org/wiki/yak_shaving&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;yak shaving&lt;/a&gt; to update my python install and various home-brew packages I was able to run the three build scripts from the Literata repo. It toook a while to work out what they do, but essentially:&lt;/p&gt;
&lt;ol class=&quot;long-list-items&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/googlefonts/literata/blob/master/sources/build-static.sh&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;&lt;code&gt;build-static.sh&lt;/code&gt;&lt;/a&gt; builds a bunch of TTF font files from source using the &lt;code&gt;fontmake&lt;/code&gt; utility. This produces a &lt;strong&gt;lot of files&lt;/strong&gt; – one for each weight/style/optical-size combination.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/googlefonts/literata/blob/master/sources/build-var.sh&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;&lt;code&gt;build-var.sh&lt;/code&gt;&lt;/a&gt; does the same, but for the variable fonts. It only produces two TTFs: roman and italic.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/googlefonts/literata/blob/master/sources/build-woff.sh&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;&lt;code&gt;build-woff.sh&lt;/code&gt;&lt;/a&gt; takes the TTFs we just built and makes woff and woff2 versions using the &lt;code&gt;sfnt2woff&lt;/code&gt; and &lt;code&gt;woff2_compress&lt;/code&gt; utilities.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Since the Lora repo already includes TFF files, I just tweaked &lt;code&gt;build-woff.sh&lt;/code&gt; a bit and used it to make corresponding woff/woff2 files with the same folder structure as Literata.&lt;/p&gt;
&lt;p&gt;After renaming the wolf and woff2 versions of the variable fonts to remove the brackets, I ended up with this in the &lt;code&gt;fonts&lt;/code&gt; directory of this site…&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-06-18-font-tree.png&quot; alt=&quot;Screenshot of file tree in fonts directory&quot;&gt;&lt;/p&gt;
&lt;p&gt;The whole thing comes in at a whopping 28MB, but that’s okay because I’m not actually gonna use most of these in production. I just want them to play with for the moment.&lt;/p&gt;
&lt;h2 id=&quot;font-face-declarations&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#font-face-declarations&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;@font-face Declarations&lt;/h2&gt;
&lt;p&gt;I &lt;a href=&quot;https://github.com/jpamental/moby-dick/blob/master/assets/scss/partials/_00_webfonts.scss&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;borrowed the Literata font-face declarations&lt;/a&gt; from Jason Pamental’s amazing &lt;a href=&quot;https://mobydick.wales/&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Moby Dick project&lt;/a&gt; and added some similar ones for Lora. I’m pretty sure I’m gonna borrow a lot more from that project over the next few months. They generally follow this format:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;/_astro/ec.7syh9.css&quot;&gt;&lt;script type=&quot;module&quot; src=&quot;/_astro/ec.0vx5m.js&quot;&gt;&lt;/script&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;css&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;@font-face&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-family&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;Literata Caption&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-style&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;italic&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-weight&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;600&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;src&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;url&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;../fonts/literata/woff2/Literata-7ptSemiBoldItalic.woff2&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;format&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;woff2&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;),&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;url&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;../fonts/literata/woff/Literata-7ptSemiBoldItalic.woff&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;format&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;woff&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-display&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;swap&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;@font-face {  font-family: &amp;#x27;Literata Caption&amp;#x27;;  font-style: italic;  font-weight: 600;  src:    url(&amp;#x27;../fonts/literata/woff2/Literata-7ptSemiBoldItalic.woff2&amp;#x27;) format(&amp;#x27;woff2&amp;#x27;),    url(&amp;#x27;../fonts/literata/woff/Literata-7ptSemiBoldItalic.woff&amp;#x27;) format(&amp;#x27;woff&amp;#x27;);  font-display: swap;}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;It’s been a long time since I actually looked at a @font-face declaration, so if you need a reminder too:&lt;/p&gt;
&lt;ul class=&quot;long-list-items&quot;&gt;
&lt;li&gt;We’re writing a declaration for &lt;code&gt;Literata-7ptSemiBoldItalic&lt;/code&gt;. This is the &lt;strong&gt;caption&lt;/strong&gt;-sized version, in Semibold italic.&lt;/li&gt;
&lt;li&gt;The first three lines specify when this font file should be used. In this case when we set &lt;code&gt;font-family: &apos;Literata Caption&apos;&lt;/code&gt; with a weight of 600 and an italic &lt;code&gt;font-style&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;src&lt;/code&gt; attribute specifies the path to the woff2 version first and falls back to the woff version if that’s not supported (woff 2 offers much better compression than woff 1). Since woff is widely supported we’re not including any other fallbacks.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;font-display&lt;/code&gt; tells the browser how to handle font loading. In this case, the browser will render the text in a fallback and then our font in once it’s loaded.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The variable font declarations look much the same, but include two values for &lt;code&gt;font-weight&lt;/code&gt;: the minimum and maximum at which it should be used.&lt;/p&gt;
&lt;h2 id=&quot;using-the-fonts&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#using-the-fonts&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Using the fonts&lt;/h2&gt;
&lt;p&gt;Our current CSS sets the font-family for essays using a custom property.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;css&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;.essay&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-family&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(--font-essay);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;.essay {  font-family: var(--font-essay);}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;As the design evolves, we’ll definitely end up with a more complex system for this but for now we can just update the variable to use Literata. We can also tell browsers that support variable fonts to load that instead of the static version.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;css&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9;--0fs:italic&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;root&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;--font-essay&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;Literata&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;Georgia&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;Times New Roman&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;serif&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;@supports (&lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-variation-settings&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;normal&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;) {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;--font-essay&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;Literata Variable&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;Georgia&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;Times New Roman&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;serif&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;:root {  --font-essay: &amp;#x27;Literata&amp;#x27;, Georgia, &amp;#x27;Times New Roman&amp;#x27;, serif;  @supports (font-variation-settings: normal) {    --font-essay: &amp;#x27;Literata Variable&amp;#x27;, Georgia, &amp;#x27;Times New Roman&amp;#x27;, serif;  }}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;I’d like to provide a more robust fallback stack (see &lt;a href=&quot;https://github.com/dannysmith/dannyis-jekyll/issues/28&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;this issue&lt;/a&gt;) but for now, we’ll just go to Georgia and TNR.&lt;/p&gt;
&lt;h2 id=&quot;some-basic-open-type-features&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#some-basic-open-type-features&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Some basic Open Type Features&lt;/h2&gt;
&lt;p&gt;Literata includes some lovely discretionary ligatures, but we don’t want them in the body copy. I’ve already set &lt;code&gt;font-variant-ligatures: common-ligatures;&lt;/code&gt; on the &lt;code&gt;body&lt;/code&gt; in my base stylesheet, but we’ll turn on discretionary ligatures for headings across the whole site:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;css&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;h1&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;h2&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;h3&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;h4&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;h5&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;font-variant-ligatures&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;common-ligatures&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;discretionary-ligatures&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;h1,h2,h3,h4,h5 {  font-variant-ligatures: common-ligatures discretionary-ligatures;}&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-06-19-heading-ligs.png&quot; alt=&quot;Screenshot of discretionary ligatures in heading&quot;&gt;&lt;/p&gt;
&lt;h2 id=&quot;so-where-are-we-at&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#so-where-are-we-at&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;So where are we at?&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-06-19-final-screenshots.png&quot; alt=&quot;Comparison of Literata and Lora applied to an essay&quot;&gt;&lt;/p&gt;
&lt;p&gt;I’ll see which of these two feels best as I work on the site over the next few weeks.&lt;/p&gt;
&lt;h3 id=&quot;reflection-on-learning&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#reflection-on-learning&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Reflection on Learning&lt;/h3&gt;
&lt;p&gt;One of my goals for this project was my own learning, and after some reflection on that I’ve learned a fair bit during this wanter into web typography…&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I finally read &lt;a href=&quot;https://en.wikipedia.org/wiki/The_Elements_of_Typographic_Style&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;The Elements of Typographic Style&lt;/a&gt; cover-to-cover.&lt;/li&gt;
&lt;li&gt;I’ve learned a lot about type just by &lt;strong&gt;really looking&lt;/strong&gt; at a bunch of different faces.&lt;/li&gt;
&lt;li&gt;I’ve learned a bit about how digital fonts are made and the tools used to build them.&lt;/li&gt;
&lt;li&gt;I’ve started to get excited about opentype features in CSS.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I’ve also re-learned that it’s easy to get blocked by indecision on a personal project like this. I could have wasted months trying to find the perfect article typeface and still not been happy with it. As with most things, &lt;strong&gt;any decision is better than no decision&lt;/strong&gt;. Especially when it’s reversible.&lt;/p&gt;</content:encoded></item><item><title>Website Redesign Part V - Choosing a Typeface for Essays</title><link>https://danny.is/writing/website-redesign-v/</link><guid isPermaLink="true">https://danny.is/writing/website-redesign-v/</guid><pubDate>Sat, 20 Jun 2020 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;I love typography, but I’m not that good at it. One day I’ll take a typography course at a a design school, but in the meantime I need to choose some typefaces for this website. I’m fairly confident I’ll need two rather different typefaces in the end. A &lt;strong&gt;essay face&lt;/strong&gt; for setting longer-form writing and a &lt;strong&gt;UI face&lt;/strong&gt; for everything else. I like the idea of using a very modernist face for the UI and something more old-fasioned and bookish for the essays. It might be hard to make this work but it seems to chime will with my personality – I’ve always had a tendancy to mix super-modern with traditional oldy-worldy. Trainers and Tweeds, if you will.&lt;/p&gt;
&lt;p&gt;I’ll explore this in more detail in a future article, but for the time-being let’s revisit the four core values I decided on in Part I: &lt;em&gt;Simple&lt;/em&gt;, &lt;em&gt;Beautiful&lt;/em&gt;, &lt;em&gt;Authentic&lt;/em&gt; and &lt;em&gt;Content-first&lt;/em&gt;. Choosing and pairing typefaces is hard, so to keep things simple we’ll start by looking for one. And that last value makes a strong case for starting with the content.&lt;/p&gt;
&lt;h2 id=&quot;what-do-i-need-from-an-essay-typeface&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#what-do-i-need-from-an-essay-typeface&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;What do I need from an Essay Typeface&lt;/h2&gt;
&lt;p&gt;The most obious requirement is that it’s very readable. And in particular, &lt;strong&gt;on screens&lt;/strong&gt;. It needs to get out of the way and put the content first. It also needs to work well in dark mode, which probably rules out faces with very high stroke contrast (and therefore thin stokes). And to keep things simple, it should also work for headings, quotes, captions and the like –I’d rather not use a third face for this.&lt;/p&gt;
&lt;p&gt;As far as feel goes, I’m going for &lt;strong&gt;bookish but definitely of the digital world&lt;/strong&gt;. This probably means a serif, but maybe not a really traditional one.&lt;/p&gt;
&lt;p&gt;So I’m going to start by looking for faces that are digital natives (ie not redrawings of print faces), which have been designed specifically for readability on the screen. There are a few technical constraints to think about first, though.&lt;/p&gt;
&lt;h2 id=&quot;technical-constrains--features&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#technical-constrains--features&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Technical Constrains &amp;#x26; Features&lt;/h2&gt;
&lt;p&gt;It must be open source. While I have a subscription to Adobe Fonts I don’t want this project to depend on a paid service. If I can find something that’s hosted on Google Fonts so much the better. Because &lt;strong&gt;simplicity&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;I’d &lt;em&gt;prefer&lt;/em&gt; a variable font. Mostly because they’re new and shiny and fun to play with, but also because it’s likely to reduce total page weight. If I go with a variable font, it also needs to have a static version – not all browsers properly support variable fonts yet.&lt;/p&gt;
&lt;p&gt;I’ll need a good selection of weights in both roman and italic. Probably 200 (light), 400 (normal), 700 (bold) as a minimum. I’ll also want support for the following opentype features&lt;sup&gt;&lt;a href=&quot;#user-content-fn-1&quot; id=&quot;user-content-fnref-1&quot; data-footnote-ref=&quot;&quot; aria-describedby=&quot;footnote-label&quot;&gt;1&lt;/a&gt;&lt;/sup&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Proper small caps&lt;/li&gt;
&lt;li&gt;Both Old-style and and Lining figures&lt;/li&gt;
&lt;li&gt;Nice default and discretionary ligatures&lt;/li&gt;
&lt;li&gt;Fractions&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It would be nice to have a proper superscript for footnotes, but this is hardly crucial.&lt;/p&gt;
&lt;h2 id=&quot;checklists&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#checklists&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Checklists&lt;/h2&gt;
&lt;p&gt;I’ve bubbled all of that down into a couple of checklists to help me evaluate fonts. On reflection, none of the items are really mandatory – it’s important I keep an open mind while I’m exploring. But they’re good starter to help narrow down the field.&lt;/p&gt;
&lt;h3 id=&quot;technical-features&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#technical-features&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Technical Features&lt;/h3&gt;
&lt;ul class=&quot;contains-task-list&quot;&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Open source?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Available on Google Fonts?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Variable Font? (with static version as fallback?)&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Wights at least: light (200), normal (400) and bold (700) in italic and bold.&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Proper Small Caps&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Old-style and lining figures&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Nice ligatures (including discretionary)&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Proper Fractions&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Other OpenType features that might be fun/useful?&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;style&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#style&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Style&lt;/h3&gt;
&lt;ul class=&quot;contains-task-list&quot;&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Was it made specifically for the screen?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Does it feel bookish?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Does it still feel kinda modern?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Is it easy to read at very small and very large text-sizes?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Also in light and dark modes?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Does it work on low-res screens?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Is it suitable for both dense paragraph-heavy copy and more sparse copy like lists?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Could it work for headings, callouts, quotes and captions too?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Does it get out the way?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Do I think it’s beautiful?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Does it feel like me?&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;the-shortlist&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#the-shortlist&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;The Shortlist&lt;/h2&gt;
&lt;p&gt;After a lot of exploration, I’ve settled on five candidates. None hit all the criteria in the checklists, but a few get pretty close. And I like them all.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;spectral&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#spectral&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Spectral&lt;/h3&gt;
&lt;p&gt;(&lt;a href=&quot;https://fonts.google.com/specimen/Spectral&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Google font page&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-06-19-Spectral.png&quot; alt=&quot;Type Specimen - Spectral&quot;&gt;&lt;/p&gt;
&lt;p&gt;Specral was designed in 2017 as a screen-first typeface. &lt;a href=&quot;https://design.google/library/spectral-new-screen-first-typeface/&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;This article&lt;/a&gt; goes into a lot more detail.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Spectral is a new and versatile serif face available in seven weights of roman and italic, with small caps. Intended primarily for text-rich, screen-first environments and long-form reading&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Over the past decade, the amount of attention given to readability studies by typeface designers has yielded either bland and conservative results, or overwrought “solutions.” This is more pronounced in screen typefaces than those made for print media, where common pitfalls include overly simplified shapes, “friendly” letters, and facile tricks like unnecessarily upright italics.&lt;/p&gt;
&lt;p&gt;In response, Spectral takes an unambiguous stance: Screen typefaces should not look like caricatures of themselves. They should instead be functional text designs that stay interesting enough to convey the many voices that contemporary users need.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;At first glance, this seems like it might be a great choice, but after some experimentation the very high stroke contrast makes it feel a bit &lt;em&gt;too bookish&lt;/em&gt;. It’s a bit too spindly, somehow. It also doesn’t work that well on dark backgrounds at small sizes.&lt;/p&gt;
&lt;p&gt;If I was setting a book on the web, I’d definitely consider this though.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;lora&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#lora&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Lora&lt;/h3&gt;
&lt;p&gt;(&lt;a href=&quot;https://fonts.google.com/specimen/Lora&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Google font page&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-06-19-Lora.png&quot; alt=&quot;Type Specimen - Lora&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Lora is a well-balanced contemporary serif with roots in calligraphy. It is a text typeface with moderate contrast well suited for body text.&lt;/p&gt;
&lt;p&gt;A paragraph set in Lora will make a memorable appearance because of its brushed curves in contrast with driving serifs. The overall typographic voice of Lora perfectly conveys the mood of a modern-day story, or an art essay.&lt;/p&gt;
&lt;p&gt;Technically Lora is optimised for screen appearance, and works equally well in print.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Lora was designed by Olga Karpushina in 2011. It’s definitely the least unusual of the five, though the fairly upright italic is beuatiful. This is definitely one that would get out of the way and put the content first.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-06-21-lora-promo.png&quot; alt=&quot;Type Promo - Lora&quot;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;alegreya&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#alegreya&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Alegreya&lt;/h3&gt;
&lt;p&gt;(&lt;a href=&quot;https://fonts.google.com/specimen/Alegreya&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Google font page&lt;/a&gt;)&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Alegreya is a typeface originally intended for literature. Among its crowning characteristics, it conveys a dynamic and varied rhythm which facilitates the reading of long texts. Also, it provides freshness to the page while referring to the calligraphic letter, not as a literal interpretation, but rather in a contemporary typographic language.&lt;/p&gt;
&lt;p&gt;The italic has just as much care and attention to detail in the design as the roman. The bold weights are strong, and the Black weights are really experimental for the genre. There is also a Small Caps sister family.&lt;/p&gt;
&lt;p&gt;Not only does Alegreya provide great performance, but also achieves a strong and harmonious text by means of elements designed in an atmosphere of diversity.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-06-19-Alagreya.png&quot; alt=&quot;Type Specimen - Alegreya&quot;&gt;&lt;/p&gt;
&lt;p&gt;I love the fact that Alegreya has a small caps variant and is part of a super family that includes a &lt;a href=&quot;https://fonts.google.com/specimen/Alegreya+Sans&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;sans-serif version&lt;/a&gt; - I was wondering if I could use the sans version for UI copy. But much like Spectral, it almost feels too caligraphic and oldy-worldy-bookish.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-06-21-alegreya-ligs.png&quot; alt=&quot;Ligratures in Alegreya&quot;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;literata&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#literata&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Literata&lt;/h3&gt;
&lt;p&gt;(&lt;a href=&quot;https://fonts.google.com/specimen/Literata&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Google font page&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-06-19-Literata.png&quot; alt=&quot;Type Specimen - Literata&quot;&gt;&lt;/p&gt;
&lt;p&gt;Literata is probably one of my favourites. It feels right for the job, somehow. It’s got a huge array of varients plus a variable version and some lovely ligatures. It was commissioned by Google and designed by TypeTogether in 2015 and is the default font family in Google Play Books. I’m not sure I like the idea of using a face that so many folks will associate with Google, but as far as versitility and reading experience goes, this is definitely on the shortlist.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;bitter&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#bitter&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Bitter&lt;/h3&gt;
&lt;p&gt;(&lt;a href=&quot;https://fonts.google.com/specimen/Bitter&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Google font page&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-06-19-Bitter.png&quot; alt=&quot;Type Specimen - Bitter&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Motivated by my love for the pixel I designed Bitter. A “contemporary” slab serif typeface for text, it is specially designed for comfortably reading on any computer or device. The robust design started from the austerity of the pixel grid, based on rational rather than emotional principles. It combines the large x-heights and legibility of the humanistic tradition with subtle characteristics in the characters that inject a certain rhythm to flowing texts.&lt;/p&gt;
&lt;p&gt;Bitter has little variation in stroke weight and the Regular is thicker than a normal ‘Regular’ style for print design. This generates an intense color in paragraphs, accentuated by the serifs that are as thick as strokes with square terminals.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This also scores well when it comes to readability, but the fact it’s slab serifs and very dark color make it feel a bit too unrefined for use here. It’s still on the shortlist though.&lt;/p&gt;
&lt;section data-footnotes=&quot;&quot; class=&quot;footnotes&quot;&gt;&lt;h2 class=&quot;sr-only&quot; id=&quot;footnote-label&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#footnote-label&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Footnotes&lt;/h2&gt;
&lt;ol&gt;
&lt;li id=&quot;user-content-fn-1&quot;&gt;
&lt;p&gt;&lt;a href=&quot;https://sparanoid.com/lab/opentype-features/&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Here’s&lt;/a&gt; a good overview of CSS opentype features. &lt;a href=&quot;#user-content-fnref-1&quot; data-footnote-backref=&quot;&quot; aria-label=&quot;Back to reference 1&quot; class=&quot;data-footnote-backref&quot;&gt;↩&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;</content:encoded></item><item><title>Website Redesign Part III - A Base to Start From</title><link>https://danny.is/writing/website-redesign-iii/</link><guid isPermaLink="true">https://danny.is/writing/website-redesign-iii/</guid><description>Building a solid foundation for a personal website redesign. Technical setup, tooling choices, and development workflow for modern web projects.</description><pubDate>Tue, 07 Apr 2020 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;I’m trying to keep the CSS as minimal as possible here, but I do want a decent blank slate to work from. So I’ve normalised browser styles with &lt;a href=&quot;https://necolas.github.io/normalize.css/&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;normalize.css&lt;/a&gt; and set up some of my own base styles.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Reset some basic styles to the way I like them.&lt;/li&gt;
&lt;li&gt;Set up some variables and use them for base colours and typography.&lt;/li&gt;
&lt;li&gt;Remove styles from all lists that have a class - they’re probably part of the UI, not the content.&lt;/li&gt;
&lt;li&gt;Remove styles from links that have a class - same reason.&lt;/li&gt;
&lt;li&gt;Set default link styles for body copy.&lt;/li&gt;
&lt;li&gt;Remove all animations and transitions for people that prefer not to see them.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I’m sure these will change over time, but here they are for now…&lt;/p&gt;
&lt;script src=&quot;https://gist.github.com/dannysmith/dc8930ee00a9c47588b096b74870f27b.js&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;https://gist.github.com/dannysmith/3e4d15914c9b809b447bb7e7538ae545.js&quot;&gt;&lt;/script&gt;
&lt;h2 id=&quot;a-starting-point-for-article-typography&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#a-starting-point-for-article-typography&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;A starting point for article typography&lt;/h2&gt;
&lt;p&gt;Since I’m writing on this site now, there’ll be a lot more written content. My &lt;strong&gt;Content-first&lt;/strong&gt; value means I should probably start with that, while my &lt;strong&gt;Simplicity&lt;/strong&gt; value means I should probably ignore layout and start by making the article copy as beautiful and readable as I can.&lt;/p&gt;
&lt;p&gt;So taking a &lt;a href=&quot;https://frankchimero.com/blog/2020/redesign-this-design/&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;leaf out of Frank Chimero’s book&lt;/a&gt;, I’m starting with a very very simple set of styles for my articles.&lt;/p&gt;
&lt;script src=&quot;https://gist.github.com/dannysmith/0cdf7bde3a20a9453d47c20155ba1d82.js&quot;&gt;&lt;/script&gt;
&lt;p&gt;I’ll focus in on this soon but until I choose a better typeface, &lt;code&gt;--font-copy&lt;/code&gt; is set to Georgia. Like Frank, I still like it.&lt;/p&gt;</content:encoded></item><item><title>Website Redesign Part IV - Pages and URLs</title><link>https://danny.is/writing/website-redesign-iv/</link><guid isPermaLink="true">https://danny.is/writing/website-redesign-iv/</guid><pubDate>Tue, 07 Apr 2020 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;I bought this domain specifically so I could have cool URLs like &lt;code&gt;danny.is/doingsomething&lt;/code&gt;, so definitely want to use certain URLs, regardless of content. These provide a good starting point for deciding what pages I might want.&lt;/p&gt;
&lt;h4 id=&quot;dannyis&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#dannyis&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;danny.is&lt;/h4&gt;
&lt;p&gt;The homepage, obviously. Since the last redesign this has just shown a list of links to other pages and external services, but I’ll probably change that a bit with this redesign.&lt;/p&gt;
&lt;h4 id=&quot;dannyisabout&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#dannyisabout&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;danny.is/about&lt;/h4&gt;
&lt;p&gt;A few paragraphs about me. Perhaps some other stuff.&lt;/p&gt;
&lt;h4 id=&quot;dannyisnow&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#dannyisnow&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;danny.is/now&lt;/h4&gt;
&lt;p&gt;A very simple description of what I’m doing at the moment. Inspired &lt;a href=&quot;https://sivers.org/nowff&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;by this&lt;/a&gt;.&lt;/p&gt;
&lt;h4 id=&quot;dannyiswriting&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#dannyiswriting&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;danny.is/writing&lt;/h4&gt;
&lt;p&gt;An index of my writing. This will definitely include my writing on this site, but I might also include stuff I write elsewhere.&lt;/p&gt;
&lt;h4 id=&quot;dannyisreading&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#dannyisreading&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;danny.is/reading&lt;/h4&gt;
&lt;p&gt;Stuff I’m reading. Historically, this has been a big list of links pulled from Pocket and Medium. I want to keep that, but might also include books I’m reading, or recommend.&lt;/p&gt;
&lt;h4 id=&quot;dannyiscv&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#dannyiscv&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;danny.is/cv&lt;/h4&gt;
&lt;p&gt;A PDF of my CV.&lt;/p&gt;
&lt;h4 id=&quot;dannyisusing&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#dannyisusing&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;danny.is/using&lt;/h4&gt;
&lt;p&gt;Forwards to a &lt;a href=&quot;https://www.notion.so/dannysmith/Danny-Uses-72544bdecd144ca5ab3864d92dcd119b&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Notion page detailing the software and hardware I use&lt;/a&gt;. I’m sticking with Notion for the moment because I already have much of this written.&lt;/p&gt;
&lt;h4 id=&quot;dannyismeeting&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#dannyismeeting&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;danny.is/meeting&lt;/h4&gt;
&lt;p&gt;Forwards to a &lt;a href=&quot;https://www.notion.so/Book-a-Meeting-with-Danny-e39fc8def5514b67b559b2e5a51934ae&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;notion page where you can book a meeting with me&lt;/a&gt;. I’ve been sharing the full notion link for about a year now, and it’s just occurred to me that setting up this forward makes a lot of sense. Again, I’m sticking with notion because I already have it set up.&lt;/p&gt;
&lt;h2 id=&quot;other-urls&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#other-urls&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Other URLs&lt;/h2&gt;
&lt;p&gt;I’ve also set up forwards for LinkedIn and youtube, since I find it hard to remember their URLs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;danny.is/linkedin → My LinkedIn profile&lt;/li&gt;
&lt;li&gt;danny.is/youtube → My Youtube channel&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It seems likely that I’ll also want two new pages…&lt;/p&gt;
&lt;h4 id=&quot;dannyislookingforwork&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#dannyislookingforwork&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;danny.is/lookingforwork&lt;/h4&gt;
&lt;p&gt;A “Hire me” page which is only live when I’m actively looking for work.&lt;/p&gt;
&lt;h4 id=&quot;dannyiscoaching&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#dannyiscoaching&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;danny.is/coaching&lt;/h4&gt;
&lt;p&gt;A page detailing my coaching work. I expect this will be the only page where I care about “marketing”.&lt;/p&gt;
&lt;h2 id=&quot;pages-i-need-to-design&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#pages-i-need-to-design&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Pages I need to design&lt;/h2&gt;
&lt;p&gt;Ignoring the forwards and the &lt;em&gt;now&lt;/em&gt; page, that’s &lt;strong&gt;eight&lt;/strong&gt; pages I need to consider when it comes to design.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Homepage&lt;/li&gt;
&lt;li&gt;About&lt;/li&gt;
&lt;li&gt;Writing (index)&lt;/li&gt;
&lt;li&gt;Writing (article)&lt;/li&gt;
&lt;li&gt;Reading&lt;/li&gt;
&lt;li&gt;Looking for Work&lt;/li&gt;
&lt;li&gt;Coaching&lt;/li&gt;
&lt;li&gt;404&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There’s a part of me that wants to dive into the design of these pages right away, but I’m resisting the urge. Making the writing that’s already here useable is far more important. Keep it simple, Danny.&lt;/p&gt;</content:encoded></item><item><title>Website Redesign Part II - Principles, Goals and Stuff to Keep</title><link>https://danny.is/writing/website-redesign-ii/</link><guid isPermaLink="true">https://danny.is/writing/website-redesign-ii/</guid><description>Design principles and goals for a modern personal website. Balancing simplicity, performance, and content-first architecture in web design.</description><pubDate>Tue, 17 Mar 2020 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Until now, every time I’ve redesigned this website it’s been because I didn’t like how it looked. Every few years, I’ve looked at it and felt like it doesn’t adequately represent me.&lt;/p&gt;
&lt;p&gt;When I started &lt;em&gt;this&lt;/em&gt; redesign process, I fully expected to feel the same way. But having spent a bunch of time staring at it, I think I still like a lot of what I have.&lt;/p&gt;
&lt;p&gt;More accurately, I still &lt;strong&gt;really&lt;/strong&gt; like these two pages…&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-03-17-dasmith1.png&quot; alt/&gt;
&lt;img src=&quot;/uploads/2020-03-17-dasmith2.png&quot; alt/&gt;&lt;/p&gt;
&lt;p&gt;When I designed them back in 2016 I was going for a modern “Swiss” influenced kinda vibe. I think I want to keep that.&lt;/p&gt;
&lt;p&gt;But let’s take a step back for a second and think about my goals.&lt;/p&gt;
&lt;h2 id=&quot;goals-of-this-site&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#goals-of-this-site&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Goals of this site&lt;/h2&gt;
&lt;p&gt;First and foremost, it’s a personal expression of me. It’s a place for me to &lt;strong&gt;have fun&lt;/strong&gt;: both with my writing and with design &amp;amp; CSS. So it’s okay if it’s a bit goofy or stuff is a bit broken sometimes.&lt;/p&gt;
&lt;p&gt;But it also represents me professionally.&lt;/p&gt;
&lt;p&gt;Thankfully, in both cases the primary goal remains the same. &lt;strong&gt;To help the reader understand me – Danny.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If I put my UX hat on for a minute, there is a &lt;a href=&quot;https://jtbd.info/&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Job To Be Done&lt;/a&gt; that I should consider. A subset of visitors to this site are trying to find out if I’m the right person to help them with something.&lt;/p&gt;
&lt;p&gt;Similarly – with my marketing and I-need-money-to-eat hat on – there is another subset of visitors that need my help; but neither of us know it yet.&lt;/p&gt;
&lt;p&gt;The last thing I want is for my personal site to be some sort of super-optimised landing page for &lt;strong&gt;Danny The Professional®&lt;/strong&gt;. Because that’s no fun. And it’s not at all an expression of me. But I do need to consider these special use cases &lt;em&gt;a bit&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Of course, there are also the random folk who come here to read the stuff I write. They probably just wanna read in peace.&lt;/p&gt;
&lt;p&gt;So if I think in terms of actors and their goals:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Danny&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;Express himself freely and without constraint.&lt;/li&gt;
&lt;li&gt;Have fun. With writing, design and code.&lt;/li&gt;
&lt;li&gt;Connect with people he can help, or who can help him.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Interested reader&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;Read Danny’s words in peace.&lt;/li&gt;
&lt;li&gt;(Perhaps) be notified when Danny writes some new words.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Person checking Danny out&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;Find out if Danny is the right person to help them.&lt;/li&gt;
&lt;li&gt;Contact Danny.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This feels like a good set of goals to start with. But they come in a strict order of priority: Danny → Interested Reader → Person Checking Danny Out. This is my personal website, after all.&lt;/p&gt;
&lt;p&gt;So here’s a rule I’m gonna try to stick to:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Given a choice between what I want to do and what I feel I should do because [reasons], always choose the former.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&quot;goals-of-this-redesign&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#goals-of-this-redesign&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Goals of this redesign&lt;/h2&gt;
&lt;p&gt;As I said in Part I, I’m doing this primarily for two reasons:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;I want a simpler, more technology-agnostic website.&lt;/li&gt;
&lt;li&gt;I want to write here, not on Medium.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Combined with the website goals up there ☝️, I think I’m trying to achieve the following:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Represent myself more authentically.&lt;/li&gt;
&lt;li&gt;Simplify my own mental model for who I am and what I do, as expressed through this site.&lt;/li&gt;
&lt;li&gt;Make things more obvious and useful to readers.&lt;/li&gt;
&lt;li&gt;Put my writing at the front, and make it beautiful.&lt;/li&gt;
&lt;li&gt;Provide somewhere for folks to find out about my work, and how I might be able help them.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I suspect (2) and (3) mean better content organisation and hierarchy, along with some self-imposed constraints. (4) probably means better typography and more focus on the tiny details. As for (5) – that’s probably just a page of its own.&lt;/p&gt;
&lt;p&gt;The first one is interesting though. I said earlier that I like the current design. For the first time ever it still feels authentic now that &lt;em&gt;Redesign Time&lt;/em&gt; has rolled up. And so it does. At least what there is of it.&lt;/p&gt;
&lt;p&gt;And perhaps that’s the problem. My current site is too sparse. Too sanitised. Sure, it has some wacky angles and stuff. But it has no &lt;em&gt;substance&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;It also feels a bit cold and unloved. Like a well-machined tool that rarely gets used.&lt;/p&gt;
&lt;p&gt;I’d much rather it felt like a hand-made tool that’s used and loved every day. It’ll probably have more dents and scratches, but it will feel much more like &lt;em&gt;home&lt;/em&gt;.&lt;/p&gt;
&lt;h3 id=&quot;representing-danny-more-authentically&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#representing-danny-more-authentically&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Representing Danny more authentically&lt;/h3&gt;
&lt;p&gt;I recently asked some friends to describe me using as many single words/short phrases as they wanted. The list so far has been a great prompt for reflection and has led me to a fair few &lt;a href=&quot;https://www.habitsforwellbeing.com/whats-your-blindspot/&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;blind spots&lt;/a&gt;, but I’m still waiting for a lot of folks to come back to me.&lt;/p&gt;
&lt;p&gt;I’m hoping that this will help identify some words that I feel authentically represent me.&lt;/p&gt;
&lt;p&gt;More on this later.&lt;/p&gt;
&lt;h2 id=&quot;so-where-are-we-at&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#so-where-are-we-at&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;So where are we at?&lt;/h2&gt;
&lt;p&gt;Besides the fact that I like my current website, we’ve identified three main actors and their goals. We’ve also established five initial goals for this redesign, and expanded on the most important of them.&lt;/p&gt;
&lt;p&gt;Back in Part I I listed four values that felt right as guides for this project.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Simple&lt;/li&gt;
&lt;li&gt;Beautiful&lt;/li&gt;
&lt;li&gt;Authentic&lt;/li&gt;
&lt;li&gt;Content-first&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;They still feel right to me. And they now have bit more flesh on them.&lt;/p&gt;
&lt;aside class=&quot;callout&quot; data-callout-color=&quot;default&quot; data-astro-cid-pyumqe5w&gt;  &lt;div class=&quot;content-wrapper&quot; data-astro-cid-pyumqe5w&gt;  &lt;div class=&quot;content content-trim&quot; data-astro-cid-pyumqe5w&gt; &amp;lt;p&amp;gt;This felt like a good time to define some design principles as guides for my thinking. But after
half an hour with pen and paper nothing seemed solid enough to be considered a principle. So I’ll
revisit this later.&amp;lt;/p&amp;gt; &lt;/div&gt; &lt;/div&gt; &lt;/aside&gt;
&lt;h2 id=&quot;what-about-my-current-website&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#what-about-my-current-website&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;What about my current website?&lt;/h2&gt;
&lt;p&gt;Before wrapping this up, I want to take a look at my current website with all this thinking in the back of my mind. I particularly want to look at the two pages I like – the homepage and the 404. Here are some unedited thoughts on them:&lt;/p&gt;
&lt;ol class=&quot;long-list-items&quot;&gt;
&lt;li&gt;They &lt;em&gt;are&lt;/em&gt; simple. ✅&lt;/li&gt;
&lt;li&gt;They put the content first – even though there is hardly any of it. ✅&lt;/li&gt;
&lt;li&gt;There should be more content.&lt;/li&gt;
&lt;li&gt;I think the 404 page is beautiful. I love how the colour, type and layout interact. ✅&lt;/li&gt;
&lt;li&gt;The homepage is less beautiful. Futura looks pretty bad at very large sizes and the whole thing feels slightly unpolished somehow. It lacks attention to the little details. Inauthentic.&lt;/li&gt;
&lt;li&gt;Futura is a lazy choice of typeface - I use it everywhere.&lt;/li&gt;
&lt;li&gt;The 404 page feels like an authentic representation of me&lt;sup&gt;&lt;a href=&quot;#user-content-fn-1&quot; id=&quot;user-content-fnref-1&quot; data-footnote-ref aria-describedby=&quot;footnote-label&quot;&gt;1&lt;/a&gt;&lt;/sup&gt;. The homepage less so. This might have more to do with the content than the deign. I talk &lt;strong&gt;a lot&lt;/strong&gt; and am generally friendly, and it feels a bit too minimalist and impersonal. It’s somehow not goofy enough, where the 404 page is. At least the palette feels warm ad cosy.&lt;/li&gt;
&lt;li&gt;I’m going for a kinda Bauhaus/Swiss vibe but there’s no grid. I’m a massive nerd for orderly systems and grids, so this feels both inauthentic and like a missed opportunity to create some beauty through mathematics.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Until next time.&lt;/p&gt;
&lt;section data-footnotes class=&quot;footnotes&quot;&gt;&lt;h2 class=&quot;sr-only&quot; id=&quot;footnote-label&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#footnote-label&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Footnotes&lt;/h2&gt;
&lt;ol&gt;
&lt;li id=&quot;user-content-fn-1&quot;&gt;
&lt;p&gt;Yes I know, “Not Found”. 🙃 &lt;a href=&quot;#user-content-fnref-1&quot; data-footnote-backref aria-label=&quot;Back to reference 1&quot; class=&quot;data-footnote-backref&quot;&gt;↩&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;</content:encoded></item><item><title>Website Redesign Part I - The Tech</title><link>https://danny.is/writing/website-redesign-i/</link><guid isPermaLink="true">https://danny.is/writing/website-redesign-i/</guid><description>Technical decisions and architecture choices for rebuilding danny.is. Learn about static site generators, JAMstack, and modern web development approaches.</description><pubDate>Sat, 14 Mar 2020 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Over the years, this website has taken many forms. Initially, it was a Wordpress blog. Then is was a hand-rolled Sinatra app that rendered markdown pages. More recently I’ve blogged on Medium and at the time of writing, my website is a much simpler Sinatra app.&lt;/p&gt;
&lt;p&gt;A few months ago I had an ongoing problem with medium which lasted about three months. I got a new Monzo card and medium couldn’t charge it. Although none of my articles were behind the paywall, it did mean that I couldn’t read other people’s paywalled articles. And even though I was happy to pay, I &lt;strong&gt;couldn’t&lt;/strong&gt;. Eventually, after many many emails between me, Monzo and Medium, I involved Medium’s payment processor Stipe. Turns out that the problem was some bad data on their end. We resolved it, but only because I knew about stripe.&lt;/p&gt;
&lt;p&gt;This whole experience left a bad taste in my mouth, and like a lot of other people it feels like time to move the canonical version of my writing onto a platform that I own… my own website.&lt;/p&gt;
&lt;p&gt;At the same time, I’ve also become frustrated with my website. Considering what it does, it’s most definitely over-engineered. It’s not fun to play with any more, and I seem to spend most of my time on it updating dependancies. I also have to pay Heroku to keep it running.&lt;/p&gt;
&lt;p&gt;Time to simplify things, then. I need a static site.&lt;/p&gt;
&lt;p&gt;Why a static site?&lt;/p&gt;
&lt;p&gt;If my site is just HTML and CSS then it’s easy to change, even if I’ve not touched it in years. There are no complex mental models to remember, no dependancies to manage, no security vulnerabilities to patch. I can also deploy it anywhere. I’m not reliant on any specific third parties. Static sites are also &lt;a href=&quot;https://www.youtube.com/watch?v=b2F-DItXtZs&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;web scale&lt;/a&gt; by default when hosted in the right place.&lt;/p&gt;
&lt;p&gt;So that’s my starting point… plain old HTML and CSS, deployed to Github Pages. When I want to write a new article I just make an HTML page. Simple.&lt;/p&gt;
&lt;p&gt;But I also want to enjoy writing articles, which probably means writing in markdown.&lt;/p&gt;
&lt;p&gt;So a static site generator is the obvious choice. All the cool kids are using Gatsby and Hugo, but after spending some time with both I think Jekyll is the best option for me. It’s simple, is battle-tested and is very very stable.&lt;/p&gt;
&lt;p&gt;Before going any further with the tech, I need some values and principles to guide my decisions.&lt;/p&gt;
&lt;h2 id=&quot;values&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#values&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Values&lt;/h2&gt;
&lt;p&gt;After some time with a pen and paper, these seem appropriate:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Simple&lt;/li&gt;
&lt;li&gt;Beautiful&lt;/li&gt;
&lt;li&gt;Authentic&lt;/li&gt;
&lt;li&gt;Content-first&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;engineering-principles&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#engineering-principles&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Engineering Principles&lt;/h2&gt;
&lt;p&gt;Based on these values, I’ve pulled out some principles to guide my decisions on tech stack:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;As few dependencies as possible (both build-time and run-time dependancies).&lt;/li&gt;
&lt;li&gt;Use defaults wherever possible.&lt;/li&gt;
&lt;li&gt;Write as little code as possible.&lt;/li&gt;
&lt;li&gt;Do not over-abstract. Avoid fallbacks, polyfills and hacks.&lt;/li&gt;
&lt;li&gt;Bake accessibility in.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I’ll come back to these regularly.&lt;/p&gt;
&lt;h2 id=&quot;jekyll-plugins&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#jekyll-plugins&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Jekyll Plugins&lt;/h2&gt;
&lt;p&gt;It’s tempting to install a whole bunch of plugins – there are some great ones out there. But every plugin is a build-time dependancy, so I’ve settled on just three.&lt;/p&gt;
&lt;ul class=&quot;long-list-items&quot;&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;https://github.com/benbalter/jekyll-optional-front-matter&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Optional Front Matter&lt;/a&gt;&lt;/strong&gt;. This makes the front-matter optional, obviously. I want it so that my HTML pages don’t need any front matter.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;https://github.com/jekyll/jekyll-seo-tag&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;SEO Tag&lt;/a&gt;&lt;/strong&gt;. This adds a bunch of SEO-related meta tags in a pretty intelligent way.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;https://github.com/jekyll/jekyll-redirect-from&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Redirect From&lt;/a&gt;&lt;/strong&gt;. This lets me set up redirects in a super-intuitive way. I can crate an empty page or post, specify the redirect in the front matter and be done with it.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;but-what-about-dynamic-stuff&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#but-what-about-dynamic-stuff&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;But what about dynamic stuff?&lt;/h2&gt;
&lt;p&gt;My current website has some dynamic stuff. The only bits I still care about are my reading list and highlights. My medium highlights are pulled in &lt;a href=&quot;https://github.com/dannysmith/dannyis/blob/master/lib/medium_request.rb#L74&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;via their private API&lt;/a&gt; and cached in Redis.&lt;/p&gt;
&lt;p&gt;My pocket items and medium recommendations work a bit differently. When I clap for an article on medium or archive one in pocket IFTTT sends a request to an endpoint which stores the details in a Postgres database which the Sinatra app can access.&lt;/p&gt;
&lt;p&gt;On reflection, I don’t care about the highlights right now.&lt;/p&gt;
&lt;p&gt;But I definitely want to retain the likes from Pocket and Medium. I don’t want to maintain a Postgres database though.&lt;/p&gt;
&lt;p&gt;Enter Airtable. I can have IFTTT create a record in Airtable whenever I clap for a medium article or archive a pocket item.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/2020-03-17-airtable1.png&quot; alt=&quot;Airtable Screenshot&quot;&gt;
&lt;img src=&quot;/uploads/2020-03-17-airtable2.png&quot; alt=&quot;Airtable Screenshot&quot;&gt;&lt;/p&gt;
&lt;p&gt;Although this means I’m dependant on Airtable for this part of my website, I’m okay with that because it’s not a core part of my site: if airtable goes down or kill my account then 🤷‍♂️. The advantages well outweigh the overhead of managing my own server and database. Also…&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It’s easy to pipe data into Airtable from all sorts of places.&lt;/li&gt;
&lt;li&gt;It’s easy to edit data in airtable, especially because I use it a bunch anyway.&lt;/li&gt;
&lt;li&gt;It has a very nice API.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There is one problem, though. For my javascript to access this data it needs my Airtable API key. I can’t just bung that in my code because then everyone would have it. This is something Netlify’s &lt;a href=&quot;https://www.netlify.com/products/functions/&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;lambda functions&lt;/a&gt; are great at: they can act as an intermediate layer between my client-side javascript and the Airtable API.&lt;/p&gt;
&lt;p&gt;Netlify also makes a lot of sense for hosting: it has some bells and whistles Github Pages lacks.&lt;/p&gt;
&lt;p&gt;So here’s where we’re at so far…&lt;/p&gt;
&lt;h4 id=&quot;core-stuff&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#core-stuff&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Core Stuff&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Just HTML, CSS and Markdown.&lt;/li&gt;
&lt;li&gt;Jekyll (with a couple of plugins).&lt;/li&gt;
&lt;li&gt;Netlify for hosting.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;reading-list-stuff&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#reading-list-stuff&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Reading List Stuff&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Airtable - data store.&lt;/li&gt;
&lt;li&gt;Netlify Functions - accessing Airtable.&lt;/li&gt;
&lt;li&gt;IFTTT - piping stuff into Airtable from elsewhere.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;what-about-the-writing-experience&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#what-about-the-writing-experience&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;What about the writing experience?&lt;/h2&gt;
&lt;p&gt;For the most part, I’m happy to write locally in &lt;a href=&quot;https://ia.net/writer&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;iA Writer&lt;/a&gt; or VSCode. For writing on-the-go, &lt;a href=&quot;https://forestry.io/&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Forestry&lt;/a&gt; seems like the best option. I’d dearly love to find a git-based-jekyll-compatible editor that works like Ghost or Medium, but that can wait.&lt;/p&gt;
&lt;p&gt;With these decisions made, it took a surprisingly small amount of time to get all this wired up. Less than two hours. That’s the value of simplicity, I suppose.&lt;/p&gt;</content:encoded></item><item><title>Business Process &amp; Tooling</title><link>https://danny.is/writing/2020-03-05-business-process-tooling/</link><guid isPermaLink="true">https://danny.is/writing/2020-03-05-business-process-tooling/</guid><pubDate>Thu, 05 Mar 2020 00:00:00 GMT</pubDate><content:encoded/></item><item><title>Little Thing — Mocking External Services on Ruby</title><link>https://danny.is/writing/2020-03-04-little-thing-mocking-external-services-on-ruby/</link><guid isPermaLink="true">https://danny.is/writing/2020-03-04-little-thing-mocking-external-services-on-ruby/</guid><pubDate>Wed, 04 Mar 2020 00:00:00 GMT</pubDate><content:encoded/></item><item><title>Breaking Down Problems: It’s hard when you’re learning to code</title><link>https://danny.is/writing/2018-11-14-breaking-down-problems-its-hard-when-you-re-learning-to-code/</link><guid isPermaLink="true">https://danny.is/writing/2018-11-14-breaking-down-problems-its-hard-when-you-re-learning-to-code/</guid><pubDate>Wed, 14 Nov 2018 00:00:00 GMT</pubDate><content:encoded/></item><item><title>Little Thing — Value Objects in Ruby</title><link>https://danny.is/writing/2018-11-05-little-thing-value-objects-in-ruby/</link><guid isPermaLink="true">https://danny.is/writing/2018-11-05-little-thing-value-objects-in-ruby/</guid><pubDate>Mon, 05 Nov 2018 00:00:00 GMT</pubDate><content:encoded/></item><item><title>Little Thing #2 — Speeding up ZSH</title><link>https://danny.is/writing/2018-08-09-little-thing-2-speeding-up-zsh/</link><guid isPermaLink="true">https://danny.is/writing/2018-08-09-little-thing-2-speeding-up-zsh/</guid><pubDate>Thu, 09 Aug 2018 00:00:00 GMT</pubDate><content:encoded/></item><item><title>Little Thing #1 — How do RSpec Matchers Work?</title><link>https://danny.is/writing/2018-04-12-little-thing-1-how-do-rspec-matchers-work/</link><guid isPermaLink="true">https://danny.is/writing/2018-04-12-little-thing-1-how-do-rspec-matchers-work/</guid><pubDate>Thu, 12 Apr 2018 00:00:00 GMT</pubDate><content:encoded/></item><item><title>Little Things</title><link>https://danny.is/writing/2018-04-02-little-things/</link><guid isPermaLink="true">https://danny.is/writing/2018-04-02-little-things/</guid><pubDate>Mon, 02 Apr 2018 00:00:00 GMT</pubDate><content:encoded/></item><item><title>Synchronising Git Merges with Slack</title><link>https://danny.is/writing/2017-12-19-synchronising-git-merges-with-slack/</link><guid isPermaLink="true">https://danny.is/writing/2017-12-19-synchronising-git-merges-with-slack/</guid><pubDate>Tue, 19 Dec 2017 00:00:00 GMT</pubDate><content:encoded/></item><item><title>The Definition of Done: What does “done” actually mean?</title><link>https://danny.is/writing/2017-12-19-the-definition-of-done-what-does-done-actually-mean/</link><guid isPermaLink="true">https://danny.is/writing/2017-12-19-the-definition-of-done-what-does-done-actually-mean/</guid><pubDate>Tue, 19 Dec 2017 00:00:00 GMT</pubDate><content:encoded/></item><item><title>Add Starred Slack Messages to Things 3</title><link>https://danny.is/writing/2017-11-26-add-starred-slack-messages-to-things-3/</link><guid isPermaLink="true">https://danny.is/writing/2017-11-26-add-starred-slack-messages-to-things-3/</guid><pubDate>Sun, 26 Nov 2017 00:00:00 GMT</pubDate><content:encoded/></item><item><title>Where are the good Mobile Networks?</title><link>https://danny.is/writing/2017-06-19-where-are-the-good-mobile-networks/</link><guid isPermaLink="true">https://danny.is/writing/2017-06-19-where-are-the-good-mobile-networks/</guid><pubDate>Mon, 19 Jun 2017 00:00:00 GMT</pubDate><content:encoded/></item><item><title>The Definition of Done: What does &quot;done&quot; actually mean?</title><link>https://danny.is/writing/definition-of-done/</link><guid isPermaLink="true">https://danny.is/writing/definition-of-done/</guid><pubDate>Mon, 19 Jun 2017 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Scrum defines the &lt;strong&gt;definition of done&lt;/strong&gt; in pretty simple terms: it’s the acceptance criteria that are common to every single user story. For scrum teams, it’s really important to have a solid definition of what “done” means. They work in sprints, and need some way of deciding whether a user story is actually finished. It’s no good ending a sprint with a user story that meets all its acceptance criteria, but had no code review, hasn’t been tested and isn’t deployable. Such a story is clearly not done. Scrum teams solve this by strictly defining “done”. In this case, in addition to meeting the acceptance criteria, the story must also:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Have had a code review.&lt;/li&gt;
&lt;li&gt;Have been tested.&lt;/li&gt;
&lt;li&gt;Be immediately deployable.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If this isn’t the case at the end of the sprint then it isn’t done - we can’t count it’s story points towards the sprint velocity and it needs to go on the backlog for the next sprint planning session.&lt;/p&gt;
&lt;h2 id=&quot;what-does-done-actually-meanthough&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#what-does-done-actually-meanthough&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;What does “done” actually mean, though?&lt;/h2&gt;
&lt;p&gt;Is a new feature “done” when it’s in production and being used by customers? It might be. Equally, it might not. Have we published the changelog? Have we emailed our customers to tell them about the feature?&lt;/p&gt;
&lt;p&gt;When is a technical improvement or refactoring “done”? We certainly don’t want to email our customers about it, and we probably don’t want to add it to the changelog.&lt;/p&gt;
&lt;p&gt;The definition of “done” depends on the task.&lt;/p&gt;
&lt;p&gt;Some teams get around this problem by having multiple definitions of “done” - one for bugfixes, another for features, another for technical tasks, and so on.&lt;/p&gt;
&lt;p&gt;At &lt;a href=&quot;http://charliehr.com/&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;CharlieHR&lt;/a&gt;, this seemed overly complex. We don’t use scrum, and we don’t work in iterations. But we still need a way to remind ourselves of the stuff that should be done before a task is considered finished. So we invented a checklist.&lt;/p&gt;
&lt;h2 id=&quot;our-dod-atcharlie&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#our-dod-atcharlie&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Our DoD at Charlie&lt;/h2&gt;
&lt;p&gt;We use two definitions. The first is &lt;strong&gt;ready to merge&lt;/strong&gt;. Everything in this checklist needs to be ticked off before the pull request is merged to the &lt;code&gt;master&lt;/code&gt; branch. The second is &lt;strong&gt;actually done&lt;/strong&gt;. Everything in this checklist must be ticked off before the card is moved to the Done column on our task boards.&lt;/p&gt;
&lt;p&gt;It’s worth noting that these rules apply to &lt;em&gt;every single work item&lt;/em&gt; that goes through our task boards, so long as it involves code. Whether it’s a large user story with multiple dependencies or a tiny bugfix, the person doing the work is expected to run through these checklists.&lt;/p&gt;
&lt;p&gt;That doesn’t mean that everything on the checklists has to be ticked off for every work item, though - a tiny technical improvement is unlikely to need a marketing email written about it, for example. It does mean that everything in the checklist must be &lt;strong&gt;considered&lt;/strong&gt; for every work item. We trust our engineers to use their judgement.&lt;/p&gt;
&lt;p&gt;While you’re reading the DoD below, bear in mind…&lt;/p&gt;
&lt;ul class=&quot;long-list-items&quot;&gt;
&lt;li&gt;We use Trello for our task boards. Most teams have columns for &lt;strong&gt;backlog&lt;/strong&gt;, &lt;strong&gt;next up&lt;/strong&gt;, &lt;strong&gt;in progress&lt;/strong&gt; and &lt;strong&gt;done&lt;/strong&gt;. New features and user stories are represented by trello cards on a team backlog.&lt;/li&gt;
&lt;li&gt;Technical improvements and exceptions begin life as GitHub issues. These get a trello card on the backlog when they are assigned to or picked up by a team. Bugs live in &lt;a href=&quot;http://sifterapp.com/&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Sifter&lt;/a&gt;, and get a trello card when they’re assigned to a team.&lt;/li&gt;
&lt;li&gt;The order in which the items below are considered is irrelevant, so long as they have all been considered.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I’ve made notes in italics, since some of the items need a bit of explanation.&lt;/p&gt;
&lt;h2 id=&quot;checklist-1-ready-tomerge&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#checklist-1-ready-tomerge&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Checklist 1: Ready to Merge&lt;/h2&gt;
&lt;ul class=&quot;long-list-items&quot;&gt;
&lt;li&gt;&lt;strong&gt;Kickoff done and requirements clear. Kickoff Document stored on Drive.&lt;/strong&gt; This is where we define our acceptance criteria and the scope of a new feature. Most non-trivial user stories require this, and the kickoff for an epic may spawn multiple, smaller, inter-dependant user stories. Bugfixes don’t normally need a kickoff: it’s down to the product manager and engineers to decide whether a work item needs one. The kickoff document is just the record of the discussion, and contains sufficient acceptance criteria to get the thing out.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Implementation Plan written and reviewed.&lt;/strong&gt; This is something we’re trying out. For non-trivial work items, engineers discuss and plan the technical solution. This usually involves whiteboarding and scribbling on bits of paper. The implementation plan is a summary of that thinking and is available for engineers from other teams to review. We’re hoping this will help catch architectural and system design problems early. For technical improvements, this discussion has usually happened on the associated github issue already.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;DPIA Form Completed.&lt;/strong&gt; Do we need to do a Data Protection Impact Assessment?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Card on Trello, properly labelled, sized and PR/Issue linked (mandatory).&lt;/strong&gt; Before a trello card is picked up it must be labeled, have a T-Shirt size and have any associated stuff (kickoff doc, implementation plan, github issue, sifter issue etc) attached to it. Once a pull request is open, this (or these) should be attached too.&lt;/li&gt;
&lt;li&gt;P&lt;strong&gt;ull Request open and properly labelled (mandatory).&lt;/strong&gt; We open a PR after the first commit to a branch. Early comments on the PR save time and help share knowledge between teams.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Acceptance criteria met. Obviously.&lt;/strong&gt; If changes to the requirements have been agreed with the product manager, have they been noted on the kickoff document or trello card?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Unit tests written.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Functional specs written.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Documentation folder reviewed for any changes/additions.&lt;/strong&gt; We have a directory containing markdown files that describe the design patterns and conventions we use.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Environment variables documented, added to secrets manager and present in staging &amp;#x26; production environments.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Analytics considered.&lt;/strong&gt; Do we need to track user behaviour, and how should that be reported to our analytics tools. For larger work items, this is usually specified in the the kickoff doc.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;“What’s New” section updated.&lt;/strong&gt; If this is a new feature, we may want to tell our users about it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;l18n reviewed.&lt;/strong&gt; All our copy (including microcopy) should live in &lt;a href=&quot;https://guides.rubyonrails.org/i18n.html&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;locale files&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Security &amp;#x26; Data Protection Review (mandatory).&lt;/strong&gt; We take security seriously. Have we made a deliberate and methodical check that this doesn’t introduce any obvious security or data protection issues. This is particularly important for small bugfixes, since they may not have had detailed planning.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Code Review from at least one other (mandatory).&lt;/strong&gt; We strictly enforce this with our GitHub settings.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;https://codeclimate.com/&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;CodeClimate&lt;/a&gt; clear of errors.&lt;/strong&gt; As well as tracking our test coverage, we run static analysis tools like rubocop and ESLint against out changes. We’re still tweaking the rules for these tools to suit our in-house style.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Feature Branch green on CI (mandatory).&lt;/strong&gt; We also enforce this. You cannot merge to master with a red build on your feature branch.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;checklist-2-actuallydone&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#checklist-2-actuallydone&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Checklist 2: Actually Done&lt;/h2&gt;
&lt;ul class=&quot;long-list-items&quot;&gt;
&lt;li&gt;&lt;strong&gt;Merged to master and feature branch deleted (mandatory).&lt;/strong&gt; The master branch is automatically deployed to our staging environment. &lt;a href=&quot;https://medium.com/@dannysmith/synchronising-git-merges-with-slack-d905f7cbd55c&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;I wrote about our merge process earlier&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related GitHub Issues closed or updated.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sifter, Appsignal, and #tech-support issues closed 🏁.&lt;/strong&gt; We have a slack channel where people can raise technical issues. If a work item resolves or relates to one of these, it should be marked. This mostly applies to tiny bugfixes. Resolved bugs and exceptions should be closed in Sifter and Appsignal, respectively.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Manually tested on staging environment (mandatory).&lt;/strong&gt; We don’t have dedicated QA people, so engineers and product managers conduct acceptance and exploratory tests. For work items that carry significant business or technical risk, we’ll draft in people from across the company to help.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Deployed to production with no obvious errors/exceptions (mandatory).&lt;/strong&gt; Once a PR is deployed, we expect our engineers to keep an eye on the slack channel that shows our exceptions. If the deploy causes a flurry of them, it should either be rolled back and fixed or they should be addressed in a new PR before the work item can be considered done.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Release email sent.&lt;/strong&gt; We send a company-wide email for all non-trivial releases.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Marketing document updated.&lt;/strong&gt; If the work item is a new feature or important bugfix, it’s recorded in a spreadsheet. The marketing team refer to this when sending updates to our users.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Usage metrics checked/set up.&lt;/strong&gt; Have we checked that data is coming through correctly? Do we need to update any formulas or one of our &lt;a href=&quot;https://www.geckoboard.com/&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Geckoboard&lt;/a&gt; dashboards?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Help pages updated.&lt;/strong&gt; If we’ve added a feature, changed the way something works or updated the UI, we might need to update our user guides, help documentation and canned responses in intercom.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;FINALLY, card moved to “done” on trello (mandatory).&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;mandatory-items&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#mandatory-items&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Mandatory Items&lt;/h2&gt;
&lt;p&gt;You’ll notice that some of the items are marked &lt;em&gt;mandatory&lt;/em&gt;. &lt;strong&gt;Those must be done for every single work item. No exceptions.&lt;/strong&gt; For a scrum purist, these are the only things that should appear in a Definition of Done. For us (right now), they are probably the least useful items on the list - they’re all important enough that we’d remember to do them even if we didn’t have a checklist!&lt;/p&gt;
&lt;p&gt;At the moment, we’re deliberately keeping our mandatory items to a minimum, though we have discussed making more stuff mandatory. As we continue to evolve our process, I expect we’ll add items to support our current engineering goals. If we were focussed on improving our unit test coverage, we might include an item that says &lt;em&gt;“all new models and &lt;abbr title=&quot;Plain Old Ruby Object&quot;&gt;PORO&lt;/abbr&gt;s must have an associated unit test”&lt;/em&gt;. If we were focussed on improving the quality of our codebase, we might insist that “every pull request must improve the CodeClimate quality rating”. We might even decide to &lt;a href=&quot;https://medium.com/rootpath/delivering-business-value-with-kanban-and-validated-learning-55749daffecc&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;make proof of business value a prerequisite&lt;/a&gt; for “done”.&lt;/p&gt;
&lt;p&gt;Currently though, we are focussed on building an awesome product, and while most pull requests include unit tests and quality improvements, &lt;strong&gt;it doesn’t make sense to &lt;em&gt;mandate&lt;/em&gt; that just now.&lt;/strong&gt; Our “Definition of Done” is designed to help us work better and faster, and will change and evolve alongside our business goals.&lt;/p&gt;</content:encoded></item><item><title>Six awesome services I discovered last year</title><link>https://danny.is/writing/2017-05-18-six-awesome-services-i-discovered-last-year/</link><guid isPermaLink="true">https://danny.is/writing/2017-05-18-six-awesome-services-i-discovered-last-year/</guid><pubDate>Thu, 18 May 2017 00:00:00 GMT</pubDate><content:encoded/></item><item><title>DigitalOcean, DNSimple and Terraform: A very short introduction.</title><link>https://danny.is/writing/2016-10-24-digitalocean-dnsimple-and-terraform-a-very-short-introduction/</link><guid isPermaLink="true">https://danny.is/writing/2016-10-24-digitalocean-dnsimple-and-terraform-a-very-short-introduction/</guid><pubDate>Mon, 24 Oct 2016 00:00:00 GMT</pubDate><content:encoded/></item><item><title>Agile Adoption Patterns</title><link>https://danny.is/writing/2016-06-30-agile-adoption-patterns/</link><guid isPermaLink="true">https://danny.is/writing/2016-06-30-agile-adoption-patterns/</guid><pubDate>Thu, 30 Jun 2016 00:00:00 GMT</pubDate><content:encoded/></item><item><title>Good Slide Design</title><link>https://danny.is/writing/2016-04-23-good-slide-design/</link><guid isPermaLink="true">https://danny.is/writing/2016-04-23-good-slide-design/</guid><pubDate>Sat, 23 Apr 2016 00:00:00 GMT</pubDate><content:encoded/></item><item><title>Slack for Enterprise</title><link>https://danny.is/writing/2016-03-10-slack-for-enterprise/</link><guid isPermaLink="true">https://danny.is/writing/2016-03-10-slack-for-enterprise/</guid><pubDate>Thu, 10 Mar 2016 00:00:00 GMT</pubDate><content:encoded/></item><item><title>A Standard Software Toolset for Business?</title><link>https://danny.is/writing/2016-03-06-a-standard-software-toolset-for-business/</link><guid isPermaLink="true">https://danny.is/writing/2016-03-06-a-standard-software-toolset-for-business/</guid><pubDate>Sun, 06 Mar 2016 00:00:00 GMT</pubDate><content:encoded/></item><item><title>Finding a Good Colour Palette through Exploration</title><link>https://danny.is/writing/2016-03-02-finding-a-good-colour-palette-through-exploration/</link><guid isPermaLink="true">https://danny.is/writing/2016-03-02-finding-a-good-colour-palette-through-exploration/</guid><pubDate>Wed, 02 Mar 2016 00:00:00 GMT</pubDate><content:encoded/></item><item><title>Why do I teach?</title><link>https://danny.is/writing/2016-02-25-why-do-i-teach/</link><guid isPermaLink="true">https://danny.is/writing/2016-02-25-why-do-i-teach/</guid><pubDate>Thu, 25 Feb 2016 00:00:00 GMT</pubDate><content:encoded/></item><item><title>Automating and Outsourcing</title><link>https://danny.is/writing/2016-02-20-automating-and-outsourcing/</link><guid isPermaLink="true">https://danny.is/writing/2016-02-20-automating-and-outsourcing/</guid><pubDate>Sat, 20 Feb 2016 00:00:00 GMT</pubDate><content:encoded/></item><item><title>Collaborating on a Project</title><link>https://danny.is/writing/2016-01-04-collaborating-on-a-project/</link><guid isPermaLink="true">https://danny.is/writing/2016-01-04-collaborating-on-a-project/</guid><pubDate>Mon, 04 Jan 2016 00:00:00 GMT</pubDate><content:encoded/></item><item><title>Effective Meetings</title><link>https://danny.is/writing/2015-12-18-effective-meetings/</link><guid isPermaLink="true">https://danny.is/writing/2015-12-18-effective-meetings/</guid><pubDate>Fri, 18 Dec 2015 00:00:00 GMT</pubDate><content:encoded/></item><item><title>My Students have Forgotten How to be Curious</title><link>https://danny.is/writing/2015-11-03-my-students-have-forgotten-how-to-be-curious/</link><guid isPermaLink="true">https://danny.is/writing/2015-11-03-my-students-have-forgotten-how-to-be-curious/</guid><pubDate>Tue, 03 Nov 2015 00:00:00 GMT</pubDate><content:encoded/></item><item><title>Evaluating Training and Learning</title><link>https://danny.is/writing/2015-10-26-evaluating-training-and-learning/</link><guid isPermaLink="true">https://danny.is/writing/2015-10-26-evaluating-training-and-learning/</guid><pubDate>Mon, 26 Oct 2015 00:00:00 GMT</pubDate><content:encoded/></item><item><title>Getting Things Done</title><link>https://danny.is/writing/2015-08-29-getting-things-done/</link><guid isPermaLink="true">https://danny.is/writing/2015-08-29-getting-things-done/</guid><pubDate>Sat, 29 Aug 2015 00:00:00 GMT</pubDate><content:encoded/></item><item><title>The Psychoactive Substances Bill 2015</title><link>https://danny.is/writing/2015-07-25-the-psychoactive-substances-bill-2015/</link><guid isPermaLink="true">https://danny.is/writing/2015-07-25-the-psychoactive-substances-bill-2015/</guid><pubDate>Sat, 25 Jul 2015 00:00:00 GMT</pubDate><content:encoded/></item><item><title>The Changing Face of Software Testing</title><link>https://danny.is/writing/2015-07-22-the-changing-face-of-software-testing/</link><guid isPermaLink="true">https://danny.is/writing/2015-07-22-the-changing-face-of-software-testing/</guid><pubDate>Wed, 22 Jul 2015 00:00:00 GMT</pubDate><content:encoded/></item><item><title>Delivering Business Value with Kanban and Validated Learning</title><link>https://danny.is/writing/2015-03-17-delivering-business-value-with-kanban-and-validated-learning/</link><guid isPermaLink="true">https://danny.is/writing/2015-03-17-delivering-business-value-with-kanban-and-validated-learning/</guid><pubDate>Tue, 17 Mar 2015 00:00:00 GMT</pubDate><content:encoded/></item><item><title>Blogging with Evernote and Ruby</title><link>https://danny.is/writing/2015-02-26-blogging-with-evernote-and-ruby/</link><guid isPermaLink="true">https://danny.is/writing/2015-02-26-blogging-with-evernote-and-ruby/</guid><pubDate>Thu, 26 Feb 2015 00:00:00 GMT</pubDate><content:encoded/></item><item><title>Replacing Bash with ZSH on OSX</title><link>https://danny.is/writing/2015-02-26-replacing-bash-with-zsh-on-osx/</link><guid isPermaLink="true">https://danny.is/writing/2015-02-26-replacing-bash-with-zsh-on-osx/</guid><pubDate>Thu, 26 Feb 2015 00:00:00 GMT</pubDate><content:encoded/></item><item><title>Agile Feedback Loops</title><link>https://danny.is/writing/2015-02-24-agile-feedback-loops-by-danny-smith/</link><guid isPermaLink="true">https://danny.is/writing/2015-02-24-agile-feedback-loops-by-danny-smith/</guid><pubDate>Tue, 24 Feb 2015 00:00:00 GMT</pubDate><content:encoded/></item><item><title>Writing Testable Code</title><link>https://danny.is/writing/2015-02-24-writing-testable-code/</link><guid isPermaLink="true">https://danny.is/writing/2015-02-24-writing-testable-code/</guid><pubDate>Tue, 24 Feb 2015 00:00:00 GMT</pubDate><content:encoded/></item><item><title>On Sass and Other CSS Preprocessors</title><link>https://danny.is/writing/2014-05-04-on-sass-and-other-css-preprocessors/</link><guid isPermaLink="true">https://danny.is/writing/2014-05-04-on-sass-and-other-css-preprocessors/</guid><pubDate>Sun, 04 May 2014 00:00:00 GMT</pubDate><content:encoded/></item><item><title>Controlling the Rag with Redcarpet</title><link>https://danny.is/writing/controlling-the-rag-with-redcarpet/</link><guid isPermaLink="true">https://danny.is/writing/controlling-the-rag-with-redcarpet/</guid><description>Improving web typography by preventing orphans and controlling line breaks with custom Redcarpet renderer</description><pubDate>Sun, 04 May 2014 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Good typography is about the accumulation of small improvements. As Mark Boulton puts it:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“Good typographic design — on the web, in print; anywhere, in fact — relies on small, measurable improvements across an entire body of work”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I’ve implemented several typographic improvements in my Ruby-based website using a custom Redcarpet renderer that automatically fixes common typography issues.&lt;/p&gt;
&lt;h2 id=&quot;the-problems-were-solving&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#the-problems-were-solving&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;The Problems We’re Solving&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Orphans&lt;/strong&gt; - Single words hanging alone on the last line of a paragraph&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Short phrase breaks&lt;/strong&gt; - Emphasized phrases breaking across lines&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Awkward line breaks&lt;/strong&gt; - Lines breaking after prepositions, dashes, or short words&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;custom-redcarpet-renderer&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#custom-redcarpet-renderer&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Custom Redcarpet Renderer&lt;/h2&gt;
&lt;p&gt;Here’s how I implemented these fixes:&lt;/p&gt;
&lt;h3 id=&quot;preventing-orphans&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#preventing-orphans&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Preventing Orphans&lt;/h3&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;/_astro/ec.7syh9.css&quot;&gt;&lt;script type=&quot;module&quot; src=&quot;/_astro/ec.0vx5m.js&quot;&gt;&lt;/script&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;ruby&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2&quot;&gt;paragraph&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#FFA344;--0fs:italic&quot;&gt;text&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#9FA4A7&quot;&gt;# Replace the space between the last two words with a non-breaking space&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;text.&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2&quot;&gt;gsub!&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;\s&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;+(&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;\S&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;+)&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;\s&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;*$/&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;&amp;#x26;nbsp;\1&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;&amp;#x3C;p&gt;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;#{&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;text&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;&amp;#x3C;/p&gt;&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;end&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;def paragraph(text)  # Replace the space between the last two words with a non-breaking space  text.gsub!(/\s+(\S+)\s*$/, &amp;#x27;&amp;#x26;nbsp;\1&amp;#x27;)  &amp;#x22;&lt;p&gt;#{text}&lt;/p&gt;&amp;#x22;end&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h3 id=&quot;keeping-short-phrases-together&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#keeping-short-phrases-together&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Keeping Short Phrases Together&lt;/h3&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;ruby&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2&quot;&gt;do_not_break_string&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#FFA344;--0fs:italic&quot;&gt;text&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#9FA4A7&quot;&gt;# Keep short emphasized phrases together&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;text.&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2&quot;&gt;gsub!&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;/&amp;#x3C;(em|strong)&gt;([^&amp;#x3C;]{1,15})&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;\/&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;(em|strong)&gt;/&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;do&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; |match|&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;match.&lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;gsub&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;&amp;#x26;nbsp;&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;end&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;text&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;end&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;def do_not_break_string(text)  # Keep short emphasized phrases together  text.gsub!(/&lt;(em|strong)&gt;([^&lt;]{1,15})&lt;\/(em|strong)&gt;/) do |match|    match.gsub(&amp;#x27; &amp;#x27;, &amp;#x27;&amp;#x26;nbsp;&amp;#x27;)  end  textend&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h3 id=&quot;preventing-breaks-after-short-words&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#preventing-breaks-after-short-words&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Preventing Breaks After Short Words&lt;/h3&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;ruby&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2&quot;&gt;avoid_breaking_after_short_words&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#FFA344;--0fs:italic&quot;&gt;text&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#9FA4A7&quot;&gt;# Complex regex to identify words that shouldn&apos;t be broken&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;text.&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2&quot;&gt;gsub!&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;/(&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;\s&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;)(a|an|and|as|at|but|by|en|for|if|in|of|on|or|the|to|vs?&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;\.&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;?|via)(&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;\s&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;)/i&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;do&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; |match|&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;#{&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;$1&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;}#{&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;$2&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;&amp;#x26;nbsp;&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;end&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;text&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;end&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;def avoid_breaking_after_short_words(text)  # Complex regex to identify words that shouldn&amp;#x27;t be broken  text.gsub!(/(\s)(a|an|and|as|at|but|by|en|for|if|in|of|on|or|the|to|vs?\.?|via)(\s)/i) do |match|    &amp;#x22;#{$1}#{$2}&amp;#x26;nbsp;&amp;#x22;  end  textend&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h2 id=&quot;the-results&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#the-results&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;The Results&lt;/h2&gt;
&lt;p&gt;These small improvements compound to create noticeably better text rendering:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Fewer orphans&lt;/strong&gt; - Paragraphs end more naturally&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Better emphasis&lt;/strong&gt; - Short emphasized phrases stay together&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Smoother reading&lt;/strong&gt; - Fewer awkward line breaks interrupt the flow&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;implementation-details&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#implementation-details&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Implementation Details&lt;/h2&gt;
&lt;p&gt;The custom renderer processes Markdown content before it’s converted to HTML, applying these typographic rules automatically. This means I can write naturally in Markdown while getting professionally typeset results.&lt;/p&gt;
&lt;h2 id=&quot;typography-principles&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#typography-principles&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Typography Principles&lt;/h2&gt;
&lt;p&gt;The key insight is that good typography happens at the micro level. Each individual improvement might seem small, but together they create text that’s:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;More readable&lt;/strong&gt; - Fewer distractions from poor line breaks&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;More professional&lt;/strong&gt; - Attention to typographic detail shows craftsmanship&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;More accessible&lt;/strong&gt; - Better text flow helps all readers&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;conclusion&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#conclusion&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Controlling the rag (the uneven right edge of left-aligned text) and preventing orphans are foundational typography skills. By automating these improvements in my Redcarpet renderer, I ensure consistently good typography across all my content.&lt;/p&gt;
&lt;p&gt;These techniques work especially well on the web, where we have tools like non-breaking spaces to fine-tune text rendering without sacrificing the flexibility of HTML and CSS.&lt;/p&gt;</content:encoded></item><item><title>A Pretty Readability Archive with Ruby and CSS</title><link>https://danny.is/writing/a-pretty-readability-archive-with-ruby-and-css/</link><guid isPermaLink="true">https://danny.is/writing/a-pretty-readability-archive-with-ruby-and-css/</guid><description>Building a visual bookmarks display using the Readability API, Ruby, and CSS 3D transforms</description><pubDate>Sun, 20 Apr 2014 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;I’ve always found it interesting to see what other people read. Not just the things that they share on twitter, but the articles they read on a daily basis.&lt;/p&gt;
&lt;p&gt;I decided to build a web application to display my Readability bookmarks using Ruby, Sinatra, and CSS transitions to create an interactive card-based layout.&lt;/p&gt;
&lt;h2 id=&quot;the-technical-implementation&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#the-technical-implementation&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;The Technical Implementation&lt;/h2&gt;
&lt;p&gt;The application follows these key steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Environment variable setup&lt;/strong&gt; - Secure authentication credential storage&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Readit gem integration&lt;/strong&gt; - Ruby library for the Readability API&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;XAuth authentication&lt;/strong&gt; - Secure API authentication&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Bookmark fetching&lt;/strong&gt; - Retrieving archived articles&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Interactive card display&lt;/strong&gt; - CSS 3D transforms for flippable cards&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;api-integration&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#api-integration&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;API Integration&lt;/h2&gt;
&lt;p&gt;Using the Readit gem, I configured the Readability API connection:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;/_astro/ec.7syh9.css&quot;&gt;&lt;script type=&quot;module&quot; src=&quot;/_astro/ec.0vx5m.js&quot;&gt;&lt;/script&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;ruby&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#9FA4A7&quot;&gt;# Configure the Readit API&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6AAAD1;--0fs:italic&quot;&gt;Readit&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2&quot;&gt;configure&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;do&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; |config|&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;config.&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2&quot;&gt;consumer_key&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;ENV&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;READABILITY_KEY&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;config.&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2&quot;&gt;consumer_secret&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;ENV&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;READABILITY_SECRET&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;end&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#9FA4A7&quot;&gt;# Authenticate via XAuth&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;client &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1;--0fs:italic&quot;&gt;Readit&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1;--0fs:italic&quot;&gt;Client&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;(&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;oauth_token:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;ENV&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;READABILITY_TOKEN&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;oauth_token_secret:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;ENV&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;READABILITY_TOKEN_SECRET&lt;/span&gt;&lt;span style=&quot;--0:#FBF3DB&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#9FA4A7&quot;&gt;# Fetch archived bookmarks&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;bookmarks &lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; client.&lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2&quot;&gt;bookmarks&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;# Configure the Readit APIReadit.configure do |config|  config.consumer_key = ENV[&amp;#x27;READABILITY_KEY&amp;#x27;]  config.consumer_secret = ENV[&amp;#x27;READABILITY_SECRET&amp;#x27;]end# Authenticate via XAuthclient = Readit::Client.new(  oauth_token: ENV[&amp;#x27;READABILITY_TOKEN&amp;#x27;],  oauth_token_secret: ENV[&amp;#x27;READABILITY_TOKEN_SECRET&amp;#x27;])# Fetch archived bookmarksbookmarks = client.bookmarks&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h2 id=&quot;interactive-card-design&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#interactive-card-design&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Interactive Card Design&lt;/h2&gt;
&lt;p&gt;The CSS creates an engaging card-based layout where each bookmark has:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Front face&lt;/strong&gt; - Title and background image from the article&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Back face&lt;/strong&gt; - Article excerpt and metadata&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Flip animation&lt;/strong&gt; - Smooth 3D transform on hover&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The cards use CSS 3D transforms to create a flipping effect that reveals additional information about each article when you hover over them.&lt;/p&gt;
&lt;h2 id=&quot;key-features&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#key-features&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Key Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Responsive design&lt;/strong&gt; - Cards adapt to different screen sizes&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Visual appeal&lt;/strong&gt; - Each card shows the article’s featured image&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Rich metadata&lt;/strong&gt; - Article excerpts, publication dates, and sources&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Smooth animations&lt;/strong&gt; - CSS transitions for polished interactions&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;future-improvements&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#future-improvements&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Future Improvements&lt;/h2&gt;
&lt;p&gt;Potential enhancements I’m considering:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Infinite scrolling&lt;/strong&gt; - Load more bookmarks as you scroll&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Responsive grid&lt;/strong&gt; - Replace fixed-width layout with flexible grid&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Filtering&lt;/strong&gt; - Sort by date, source, or tags&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Search functionality&lt;/strong&gt; - Find specific articles quickly&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;reflection&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#reflection&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Reflection&lt;/h2&gt;
&lt;p&gt;This project combines API integration, responsive design, and interactive CSS to create something genuinely useful. It’s a great example of how modern web technologies can transform simple data into engaging experiences.&lt;/p&gt;
&lt;p&gt;The combination of Ruby for backend processing and CSS for frontend interactions creates a fast, visually appealing way to browse through saved articles.&lt;/p&gt;</content:encoded></item><item><title>From RVM to rbenv</title><link>https://danny.is/writing/rvm-to-rbenv/</link><guid isPermaLink="true">https://danny.is/writing/rvm-to-rbenv/</guid><description>Switching from RVM to rbenv for simpler Ruby version and gem management</description><pubDate>Tue, 08 Oct 2013 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;I recently switched from RVM (Ruby Version Manager) to rbenv for Ruby version and gem management. This isn’t so much of a ‘howto’, as a dump of my bash history for anyone looking to make a similar transition.&lt;/p&gt;
&lt;h2 id=&quot;why-i-left-rvm&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#why-i-left-rvm&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Why I Left RVM&lt;/h2&gt;
&lt;p&gt;RVM had several issues that frustrated me:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Complicated gem and Ruby version management&lt;/strong&gt; - The system felt overly complex&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Unclear storage locations&lt;/strong&gt; - I never knew where gems and Ruby versions were actually stored&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Confusing gemset commands&lt;/strong&gt; - The gemset system was hard to understand and manage&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;why-rbenv-is-better&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#why-rbenv-is-better&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Why rbenv is Better&lt;/h2&gt;
&lt;p&gt;rbenv offers several advantages:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Simpler to understand&lt;/strong&gt; - The system is more transparent&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Works well with Bundler&lt;/strong&gt; - Better integration with modern Ruby workflows&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Easier project-specific Ruby version management&lt;/strong&gt; - &lt;code&gt;.ruby-version&lt;/code&gt; files just work&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;the-migration-process&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#the-migration-process&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;The Migration Process&lt;/h2&gt;
&lt;p&gt;Here’s the process I followed to switch:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Completely remove RVM&lt;/strong&gt; - Clean out all RVM-related files and configurations&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Clean out old Ruby and gem installations&lt;/strong&gt; - Start fresh&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Install rbenv via Homebrew&lt;/strong&gt; - Use the package manager for easy installation&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Install desired Ruby versions&lt;/strong&gt; - Install 1.9.3 and 2.1.4 (the versions I needed)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Set up default gems&lt;/strong&gt; - Install commonly used gems&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Install rbenv plugins&lt;/strong&gt; - Add rbenv-bundler for better Bundler integration&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;the-result&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#the-result&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;The Result&lt;/h2&gt;
&lt;p&gt;The goal was to create “a decent local ruby environment that I actually understand.” rbenv delivers on this promise by being:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Transparent&lt;/strong&gt; - I can see exactly what’s happening&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Simple&lt;/strong&gt; - No complex gemset management&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reliable&lt;/strong&gt; - Works consistently across projects&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;key-commands&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#key-commands&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Key Commands&lt;/h2&gt;
&lt;p&gt;The most important rbenv commands I use daily:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;/_astro/ec.7syh9.css&quot;&gt;&lt;script type=&quot;module&quot; src=&quot;/_astro/ec.0vx5m.js&quot;&gt;&lt;/script&gt;&lt;figure class=&quot;frame is-terminal&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2&quot;&gt;rbenv&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;versions&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;--0:#9FA4A7&quot;&gt;# List installed Ruby versions&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2&quot;&gt;rbenv&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;global&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;2.1.4&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;--0:#9FA4A7&quot;&gt;# Set global Ruby version&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2&quot;&gt;rbenv&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;local&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;1.9.3&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;       &lt;/span&gt;&lt;span style=&quot;--0:#9FA4A7&quot;&gt;# Set local Ruby version for current directory&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2&quot;&gt;rbenv&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#FFDC49&quot;&gt;rehash&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;--0:#9FA4A7&quot;&gt;# Refresh rbenv shims&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;rbenv versions          # List installed Ruby versionsrbenv global 2.1.4      # Set global Ruby versionrbenv local 1.9.3       # Set local Ruby version for current directoryrbenv rehash            # Refresh rbenv shims&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;The switch from RVM to rbenv was one of the best development environment decisions I’ve made. If you’re frustrated with RVM’s complexity, rbenv is definitely worth considering.&lt;/p&gt;</content:encoded></item><item><title>New Job, New Website</title><link>https://danny.is/writing/new-job-new-website/</link><guid isPermaLink="true">https://danny.is/writing/new-job-new-website/</guid><description>Transitioning from designer to Ruby developer and building a custom Sinatra-based website</description><pubDate>Wed, 02 Oct 2013 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;I’ve recently transitioned from being a designer to a Ruby developer in London. As part of this change, I decided to build a completely custom website using Sinatra rather than relying on existing platforms.&lt;/p&gt;
&lt;h2 id=&quot;why-build-custom&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#why-build-custom&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Why Build Custom?&lt;/h2&gt;
&lt;p&gt;After trying various blogging platforms, I couldn’t find one that met my specific requirements:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Writing in Markdown&lt;/strong&gt; - I wanted to write everything in Markdown&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Full control over HTML and CSS&lt;/strong&gt; - Complete creative freedom&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Easy image management&lt;/strong&gt; - Simple way to include images&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Understanding all the code&lt;/strong&gt; - I wanted to know exactly how everything worked&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;the-technical-setup&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#the-technical-setup&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;The Technical Setup&lt;/h2&gt;
&lt;p&gt;The website is built using a custom Sinatra application with several key features:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Static assets compiled locally&lt;/strong&gt; - CSS and JavaScript are processed before deployment&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Custom Redcarpet renderer&lt;/strong&gt; - Markdown is parsed with custom formatting rules&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Special tag system&lt;/strong&gt; - Images and gists can be inserted using custom tags like &lt;code&gt;{{image: 1}}&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pygments syntax highlighting&lt;/strong&gt; - Code blocks are highlighted using Pygments.rb&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;deployment&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#deployment&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Deployment&lt;/h2&gt;
&lt;p&gt;The site is deployed to Heroku with New Relic monitoring to prevent the app from going to sleep. This ensures fast loading times even during periods of low traffic.&lt;/p&gt;
&lt;h2 id=&quot;custom-styling&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#custom-styling&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Custom Styling&lt;/h2&gt;
&lt;p&gt;I’ve implemented custom styling for all standard Markdown elements:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Lists&lt;/strong&gt; - Both ordered and unordered with custom styling&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Blockquotes&lt;/strong&gt; - Styled for emphasis and readability&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Code blocks&lt;/strong&gt; - Syntax highlighted with clean typography&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tables&lt;/strong&gt; - Responsive and well-formatted&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;reflection&quot;&gt;&lt;a aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; href=&quot;#reflection&quot;&gt;&lt;span class=&quot;icon icon-link&quot;&gt;&lt;/span&gt;&lt;/a&gt;Reflection&lt;/h2&gt;
&lt;p&gt;This project reflects my journey from designer to developer. Rather than using off-the-shelf solutions, I prefer building custom tools that give me complete creative and technical control. The site was quickly developed and deployed, proving that custom solutions don’t always require extensive development time.&lt;/p&gt;
&lt;p&gt;The key is understanding your exact requirements and building just what you need, nothing more.&lt;/p&gt;</content:encoded></item><item><title>MoD Email Subjects with AppleScript</title><link>https://danny.is/writing/mod-email-subject-lines-with-applescript-osx/</link><guid isPermaLink="true">https://danny.is/writing/mod-email-subject-lines-with-applescript-osx/</guid><description>Automating military email subject line formatting with AppleScript for Mac Mail</description><pubDate>Fri, 28 Jun 2013 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;The work I do with the RAF and Army requires me to send emails with the date and security classification included, like this: “20130628-The Subject-U”.&lt;/p&gt;
&lt;img src=&quot;/_astro/13-1-MoD-File-Names-Explained.B7B0rnYN_ZdBTlL.webp&quot; srcset=&quot;/_astro/13-1-MoD-File-Names-Explained.B7B0rnYN_ZdBTlL.webp 500w&quot; alt=&quot;MoD File Names Explained&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; sizes=&quot;(min-width: 500px) 500px, 100vw&quot; data-astro-image=&quot;constrained&quot; data-astro-image-fit=&quot;cover&quot; data-astro-image-pos=&quot;center&quot; width=&quot;500&quot; height=&quot;226&quot;&gt;
&lt;p&gt;I must do this at least 30 times a day, and earlier on I was that fed up with copy/pasting dates that I decided to write a script to do it for me. I did try this once before, but Mail.app’s API wasn’t very robust at the time and the action relied upon simulating keypresses which wasn’t exactly reliable.&lt;/p&gt;
&lt;p&gt;The following script adds the date and PM to the subject of the foremost Compose Mail Window. It’s a little smarter than my previous attempt too, in that it replaces the date if it’s already there and leaves the PM alone if it exists already.&lt;/p&gt;
&lt;script src=&quot;https://gist.github.com/dannysmith/5887954.js&quot;&gt;&lt;/script&gt;
&lt;p&gt;This one opens a reply to the selected message, with the “Re:” in the right place:&lt;/p&gt;
&lt;script src=&quot;https://gist.github.com/dannysmith/5888072.js&quot;&gt;&lt;/script&gt;
&lt;p&gt;Using Applescript is awkward to say the least - &lt;a href=&quot;http://www.russellbeattie.com/blog/fun-with-the-os-x-finder-and-applescript&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Russell Beattie&lt;/a&gt; puts it quite well:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Using AppleScript is like being tied down in a black leather gimp-suit at a dominatrix convention, and losing the safety word… The syntax is like Erlang and ancient Greek got somehow mixed together with Visual Basic, and was translated back into English by mentally-challenged ESL students&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I did try to make a plugin for Mail.app to add some buttons to the menubar, but after discovering how &lt;a href=&quot;http://eaganj.free.fr/weblog/?post/2009/07/14/Demystifying-Mail.app-Plugins-on-Leopard&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;difficult&lt;/a&gt; it is working with Mail.app’s undocumented API, I gave up and created a Service instead.&lt;/p&gt;
&lt;p&gt;Despite AppleScript’s quirks, it’s still the most reliable way to automate Mac applications, especially when you need to interact with specific UI elements like email compose windows.&lt;/p&gt;</content:encoded></item><item><title>What is Good Design?</title><link>https://danny.is/writing/what-is-good-design/</link><guid isPermaLink="true">https://danny.is/writing/what-is-good-design/</guid><description>Exploring good design principles through the lens of the UK Government Digital Service website</description><pubDate>Mon, 21 Jan 2013 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;The UK Government Digital Service (GDS) has created something special with &lt;a href=&quot;https://www.gov.uk/&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;gov.uk&lt;/a&gt;. Moving away from skeuomorphic design trends, they’ve focused on content-first, accessible design that makes government information truly usable.&lt;/p&gt;
&lt;p&gt;As John Gruber noted about skeuomorphic design:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“On retina displays… these techniques are revealed for what they truly are: an assortment of parlor tricks”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The GDS approach demonstrates that good design doesn’t need visual tricks. Instead, it comes from:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Content-focused layout&lt;/strong&gt; that prioritizes information over decoration&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Thoughtful typography&lt;/strong&gt; including their excellent adaptation of the Transport typeface&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Accessibility&lt;/strong&gt; ensuring government services work for everyone&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Flat design&lt;/strong&gt; that focuses on usability rather than visual effects&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Andy Budd’s observation rings true here:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“The best designers and developers rarely have more talent. They simply have more time.”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This echoes Teller’s insight about magic:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“Sometimes magic is just someone spending more time on something than anyone else might reasonably expect.”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The gov.uk website succeeds because the team invested time in getting the fundamentals right: clear typography, logical information architecture, and user-centered design principles.&lt;/p&gt;
&lt;p&gt;Good design, it turns out, is less about flashy effects and more about well-designed content, typography, and layout—combined with the time to experiment and refine until everything works seamlessly together.&lt;/p&gt;</content:encoded></item><item><title>A Simpler Responsive Grid</title><link>https://danny.is/writing/a-simpler-responsive-grid/</link><guid isPermaLink="true">https://danny.is/writing/a-simpler-responsive-grid/</guid><description>A simple percentage-based CSS grid system that makes responsive design math easy</description><pubDate>Tue, 05 Jun 2012 00:00:00 GMT</pubDate><content:encoded>&lt;img src=&quot;/_astro/12-1-Responsive-Grid.BHtdtGeE_2tUxbU.webp&quot; srcset=&quot;/_astro/12-1-Responsive-Grid.BHtdtGeE_2tUxbU.webp 500w&quot; alt=&quot;Grid System&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; sizes=&quot;(min-width: 500px) 500px, 100vw&quot; data-astro-image=&quot;constrained&quot; data-astro-image-fit=&quot;cover&quot; data-astro-image-pos=&quot;center&quot; width=&quot;500&quot; height=&quot;338&quot;&gt;
&lt;p&gt;After making use of various complicated CSS grid systems, I’ve been using a simple percentage-based grid for the last year or so. It’s based on a 1000 pixel wide container with 63 pixel columns and 20 pixel gutters. The outside gutters at the extreme left/right are 12 pixels to produce a nice round number.&lt;/p&gt;
&lt;p&gt;By using a 1000 pixel wide container, the maths is easy when using percentages. each column is 6.3%, gutters are 2% and so on…&lt;/p&gt;
&lt;p&gt;By setting a width on the container of 100% and a max-width of 1000 pixels, and thereafter using percentages for all widths, everything resizes nicely:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;/_astro/ec.7syh9.css&quot;/&gt;&lt;script type=&quot;module&quot; src=&quot;/_astro/ec.0vx5m.js&quot;&gt;&lt;/script&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;css&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;#container&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;margin&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;auto&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;max-width&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;1000&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;px&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;width&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;100&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;%&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;#my-box&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;width&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;14.6&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;%&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#9FA4A7&quot;&gt;/* Two columns wide - (2 * 6.3)+2 */&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;margin-left: &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;1.2&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;%&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#9FA4A7&quot;&gt;/* Covering the first two columns */&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;#container {    margin: 0 auto;    max-width: 1000px;    width: 100%;  }  #my-box {    width: 14.6% /* Two columns wide - (2 * 6.3)+2 */    margin-left: 1.2% /* Covering the first two columns */  }&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;I’ve knocked together a quick &lt;a href=&quot;http://dasmith.co.uk/files/examples/grid.html&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;example page&lt;/a&gt; (&lt;a href=&quot;https://gist.github.com/2875987&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;code&lt;/a&gt;) that shows the columns. One problem with percentage-based widths is that because of the box model, any borders or padding will be added onto outside of the box. Obviously this can be a drama if you’re using pixels to declare your borders and padding.&lt;/p&gt;
&lt;p&gt;The easy solution to this is the box-sizing property:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;css&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#5BB2A2;--0fs:italic&quot;&gt;#my-other-box&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;width&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;31.2&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;%&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#9FA4A7&quot;&gt;/* Four columns wide */&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;margin-left: &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;9.5&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;%&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#9FA4A7&quot;&gt;/* Covering columns 2 to 5 (1.2 + 6.3 + 2) */&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;box-sizing: &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;border-box&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#6AAAD1&quot;&gt;border&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;--0:#E981B9&quot;&gt;px&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;solid&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#B594E2&quot;&gt;red&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;--0:#9FA4A7&quot;&gt;/* will be rendered inside the box */&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#F6F3EA&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;#my-other-box {    width: 31.2% /* Four columns wide */    margin-left: 9.5% /* Covering columns 2 to 5 (1.2 + 6.3 + 2) */    box-sizing: border-box;    border: 2px solid red; /* will be rendered inside the box */  }&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Although this property isn’t supported in IE7 and below, it’s a useful way to control the box model and make responsive design easier.&lt;/p&gt;</content:encoded></item></channel></rss>