Skip to content

chore(deps): upgrade to Tailwind CSS v4 (#1104)#1123

Merged
dsebastien merged 2 commits into
mainfrom
chore/tailwind-4
Jun 17, 2026
Merged

chore(deps): upgrade to Tailwind CSS v4 (#1104)#1123
dsebastien merged 2 commits into
mainfrom
chore/tailwind-4

Conversation

@dsebastien

Copy link
Copy Markdown
Member

Closes #1104.

Upgrades Tailwind CSS 3.4 → v4 (latest). Keeps the existing JavaScript theme config via the @config directive — the theme colors map to PrimeReact CSS variables, so a CSS-first @theme rewrite is intentionally avoided to minimize risk.

Changes

  • package.json: tailwindcss ^4, add @tailwindcss/postcss, bump @tailwindcss/forms 0.5.10 / @tailwindcss/typography 0.5.16, drop autoprefixer (v4 prefixes natively via Lightning CSS), remove the unused/broken tailwind CLI script.
  • apps/knowii/postcss.config.js: switch to @tailwindcss/postcss.
  • apps/knowii/src/styles.css: import tailwindcss/theme + preflight + utilities as separate layers so the PrimeReact theme stays interleaved between base and utilities (preserves specificity order); load the JS config via @config; restore the v3 default border color.
  • Templates (7 files): v4 utility renames — outline-noneoutline-hidden, shadow-smshadow-xs, flex-shrink-0shrink-0, flex-growgrow, bg-gradient-to-rbg-linear-to-r.

Validation

  • nx build knowii — builds clean
  • nx lint knowii / nx test knowii — pass
  • ✅ Built CSS still emits 115 vendor-prefixed declarations and resolves theme colors (var(--primary-500))

⚠️ Needs visual QA before merge

This is the one thing automated checks can't cover. v4 changes some defaults (border/ring/shadow scale, etc.) and this app uses a custom PrimeReact + Tailwind CSS-layer integration. Please run the app and eyeball the key pages (landing, auth, dashboard, community/resource boxes, breadcrumb, waitlist box) before merging. Left unmerged for that reason.

Migrate from Tailwind 3.4 to v4 (latest), keeping the existing JS theme
config via the @config directive (theme colors are mapped to PrimeReact
CSS variables, so a CSS-first @theme rewrite is avoided).

- package.json: tailwindcss ^4, add @tailwindcss/postcss, bump
  @tailwindcss/forms 0.5.10 and typography 0.5.16, drop autoprefixer
  (v4 does vendor-prefixing natively via Lightning CSS), remove the unused
  and now-broken 'tailwind' CLI script
- apps/knowii/postcss.config.js: use @tailwindcss/postcss
- apps/knowii/src/styles.css: import tailwindcss/theme + preflight + utilities
  as separate layers so the PrimeReact theme stays interleaved between base
  and utilities; load JS config via @config; restore v3 default border color
- templates: apply v4 utility renames (outline-none -> outline-hidden,
  shadow-sm -> shadow-xs, flex-shrink-0 -> shrink-0, flex-grow -> grow,
  bg-gradient-to-r -> bg-linear-to-r)

Validated: nx build / lint / test all pass; built CSS still emits vendor
prefixes (115) and resolves theme colors (var(--primary-500)).

Needs visual QA before merge (v4 default changes + PrimeReact layering).
Add @tailwindcss/cli and restore the 'tailwind' script using the proper
v4 CLI form (-i/-o; config is read from @config in the input CSS), plus a
'tailwind:watch' variant. Inspired by the obsidian-plugin-template setup.
@dsebastien dsebastien merged commit cdc7338 into main Jun 17, 2026
5 checks passed
@dsebastien dsebastien deleted the chore/tailwind-4 branch June 17, 2026 15:14
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.

Switch to Tailwind latest

1 participant