8000 build(deps): move to Tailwind CSS 4 by adeelahmad · Pull Request #377 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content

build(deps): move to Tailwind CSS 4 - #377

Merged
adeelahmad merged 2 commits into
mainfrom
claude/project-thread-yqyu9p
Oct 15, 2026
Merged

adeelahmad merged 2 commits into
mainfrom
claude/project-thread-yqyu9p

Conversation

@adeelahmad
Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Description

Before: Dependabot's Tailwind 4 bump (#251) and tailwind-merge 3 bump (#319) were red, because each needs the other plus a migration that a version bump can't do.

After: the web app runs on Tailwind CSS 4 and tailwind-merge 3, and looks the same. Every page the clicks survey visits was screenshotted on Tailwind 3 and on this branch, desktop and phone: same page heights and layout, with differences only in data (timestamps, the new NSFW pipeline step).

How:

  • The official upgrade tool (@tailwindcss/upgrade) moved the config into CSS (@theme in app/globals.css; tailwind.config.js is gone) and renamed the classes whose meaning moved (shadow-sm to shadow-xs, outline-none to outline-hidden, ring to ring-3, !x to x!, ...). I re-ran it on current main to catch the code merged since, and left its false positives in plain strings (graph shape names, the NSFW "blur" setting) as they were.
  • Utilities stay outside cascade layers. BlockSuite, the notes editor, adds unlayered global rules such as input { font-size: 12px } to the page; in Tailwind 4's layered build those beat every class, which shrank a note's title to 12 px. Unlayered, a class beats an element rule again, as in Tailwind 3. A test keeps it that way, and docs/frontend.md says why.
  • Preflight no longer gives buttons a pointer cursor or placeholders a light grey, so the base layer keeps both.
  • The postcss-selector-parser@^6 override goes, as nothing asks for that major any more; components.json points shadcn at the CSS config.

Motivation and Context

Answering "all tests green?": this clears the last two red Dependabot PRs. Supersedes #251 and #319.

Screenshots (if appropriate):

Side-by-side diffs of every page (Tailwind 3, Tailwind 4, differences in red) were checked locally with the clicks survey harness; the note page's title is 30 px bold on both.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change; ! in the title)

Checklist:

  • The title is a Conventional Commit.
  • My code follows the code style of this project (make hooks checks it on commit).
  • I added or updated tests: __tests__/globalsCss.test.ts; jest (803 tests), tsc, eslint, Prettier and next build pass locally.
  • My change requires documentation updates, and I have updated docs/ accordingly (docs/frontend.md).
  • CHANGELOG: n/a, nothing changes for users.

Done questions (AGENTS.md)

  • Goal: merges on green CI.
  • Agents: n/a, styling only.
  • Zero setup: nothing new to install or set.
  • Fewest clicks and keystrokes: unchanged (clicks survey journeys identical).
  • Configurable: n/a, no settings.
  • Light: Tailwind 4 builds faster and ships no runtime; the image is unchanged in shape.
  • Private and secure: n/a, no new surface.
  • Cost: n/a.
  • User decides: n/a; defaults unchanged.
  • Upgrades: n/a, no stored data.
  • Honest: n/a.
  • Tests, docs and generated files updated.
  • Open standards; Tailwind 4 and tailwind-merge 3 are MIT.
  • Reported in the project thread. Refine later: a note's title or summary typed less than 0.8 s before the page is closed or reloaded is lost, and the page says "Saved" while that change waits (same on Tailwind 3; a pagehide flush and a "Saving…" state would fix it).

🤖 Generated with Claude Code

https://claude.ai/code/session_01GoeF3WmfShLFtu15B1sQZz


Generated by Claude Code

Tailwind 4 is configured in CSS: the tokens map into an @theme block in
app/globals.css and tailwind.config.js is gone. The official upgrade tool
renamed the classes whose meaning moved (shadow-sm to shadow-xs,
outline-none to outline-hidden, ring to ring-3, !x to x!, ...); its false
positives in plain strings (graph shapes, the NSFW "blur" setting) are
left as they were. tailwind-merge moves to 3, which needs Tailwind 4.

Utilities stay outside cascade layers: BlockSuite, the notes editor, adds
unlayered global rules such as `input { font-size: 12px }` to the page,
and in Tailwind 4's layered build those beat every class, which shrank
a note's title to 12 px. Unlayered, a class beats an element rule again,
as it did in Tailwind 3.

Preflight no longer gives buttons a pointer cursor or placeholders a
light grey, so the base layer keeps both. The postcss-selector-parser 6
override goes, as nothing asks for that major any more.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GoeF3WmfShLFtu15B1sQZz
@adeelahmad adeelahmad self-assigned this Oct 15, 2026
@adeelahmad
adeelahmad merged commit cbdfcd6 into main Oct 15, 2026
17 checks passed
@adeelahmad
adeelahmad deleted the claude/project-thread-yqyu9p branch October 15, 2026 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0