Johnny Harris, whom you might know from the Vox Borders series, on how we can possibly measure the distance to things a quadrillion km away.
A rather geeky/technical weblog, est. 2001, by Bramus
Nik Graf details a little trick I also use from time to time: changing the key of a React component to force remount it. Upon clicking a contact in the list, the active contact’s id is used as the key for the Detail component. <Detail key={activeContact.id} contact={activeContact} /> Using React’s Key Attribute to remount a …
Continue reading “Using React’s Key Attribute to remount a Component”
Jason Orendorff looked into the JS spec, in detail … JavaScript is rather hard to parse. Here is an in-depth accounting of its syntactic quirks, with an eye toward actually implementing a parser from scratch. One quirk most JS devs have will have certainly heard of is Automatic Semicolon Insertion (ASI). JavaScript’s Syntactic Quirks →
Will Boyd digs into the user-select CSS property: CSS lets you control how text selection behaves and appears on your pages. This can help you improve usability in certain situations and add a little bit of visual flair. Let’s dive in! His posts includes a very nice hack to make user-select: all; work only at …
The logic behind displaying an image responsively is complicated. It involves determining how large the image will be displayed, as well as understanding whether the user is on a high-resolution display, among other things. Thankfully, the browser is better equipped than we are to handle this logic. All we need to do is give it …
In his book Arcade Game Typography designer Toshi Omagari breaks down the evolution, design, and history of arcade game fonts. In this video from the Vox by Design series he’s interviewed and asked about his favorite 8-bit fonts. Video game designers of the ’70s, ’80s, and ’90s faced color and resolution limitations that stimulated incredible …
Great tip by Mattias: TIL: you can fake package versions in composer using the "as" alias. Useful to force install certain versions while keeping other dependencies in check! 👍https://t.co/VzmMRCCoR5 — Mattias Geniar (@mattiasgeniar) April 16, 2020 You can alias directly when requiring a package: composer require monolog/monolog:”dev-bugfix as 1.0.x-dev” Surely comes in handy when locally …
In The Quest for the Perfect Dark Mode, Joshua W Comeau extensively explains how he has implemented the Dark Mode Toggle on his Gatsby-powered website. It follows the system’s light/dark mode preference, but also allows for an override which he persists in localStorage. The flow to decide if Dark Mode should be used or not …
Continue reading “The Quest for the Perfect Dark Mode Toggle, using Vanilla JavaScript”