-
-
Notifications
You must be signed in to change notification settings - Fork 75
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
[docs] Properly indicate Tailwind version #1179
Comments
@vladmoroz Perhaps just change the select option to "Tailwind v4"? |
I'll fix the outlines. Other than the outlines, is there another example that looks really different in v3 and v4? We haven't used any of the v4-only features. The styles we used should be all backwards compatible with v3. If not, we should treat it as a bug to fix. I don't want to include an indication of v4 because many folks will stay on v3 for a long time, and they are largely the same apart a few defaults. |
There is quite a bit of The examples being rendered with Tailwind v4 but being written with v3's syntax and classes is a strange choice in my opinion. It took me quite some time to figure out if I configured something incorrectly in my project before I decided to just check the code of the docs to see which Tailwind version was being used. Then there's the discrepancy that opening the examples in CodeSandbox results in them rendering with Tailwind v3. Why are the docs using Tailwind v4 if they are written for v3? |
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. Note @Studio384 How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey. |
I've updated the examples to avoid the few bits of syntax that diverge between v3/v4. There was a few bad bugs, like with Dialog positioning and missing animations that this fixed. Since v4 is pretty much out and is slated to become the new standard within 6-9 months, we don't have much choice but to use backwards-compatible classes until we can realistically ignore v3. (And there's not that many differences to keep in mind). We can't go full-on v4 yet because at the moment there's two immovable obstacles:
Small cosmetic differences like whether the corner rounding is 2px or 4px don't matter—when v4 for the browser is out, we'll update CSB links to use v4 and this will be resolved. |
Docs feedback
How can we improve Base UI documentation?
The Tailwind examples in the documentation are built with Tailwind 4. As far as I can tell, this isn't noted anywhere. Copying the examples in many cases will result in inconsistencies between the example and the pasted result in any project that doesn't use Tailwind 4 (which I'd assume is the vast majority of them right now) due to the changes to some defaults (e.g. dialogs have a bigger outline).
As long as Tailwind 4 isn't the current version, it is probably worth indicating somewhere that the examples are assuming the use of v4. I'd suggest just changing the text in the style dropdown from "Tailwind CSS" to "Tailwind CSS v4".
The text was updated successfully, but these errors were encountered: