feat(design-system)!: Migrate from Tailwind CSS v3 to v4#613
feat(design-system)!: Migrate from Tailwind CSS v3 to v4#613
Conversation
Agent-Logs-Url: https://github.com/agrc/kitchen-sink/sessions/4757dd1d-6d59-41fe-959f-37e27e8c35ac Co-authored-by: stdavis <1326248+stdavis@users.noreply.github.com>
|
@copilot Take a look at this project. This is what was used as the basis for the components when they were built in v3. It's now been upgraded to v4. Please review and make sure that you are following it's conventions. |
…conventions Agent-Logs-Url: https://github.com/agrc/kitchen-sink/sessions/49bc755a-f14f-4774-9ec8-f44725c24efe Co-authored-by: stdavis <1326248+stdavis@users.noreply.github.com>
Reviewed the Adobe React Aria + Tailwind CSS starter and aligned with its v4 conventions in commit
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Breaking change migrating
@ugrc/utah-design-systemand@ugrc/tailwind-presetfrom Tailwind CSS v3 to v4, following the official upgrade guide and aligning with the Adobe React Aria + Tailwind CSS starter kit v4 conventions.Dependency changes
tailwindcss→ v4;@tailwindcss/postcssreplaces the old PostCSS pluginautoprefixerremoved (no longer needed with v4)tailwindcss-animateretained — still required foranimate-in/animate-out/zoom-in-*/slide-in-from-*animations used by Modal, Popover, and Tooltiptailwind-merge2.x → 3.x,tailwind-variants0.x → 3.x,tailwindcss-react-aria-components1.x → 2.xConfig migration
tailwind.config.jsdeleted — configuration now lives in CSSpostcss.config.jsupdated to use@tailwindcss/postcss.storybook/tailwind.cssmigrated to@import "tailwindcss"with@custom-variant darkfor class-based dark mode@ugrc/tailwind-presetrewriteThe preset moves from a CommonJS JS object export to a CSS file using Tailwind v4's
@themeAPI:Before (v3):
After (v4):
The CSS preset defines all custom colors (
primary,secondary,accent,warning), fonts, and animations via@theme, and registerstailwindcss-react-aria-componentsandtailwindcss-animatevia@plugin.Component updates
theme(colors.*)references inRadio.tsx,Checkbox.tsx, andTooltip.tsxreplaced withvar(--color-*)CSS variable syntax as required by v4.border-(--color),bg-(--color),h-(--visual-viewport-height),min-w-(--trigger-width),w-(--trigger-width).