Top all-time · #25570
Today I Learned
Personal blog · til.jakelazaroff.comprogrammingweb
Today I Learned is a personal blog at til.jakelazaroff.com about programming and web. Since 2025, 3 different Hacker News readers have linked it 3 times. It is still writing: the last post was on 2026-01-18, and you can follow it by feed.
Too few sampled comments (2) to say how often HN recommends it.?
Why HN links it
HN readers link these short CSS notes as practical techniques, such as getting the browser to pick a contrasting text colour and changing a button's background from outside via CSS variables. The comments cite them as sources, not as praise.
Summarised by Claude from a sample of 2 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
A collection of useful things I've learned.
What Hacker News says?
there is a way to do something close to this using lch: --text: lch(from var(--bg) calc((49.44 - l) * infinity) 0 0); source: https://til.jakelazaroff.com/css/swap-between-black-and-whit...
Comment linking /css/swap-between-black-and-white-text-based-on-background-color/
on “How to have the browser pick a contrasting color in CSS”Submitted Serve Markdown files as HTML [with Caddy] (2024) as a story · 1 points
HN discussionYeah, use CSS variables. I wrote a TIL on doing this exact thing (customizing a button's background color from outside) with vanilla CSS: https://til.jakelazaroff.com/css/dynamically-change-styles-f... In Tailwind you could probably replicate this with custom variants or whatever they're called.
Comment linking /css/dynamically-change-styles-from-html-or-jsx/
on “CSS's problems are Tailwind's problems”