Skip to content

Tailwind Upgrade 3.x -> 4.0 #179

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 43 additions & 13 deletions assets/src/input.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,46 @@
@tailwind base;
@import 'tailwindcss';

@utility container {
margin-inline: auto;
padding-inline: 1rem;
@media (width >= theme(--breakpoint-sm)) {
padding-inline: 2rem;
}
@media (width >= theme(--breakpoint-lg)) {
padding-inline: 4rem;
}
@media (width >= theme(--breakpoint-xl)) {
padding-inline: 6rem;
}
@media (width >= theme(--breakpoint-2xl)) {
padding-inline: 12rem;
}
}

/*
The default border color has changed to `currentColor` in Tailwind CSS v4,
so we've added these compatibility styles to make sure everything still
looks the same as it did with Tailwind CSS v3.

If we ever want to remove these styles, we need to add an explicit border
color utility to any element that depends on these defaults.
*/
@layer base {
*,
::after,
::before,
::backdrop,
::file-selector-button {
border-color: var(--color-gray-200, currentColor);
}
}

@utility btn {
@apply inline-flex items-center justify-center border align-middle select-none font-medium text-center hover:no-underline focus:no-underline focus:shadow-none text-sm py-2 px-4 shadow-xs hover:shadow-md bg-transparent hover:bg-slate-700 text-slate-700 hover:text-white rounded-sm;
svg {
@apply fill-current w-4 h-4 mr-2;
}
}

/* https://tailwindcss.com/docs/preflight#extending-preflight */
/* https://tailwindcss.com/docs/adding-custom-styles#adding-base-styles */
Expand Down Expand Up @@ -37,15 +79,3 @@
@apply mb-4;
}
}

@tailwind components;
@tailwind utilities;

@layer components {
.btn {
@apply inline-flex items-center justify-center border align-middle select-none font-medium text-center hover:no-underline focus:no-underline focus:shadow-none text-sm py-2 px-4 shadow-sm hover:shadow-md bg-transparent hover:bg-slate-700 text-slate-700 hover:text-white rounded;
svg {
@apply fill-current w-4 h-4 mr-2;
}
}
}
Loading
Loading