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

Responsive class names have no effect #6

Open
5ergiu opened this issue Feb 11, 2025 · 0 comments
Open

Responsive class names have no effect #6

5ergiu opened this issue Feb 11, 2025 · 0 comments

Comments

@5ergiu
Copy link

5ergiu commented Feb 11, 2025

In the tailwind documentation, it clearly states that class names shouldn't be build dynamically. This is obviously not the case for responsive classes.

For example, if we have a Box component and try to setup responsive class names for cols, gaps, etc. the dynamic class names will only be resolved if they already exist in the code without being added dynamically, if not, they do not work.

Possible solution:

  • for Tailwind v3: we could include the classes in the safelit
  • for Tailwind v4: there is no way, as of yet, to safelist classes, we could just add all the responsive variants for each gap and grid-cols class
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

1 participant