Fix docs for Tailwind 4, fix BaseNode selected styling.#1104
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR updates documentation and styling to support Tailwind CSS 4. The changes address proper CSS import ordering for React Flow when using Tailwind 4 and fix BaseNode component styling to use Tailwind 4-compatible selectors.
Changes:
- Updated UI documentation to specify correct CSS import order for Tailwind CSS 4
- Added similar import guidance to the learning tutorial
- Replaced deprecated Tailwind selector syntax in BaseNode component with Tailwind 4-compatible syntax
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| sites/reactflow.dev/src/content/ui/index.mdx | Updated CSS import instructions to use global.css with proper ordering for Tailwind 4 |
| sites/reactflow.dev/src/content/learn/index.mdx | Added important note about Tailwind 4 CSS import requirements |
| apps/ui-components/registry/components/base-node/index.tsx | Updated selected node styling from escaped class selectors to in-[] selector syntax |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
By using It seems that compilation of our previous selector
.react-flow__node.selected .\[\.react-flow\\\\_\\\\_node\.selected_\&\]\:border-muted-foreground {
border-color:var(--muted-foreground)
}
.react-flow__node.selected .\[\.react-flow\\\\_\\\\_node\.selected_\&\]\:shadow-lg {
--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);
box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)
}which is wrong (proof on https://play.tailwindcss.com/M810F19i44 that the arbitrary variants like this should still work) |
5b8e086 to
d77e832
Compare
Should fix xyflow/xyflow#5673