mirror of
https://github.com/bitbaum/evig.git
synced 2026-12-04 00:06:59 +01:00
After MM landed the palette → semantic token migration and reduced the
dark-override block in globals.css, the previously-failing
`npx @tailwindcss/upgrade` now succeeds. This commit lands what the tool
produced + minor hand-fixes for the variant-name over-rename.
What changed:
- tailwind.config.ts → deleted; config now lives in @theme block in
src/app/globals.css (CSS-first config, Tailwind 4's model).
- @tailwind base/components/utilities → @import 'tailwindcss'.
- @custom-variant dark (&:is(.dark *)) — preserves the `.dark`-class
dark-mode strategy.
- postcss.config.js → uses @tailwindcss/postcss; autoprefixer + postcss-import
removed (Tailwind 4 includes them).
- 353 template files migrated by the tool — mostly:
- flex-shrink-0 → shrink-0
- backdrop-blur-sm → backdrop-blur-xs (sm is now larger in v4)
- border-white/[0.06] → border-white/6 (arbitrary → percent fraction)
- Various opacity/spacing scale renames per Tailwind 4 defaults.
Hand-fixes after the auto-migration:
- The tool over-eagerly renamed our user-defined variant *names*
('outline' → 'outline-solid', 'rounded' → 'rounded-sm') along with
the Tailwind class renames. Reverted in 10 files: button-class.ts,
button.tsx, badge.tsx, contact-link.tsx, ResponsiveHero.tsx,
ProjectHero.tsx, projects/types.ts, CurrencySelector.tsx, IconBadge.tsx,
about/impact/content.tsx, design-system.test.ts. These are variant
PROP values, not CSS class names — the tool shouldn't have touched them.
CSS class names that did need renaming (focus-visible:outline-solid for
the outline-style:solid utility) stay as-is.
Pre-upgrade groundwork from this stretch:
- Moved the .dark .X { ... } overrides block outside @layer utilities
(commit prep) so the upgrade tool wouldn't choke. The tool ended up
re-wrapping them into @layer utilities anyway — but with v4's improved
parser it accepts the form now, so the original blocker (`@utility
hover:bg-neutral-50` invalid-name error) doesn't reproduce.
Verified end-to-end:
✓ npm run typecheck (clean)
✓ npm test (7607/7607 passing)
✓ npm run build (full Next.js 16 prod build + sitemap generation)
The design-system arc is complete: semantic tokens → primitives → lint
enforcement → form-control migration → palette sweep → Tailwind 4. From
the BB.6 dropdown bug to a structurally-sound modern design system in
one extended session.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
6 lines
72 B
JavaScript
6 lines
72 B
JavaScript
module.exports = {
|
|
plugins: {
|
|
'@tailwindcss/postcss': {},
|
|
},
|
|
};
|