Digging Into CSS Logical Properties

Ahmad Shadeed digs into CSS Logical Properties The basic idea of CSS logical properties is that we won’t use physical directions in CSS properties. Instead, we will use properties that depend on the direction of the HTML document. Those properties are called logical properties. As I said before: Exciting stuff. This will have a huge …

Authenticate with sudo using Touch ID

Turns out it’s possible to authenticate with sudo using Touch ID, as per this (old) tweet by Cabel: Pro MacBook Pro Tip: have a Touch Bar with Touch ID? If you edit /etc/pam.d/sudo and add the following line to the top… auth sufficient pam_tid.so …you can now use your fingerprint to sudo! — Cabel (@cabel) …

HTTPWTF — Looking at some of the HTTP quirks

HTTP is fundamental to modern development, from frontend to backend to mobile. But like any widespread mature standard, it’s got some funky skeletons in the closet. Some of these skeletons are little-known but genuinely useful features, some of them are legacy oddities relied on by billions of connections daily, and some of them really shouldn’t …

Display a BlurHash using only CSS thanks to blurhash-to-css

If you want to display Blurhash Placeholder Images on your site you need a JavaScript solution to do so. The blurhash-to-css package bypasses that, as it allows you to convert a Blurhash to a set of CSS properties that need to apply. import { blurhashToCss } from "blurhash-to-css"; const css = blurhashToCss( "eCF6B#-:0JInxr?@s;nmIoWUIko1%NocRk.8xbIUaxR*^+s;RiWAWU" ); { …

SpaceX’s SN10 “Belly Flop” Composite

Earlier this week SpaceX’s SN10 rocket took off, ascended to ±10km, and then after a free fall in the horizontal position turned vertical again to successfully land (only to explode a few minutes later). While you can rewatch the whole thing online I’m more fascinated by this composite photo by Jack Beyer, visualizing the trajectory: …

Formatting a Date in JavaScript with Intl.DateTimeFormat

Phil Nash walks us through using Intl.DateTimeFormat to format a Date to a specific timezone and format. const shortcutFormatter = Intl.DateTimeFormat("en-AU", { timeZone: "Australia/Melbourne", timeStyle: "long", dateStyle: "short" }); shortcutFormatter.format(date); // => "22/2/21, 5:05:52 pm AEDT" How to display dates in your user’s time zone with the Intl API → Related: Think you know a …