Skip to content

Commit

Permalink
[#69] Tailwind 4 upgrade (#81)
Browse files Browse the repository at this point in the history
* [#69] Run `npx @tailwindcss/upgrade@next`

* [#69] Add back default border color

TW 4 changed the default border color to `currentColor` instead of gray-200

This change adds back gray-200 where it wasn't specified.

* [#69] Port js config to app.css

* [#69] Migrate to Tailwind's `max-*` media query format.

* [#69] Fix issues with nested dark:text-red-300

* [#69] Resolve type errors with animation keyframes
  • Loading branch information
joshuapease authored Feb 25, 2025
1 parent 2e15ca6 commit 9785f3c
Show file tree
Hide file tree
Showing 16 changed files with 624 additions and 935 deletions.
21 changes: 0 additions & 21 deletions config/tailwind/container.js

This file was deleted.

34 changes: 17 additions & 17 deletions config/tailwind/dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,23 @@ export default plugin(({ addComponents }) => {
'dialog-backdrop-out var(--dialog-transition-duration, 300ms) cubic-bezier(0.2, 0, 0.13, 1) forwards',
},
},
// Animation Keyframes
'@keyframes dialog-in': {
'0%': { transform: 'translateY(2rem)', opacity: 0 },
'100%': { transform: 'translateY(0px)', opacity: 1 },
},
'@keyframes dialog-out': {
'0%': { transform: 'scale(1)', opacity: 1 },
'100%': { transform: 'scale(0.9)', opacity: 0 },
},
'@keyframes dialog-backdrop-in': {
'0%': { opacity: 0 },
'100%': { opacity: 1 },
},
'@keyframes dialog-backdrop-out': {
'0%': { opacity: 1 },
'100%': { opacity: 0 },
},
},
// Animation Keyframes
'@keyframes dialog-in': {
'0%': { transform: 'translateY(2rem)', opacity: '0' },
'100%': { transform: 'translateY(0px)', opacity: '1' },
},
'@keyframes dialog-out': {
'0%': { transform: 'scale(1)', opacity: '1' },
'100%': { transform: 'scale(0.9)', opacity: '0' },
},
'@keyframes dialog-backdrop-in': {
'0%': { opacity: '0' },
'100%': { opacity: '1' },
},
'@keyframes dialog-backdrop-out': {
'0%': { opacity: '1' },
'100%': { opacity: '0' },
},
})
})
11 changes: 8 additions & 3 deletions config/tailwind/forms.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,14 @@ export default plugin(({ addComponents }) => {
},
},
// required field styles
'&[data-required] label .field-label::after': {
'@apply content-["*"] text-red-600 align-super text-xs ml-2 font-medium dark:text-red-300':
{},
'&[data-required] label .field-label': {
'&::after': {
'@apply content-["*"] text-red-600 align-super text-xs ml-2 font-medium':
{},
},
'.dark &::after': {
'@apply text-red-300': {},
},
},
'&[data-required="long"] label .field-label::after': {
'@apply content-["*Required"]': {},
Expand Down
Loading

0 comments on commit 9785f3c

Please sign in to comment.