Kristóf Poduszló

@kripod.dev

Software engineer with a special interest in accessibility. Builds for the web, mainly using React and Tailwind CSS nowadays.

Here's the math needed to adjust a color's lightness and eliminate the gray area where WCAG2 and APCA conflict on black/white foregrounds. Yes, it's CSS. And yes, it's blazingly fast. Usage: background: oklch⁠(⁠from⁠ ⁠<⁠color⁠>⁠ ⁠var⁠(⁠-⁠-⁠_⁠ak⁠-⁠safe⁠-⁠l⁠)⁠ ⁠c⁠ ⁠h⁠)⁠;

Screenshot of a CSS registered property with an initial value that consists of 12 lines of functions: calc(), clamp(), cos(), and several other mathematical operations.

The initial value:

calc(l * (1 - clamp(0, (l - (0.56 + (c / 0.4) * (-0.005 + (0.055 * cos(((h + 45) * pi / 180)))))) * ((0.72 + (c / 0.4) * (0.015 + (0.035 * cos((h * pi / 180))))) - l) * 1000, 1)) + ((0.56 + (c / 0.4) * (-0.005 + (0.055 * cos(((h + 45) * pi / 180))))) * (1 - clamp(0, (l - ((0.56 + (c / 0.4) * (-0.005 + (0.055 * cos(((h + 45) * pi / 180))))) + (0.72 + (c / 0.4) * (0.015 + (0.035 * cos((h * pi / 180)))))) / 2) * 1000, 1)) + (0.72 + (c / 0.4) * (0.015 + (0.035 * cos((h * pi / 180))))) * clamp(0, (l - ((0.56 + (c / 0.4) * (-0.005 + (0.055 * cos(((h + 45) * pi / 180))))) + (0.72 + (c / 0.4) * (0.015 + (0.035 * cos((h * pi / 180)))))) / 2) * 1000, 1)) * clamp(0, (l - (0.56 + (c / 0.4) * (-0.005 + (0.055 * cos(((h + 45) * pi / 180)))))) * ((0.72 + (c / 0.4) * (0.015 + (0.035 * cos((h * pi / 180))))) - l) * 1000, 1))
Haz@haz.dev · 2y ago

I spent hours exploring the color ranges where APCA and WCAG2 contrast algorithms differ. Then I found a site that shows these discrepancies, with the gray area of the chart marking the disagreement range. That's the zone Ariakit Styles will avoid. Thank you so much, Lloyd Kupchanko!

Just upgraded kripod.dev to Astro v5. While the migration took some effort, I could pull it off in one go thankfully to the well-written guidelines. It took less than an hour, running stronger than ever 🚀

Kristóf Poduszló

Software engineer with a special interest in accessibility. Builds for the web, mainly using React and Tailwind CSS nowadays.

kripod.dev

Astro@astro.build · 2y ago

Astro 5.0 is here. Content layer, server islands, simplified prerendering, type-safe env, @vite.dev v6. All stable. Go see what you can do 👇 astro.build/blog/astro-5/

I wish the @tailwindcss.com will revise some changes before releasing v4, especially concerning accessibility. It’s such a responsibility to get things right at their scale. Perhaps advanced features like breaking out of atomicity might be put behind a flag or at least discouraged by the docs? 🤔

Nmn@nmn.sh · 2y ago

Wrote my own thoughts on Tailwind 4. There’s a lot of good, some ok, and one terrible addition. I also added some thoughts about things that are longstanding issues in Tailwind that should be fixed. nmn.sh/blog/2024-11...

I never really found an ESLint config that’s fairly strict without going overboard So I went through hundreds of core + @typescript-eslint.io rules 1 by 1, hand-picking the severity and options for each. This project culminates all my years of experience with JS/TS so far github.com/kripod/eslin...

GitHub - kripod/eslint-config: Pragmatic ESLint config for robust collaboration

Pragmatic ESLint config for robust collaboration. Contribute to kripod/eslint-config development by creating an account on GitHub.

github.com

The deterministic nature of feeds here feels underappreciated in comparison to X. Finally I don’t lose track of where I’ve been when refreshing. I wish there was a catch-up marker splitting read and unread posts apart, like on Slack.