Menu

Dev

Using AbortController as an Alternative for Removing Event Listeners

February 15th, 2021

The idea of an “abortable” fetch came to life in 2017 when AbortController was released. That gives us a way to bail on an API request initiated by fetch() — even multiple calls — whenever we want. Here’s a super simple example using AbortController to cancel a fetch() request: const controller = new AbortController(); const…

Front-End Dissatisfaction (and Backing Off)

February 13th, 2021

Asko Nõmm reached a breaking point with front end: I want to have a personal life and not have to spend my nights reading up on some new flavor of *.js in fear that if I don’t I would soon be made irrelevant. I don’t want to learn nor use a million different tools. I…

Monorepo

January 26th, 2021

I’m not exactly a large-scale DevOps guy, but I can tell ya we’ve been moving back toward a monorepo at CodePen and it’s rife with advantages over a system with lots of smaller reports. For us, I mean. It’s very likely that you have entirely different challenges and have come to entirely different conclusions at…

Checkerboard Reveal

January 25th, 2021

Back when I was 10, I remember my cousin visiting our house. He was (and still is) a cool kid, the kind who’d bring his own self-programmed chess game on a floppy disk. And his version of chess was just as cool as him because a piece of the board would disappear after each move….

How to Make GraphQL and DynamoDB Play Nicely Together

January 14th, 2021

Serverless, GraphQL, and DynamoDB are a powerful combination for building websites. The first two are well-loved, but DynamoDB is often misunderstood or actively avoided. It’s often dismissed by folks who consider it only worth the effort “at scale.” That was my assumption, too, and I tried to stick with a SQL database for my serverless…

Fading in a Page on Load with CSS & JavaScript

January 13th, 2021

Louis Lazaris demonstrates a very simple way of doing this. Hide the body (with JavaScript) right away with with a CSS class that declares opacity: 0 Wait for all the JavaScript to execute Unhide the body by transitioning it back to opacity: 1 Like this: CodePen Embed Fallback Louis demonstrates a callback method, as well…

Animating with Lottie

January 11th, 2021

I believe animation on the web is not only fun but engaging in such a way that it has converted site visitors into customers. Think of the “Like” button on Twitter. When you “like” a tweet, tiny colorful bubbles spread around the heart button while it appears to morph into a circle around the button…

Painters Tape and Fault Tolerance

January 8th, 2021

Snipping the top bit of Nicholas C. Zakas’s Top of the Month newsletter (go sign up!), with permission. One of my favorite things in the world is painter’s tape (also called masking tape). It seems like something silly: some tape you put on a wall when you’re painting to avoid getting paint on the wall….

Creating CSS APIs without JavaScript With the datasette-css-properties plugin

January 7th, 2021

Simon Willison has a project called Datasette, an open-source multi-tool for exploring and publishing data. I’m not sure I’m qualified to explain it, but it’s like a tool to make handling data easier and doing more — through the web — with data you have. Like making that data queryable and giving it an API….

Custom Properties as State

January 5th, 2021

Here’s a fun idea from James Stanley: a CSS file (that presumably updates daily) containing CSS custom properties for “seasonal” colors (e.g. spring is greens, fall is oranges). You’d then use the values to theme your site, knowing that those colors change slightly from day to day. This is what I got while writing this:…