TekGadgt

CSS Daily

A daily CSS challenge — like Wordle, but for CSS.

Each morning a new challenge appears. You get an HTML structure and a target screenshot, then write CSS to match it as closely as possible before time runs out. Your score is calculated by pixel-level comparison in real time as you type.

The Story

CSS Daily was inspired by the March MadCSS tournament and built in a single day. A new challenge generates automatically every morning, so there's always something fresh to try. The visual diff scoring engine is adapted from SynHax, the open-source project by Wes Bos and Scott Tolinski.

Built With AI

The entire site was built using Claude Code. Each morning, the configurable AI generation pipeline uses OpenAI by default, with Anthropic available through configuration, to generate the HTML structure, target CSS, and starter CSS stubs. Playwright automatically renders the target to a screenshot. Every morning a Cloudflare cron starts the pipeline: generate, screenshot, publish to Cloudflare D1 and R2, rebuild, and deploy. No manual intervention needed.

This project demonstrates what's possible when you combine AI-augmented development with good architecture. The result is a fully automated platform that ships a new challenge every day with zero maintenance.

How It Works

CSS Daily is built with Astro, React, CodeMirror 6, and Tailwind CSS. The scoring engine uses real-time pixel-level visual diffing with Euclidean RGB distance scoring, adapted from SynHax with modifications. Every page is a static file on Cloudflare Workers; challenges live in a Cloudflare D1 database and their target images in R2. A small Worker handles the few things a static site can't: optional sign-in and an anonymous play counter. Scoring happens entirely in your browser.

Accounts & Data

Signing in is optional; every challenge works without an account, and your results are saved in your browser either way. If you sign in with GitHub, CSS Daily stores your GitHub account ID, display name, avatar URL and email address (the sign-in library requires one), plus a session record so you stay signed in. Your IP address and browser user agent are not stored, and neither are GitHub's access tokens: CSS Daily never acts on GitHub on your behalf.

Deleting your account (avatar menu → Delete account) removes it from the live database immediately. Weekly backups may keep a copy for up to 12 weeks; if one is ever restored, every deletion is applied again.

Separately, whenever anyone submits a challenge, an anonymous counter records approximately how many submissions each challenge gets per day. It stores nothing about you.

Featured