Algorithmic hover states with contrast-color()
Firefox 146 added support for contrast-color() joining Safari 26 in the First Implementor’s Club. For those unfamiliar, contrast-color() is a new CSS function that will take a as input and returns either white or black depending on which has the most contrast.
The quintessential example is choosing a foreground text color with the best contrast.
button {
--button-bg: red;
background: var(--button-bg);
color: contrast-color(var(--button-bg));
/* @returns black (5.25:1 WCAG AA Pass)
n...
Take me to this post.
January 08, 2026
Using Active Accessibility to find out where the Windows caret is
It's old and rather simple, but we like simple.
The post Using Active Accessibility to find out where the Windows caret is appeared first on The Old New Thing....
Take me to this post.
January 08, 2026
From “What’s a String?” to Sites of the Day: Nathan Dallaire’s High-End Web Experiences
10 years ago, my brain couldn't grasp what a string was and it turns out I was overcomplicating everything because code is called “code” (we should rename this)....
Take me to this post.
January 08, 2026
Today I Learned – in 2024 and 2025
A Discord server I use has a channel called #til, standing for Today I Learned. It’s a place to post interesting or surprising things you recently learned. I took my posts to that channel from the last couple of years, tidied them up and have listed them below. Hopefully you’ll find something interesting there: TIL […]...
Take me to this post.
January 08, 2026
CodeSOD: The Review
Frequent contributor Argle Bargle (recently, or even in last week's Errord) works with a programmer called "Jimbo". Jimbo is a solid co-worker and a good programmer. He has more tenure at the company than Argle, which means Jimbo is who Argle goes to when he has questions.
Recently, Argle worked his way through a rather complicated bit of code. It involved passing data between two different languages inside of a real-time system. Much of its functionality was opaque and complicated, so Argle wro...
Take me to this post.
January 08, 2026
Cypress Dependencies Through A Docker Image
If you are testing a website, the DEV dependencies do not change very often. You might bump Cypress version once in a while, add or upgra...
Take me to this post.
January 08, 2026