Focus rings with nested contrast-color()? https://daverupert.com/2026/01/nested-contrast-color-focus-rings/

Focus rings with nested contrast-color()?
As I was playing around with contrast-color(), I got a wild idea that you could use contrast-color() to invert its return value by nesting it: contrast-color(contrast-color(var(--some-color)). When would this be useful? Uh… Good question. I couldn’t come up with an example right away but after a bit I found one sitting right under my nose….
daverupert.com · daverupert.com
Link author:
Dave Rupert@davatron5000@mastodon.social