Search

Post types:
Categories:
🔖

CSS variables for React devs

Read Note

Josh breaks down why and how you can use CSS variables more easily in React, specifically using styled-components. Honestly it feels a little terrifying how much is needed just to get basic …

📖

Pass API Data to the Stylesheet with CSS Variables

Read Article

I keep running into the same problem: how to set a style attribute in the CMS and have that be dynamically rendered on the front-end, without relying on inline styles. Turns out it's a great use case for CSS variables!

🔖

CSS custom properties and the cascade

Read Note

CSS variables (aka CSS custom properties) do not have access to the cascade. That means they can't fall back to earlier rules, so if your variable is invalid, the browser will simply unset …

🔖

Var, let, and const, what's the difference

Read Note

var is globally scoped and hoisted, which can lead to unintended side effects. let is block-scoped and can never be redeclared within that scope – much harder to break, but need to be careful about …

🔖

Colour theme switcher

Read Note

Max has a pretty brilliant colour theme switcher on his website. I agree with him that "dark mode" is only the tip of the iceberg and with CSS variables we can now theme sites very easily. There are …

📖

Crafty Asset Management

Read Article

Migrating assets to a new CMS can be a complete pain, but working out which files go with each page or article on a website doesn't have to be a nightmare if you start with a solid foundation. For me, that means tightly coupling my folder structure on the server with my content structure on the website, a workflow that Craft is particularly nifty at automating.

📖

Editing Commit History in Git/GitHub

Read Article

I was recently given a new laptop at work (🥳), but failed to realise that my Git author details weren't syncing correctly with GitHub for almost a month... 🤦 Rather than simply accept those white squares, I decided to rewrite the repository history. The process turns out to be quite simple, but I still hit several snags so figured it could be useful to document my fixes and errors.

📖

Classy Microformats

Read Article

In which I begin by questioning why microformats are defined on the class attribute, instead of somewhere more bespoke, and end up concluding that I don't understand what microformats are actually for... and I'm not sure anyone else does, either.

📖

Adding Search with Algolia (Gatsby, Craft CMS - Part 1)

Read Article

Static sites don't make search functionality easy, but luckily there are some excellent services that do. I've been messing around with Algolia and finally have it working with Craft and Gatsby the way I want it... on the backend, at least.

📖

React Summit 2020 Notes

Read Article

Notes from the fully remote React Summit 2020 (or at least the talks I tuned in for). Lots covered, from static-site generators and the Jamstack through to React state management and accessibility. What a fun day!

🔖

@property

Read Note

Looks like CSS is getting extensibility built-in with a new @property element (works like @media – also looks like we're getting CSS.registerProperty() in JavaScript …

📖

Jamstack Conf 2020

Read Article

Notes from the 2020 Jamstack Conf. Some interesting dives in the Jamstack community and various applications of Jamstack technologies, with tweet threads as usual.

🔖

Understand JavaScript closures in minutes

Read Note

I always forget what closures are, even if I continue to use them. The article makes a case for considering closures as stateful functions which is quite neat. Basically, closures allow a …

📖

JSNation Live 2020 Notes

Read Article

Another month, another big and fully remote JavaScript conference. JSNation fit into my schedule a little less (and didn't quite overlap with my interests as neatly) but it was a fun event with some interesting talks on topics that are often only on my periphery. Much to think about!

🔖

Automating the deployment of your static site on your own server

Read Note

Need to self-host your front end away from the "modern" services like Netlify or Vercel? As both continue to get a little sketchier with time, it's definitely something I'm having to …

🔖

Making sense of React Server Components

Read Note

A superb breakdown of the changes being made in React 18+ around the new React Server Components paradigm. Josh has a knack for explaining complex problems in simpler ways, and this is no exception; …

🔖

Animated pride flags

Read Note

If you ever wanted to make a cool, animated flag from scratch on the web, Josh has you covered. But the article is also full of clever tricks for animation in …