Skip to content
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

Version 4 (v4) Upgrade Guide does not mention safelist #2015

Open
ridler opened this issue Jan 27, 2025 · 1 comment
Open

Version 4 (v4) Upgrade Guide does not mention safelist #2015

ridler opened this issue Jan 27, 2025 · 1 comment

Comments

@ridler
Copy link

ridler commented Jan 27, 2025

The safelist property seems to have been removed from the tailwind config object

image

I cannot find any mention of this in the upgrade guide:
https://tailwindcss.com/docs/upgrade-guide#changes-from-v3

This v4 alpha announcement implies that this was going to be supported before a stable release:
https://tailwindcss.com/blog/tailwindcss-v4-alpha

The issue is that the upgrade guide seems incomplete without a mention of this as a breaking change, or guidance on how to upgrade for those of us who rely on the functionality provided by safelist

These discussion questions indicate similar confusion:
tailwindlabs/tailwindcss#14462
tailwindlabs/tailwindcss#15291

@rozsazoltan
Copy link

rozsazoltan commented Jan 29, 2025

https://tailwindcss.com/docs/functions-and-directives#config-directive

Use the @config directive to load a legacy JavaScript-based configuration file:

@config "../../tailwind.config.js";

The corePlugins, safelist and separator options from the JavaScript-based config are not supported in v4.0.

Nevertheless, you're right. By the way, an alternative should be written in the Docs. The safelist was commonly used in packages, which were then used by a further third party.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants