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

Allow arbitrary values with percentage in classes that support numbers and percentage values #298

Open
dcastil opened this issue Aug 23, 2023 · 2 comments
Labels
context-v1 Related to tailwind-merge v1 feature request

Comments

@dcastil
Copy link
Owner

dcastil commented Aug 23, 2023

There are some classes which support numbers and percentages as arbitrary values in Tailwind CSS, e.g. brightness-[0.4] and brightness-[40%] are both equivalent. In tailwind-merge however, only numbers are supported in those. I should also add support for percentage values in those classes.

Affected theme groups:

  • brightness
  • contrast
  • saturate
  • scale
@dcastil
Copy link
Owner Author

dcastil commented Aug 23, 2023

@dcastil
Copy link
Owner Author

dcastil commented Aug 23, 2023

Also the opacity theme group should only check for isArbitraryValue (e.g. by getNumberAndArbitrary()) since those classes are never ambiguous.

@dcastil dcastil added the context-v1 Related to tailwind-merge v1 label Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
context-v1 Related to tailwind-merge v1 feature request
Projects
None yet
Development

No branches or pull requests

1 participant