-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
WIP: Update tailwind to version 4.0.0 #5990
base: main
Are you sure you want to change the base?
Conversation
@Flo0807 mentioned in the related issue that the plugin works if it is directly exported as function: phoenixframework/tailwind#107 (comment) I verified that it works, but I'm hesitant to rely on this. v4 doesn't really document how plugins should look like so that could change. I think if we wait for tailwindlabs/tailwindcss#15934, we should be good! |
51b9450
to
59e1743
Compare
59e1743
to
9255040
Compare
@variant phx-change-loading ([".phx-change-loading&", ".phx-change-loading &"]); | ||
@theme { | ||
--color-brand: "#FD4F00", | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@leifmetcalf I just tested this again with Tailwind 4.0.6 and the plugin seems to work now. The only issue I had was that Tailwind complained Error: Unexpected semicolon
until I removed the semicolon after @theme {};
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
}; | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, false alarm. I still had a node_modules folder lying around in a parent directory. So the plugin is still broken, but we need to fix the semicolon nonetheless.
This is waiting on the elixir library being updated to support tailwind v4 in phoenixframework/tailwind#103.
Things I'm not sure about:
assets/css/tailwind_heroicons.js
, but I'm not sure about the name and I don't think it belongs inassets/css
. Also, for now, the tailwind standalone cli doesn't bundle the javascript library, so the heroicons plugin fails to load without runningnpm install tailwindcss
or similar. See [v4] Standalone cli doesn't bundle tailwindcss js library tailwindlabs/tailwindcss#15235.