- Created `openspec-ff-change` skill for fast-forward artifact creation. - Introduced `openspec-new-change` skill for structured change creation. - Developed `openspec-onboard` skill for guided onboarding through OpenSpec workflow. - Added `openspec-sync-specs` skill for syncing delta specs to main specs. - Implemented `openspec-verify-change` skill for verifying implementation against change artifacts. - Updated `.gitignore` to exclude OpenSpec generated files. - Added `skills-lock.json` to manage skill dependencies.
2.6 KiB
2.6 KiB
name, description
| name | description |
|---|---|
| features-upgrade | Migrating from Tailwind CSS v3 to v4 |
Upgrade Guide (v3 → v4)
Key changes when upgrading from Tailwind CSS v3 to v4. Use the automated upgrade tool when possible.
Upgrade Tool
npx @tailwindcss/upgrade
Requires Node.js 20+. Run in a new branch, review diff, test. Handles most migration automatically.
Installation Changes
- PostCSS: Use
@tailwindcss/postcss; removepostcss-importandautoprefixer(handled by v4) - Vite: Prefer
@tailwindcss/viteover PostCSS - CLI: Use
npx @tailwindcss/cliinstead ofnpx tailwindcss
Import Change
/* v3 */
@tailwind base;
@tailwind components;
@tailwind utilities;
/* v4 */
@import "tailwindcss";
Renamed Utilities
| v3 | v4 |
|---|---|
shadow-sm |
shadow-xs |
shadow |
shadow-sm |
rounded-sm |
rounded-xs |
rounded |
rounded-sm |
blur-sm |
blur-xs |
blur |
blur-sm |
outline-none |
outline-hidden |
ring |
ring-3 |
Removed / Replaced
bg-opacity-*,text-opacity-*, etc. → usebg-black/50,text-black/50flex-shrink-*→shrink-*flex-grow-*→grow-*overflow-ellipsis→text-ellipsis
Important Modifier
<!-- v3: ! at start -->
<div class="!bg-red-500">
<!-- v4: ! at end -->
<div class="bg-red-500!">
Ring & Border Defaults
ringwidth: 3px → 1px; usering-3for v3 behaviorring/borderdefault color:currentColor(was gray-200 / blue-500)- Always specify color:
ring-3 ring-blue-500,border border-gray-200
Other Breaking Changes
- Space/divide selectors: Changed from
:not([hidden]) ~ :not([hidden])to:not(:last-child); may affect layout - Variant stacking: Left-to-right in v4 (was right-to-left)
- Transform reset:
transform-noneno longer resets rotate/scale/translate; usescale-none,rotate-none, etc. - Hover on mobile:
hoveronly applies when device supports hover; override with@custom-variant hover (&:hover)if needed - Arbitrary values: Use
bg-(--var)notbg-[--var]for CSS variables - theme(): Use
theme(--breakpoint-xl)nottheme(screens.xl) - @layer utilities/components: Use
@utilitydirective instead - corePlugins, safelist, separator: Not supported; use
@source inline()for safelisting - Sass/Less/Stylus: v4 not designed for use with CSS preprocessors
Browser Support
v4 targets Safari 16.4+, Chrome 111+, Firefox 128+. For older browsers, stay on v3.4.