-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
Improve support for arbitrary values #263
Merged
dcastil
merged 5 commits into
main
from
bugfix/255/improve-support-for-arbitrary-values
Jun 22, 2023
Merged
Improve support for arbitrary values #263
dcastil
merged 5 commits into
main
from
bugfix/255/improve-support-for-arbitrary-values
Jun 22, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size-limit report 📦
|
This was addressed in release v1.14.0. |
sebald
referenced
this pull request
in sebald/pattern-analyzer
Jul 22, 2023
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [tailwind-merge](https://togithub.com/dcastil/tailwind-merge) | [`1.13.2` -> `1.14.0`](https://renovatebot.com/diffs/npm/tailwind-merge/1.13.2/1.14.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/tailwind-merge/1.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/tailwind-merge/1.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/tailwind-merge/1.13.2/1.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/tailwind-merge/1.13.2/1.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>dcastil/tailwind-merge (tailwind-merge)</summary> ### [`v1.14.0`](https://togithub.com/dcastil/tailwind-merge/releases/tag/v1.14.0) [Compare Source](https://togithub.com/dcastil/tailwind-merge/compare/v1.13.2...v1.14.0) ##### New Features - Improve support for arbitrary values by [@​dcastil](https://togithub.com/dcastil) in [https://github.com/dcastil/tailwind-merge/pull/263](https://togithub.com/dcastil/tailwind-merge/pull/263) - Previously, tailwind-merge checked the content of the arbitrary value portion of a class in most cases to understand whether the type of the arbitrary value is correct (e.g. it checked for number followed by length unit for the length type). That lead to the issue that a class like `mt-[calc(theme(fontSize.4xl)/1.125)]` would not be recognized correctly because no length unit is present in the arbitrary value. - I changed the check of the arbitrary value to also pass when a `calc()`, `min()`, `max()` and `clamp()` function is used in the arbitrary value. - In ambiguous cases, you can use data type labels to mark the type of a class. [Read more](https://togithub.com/dcastil/tailwind-merge/blob/v1.14.0/docs/features.md#supports-arbitrary-values) - Moreover, I removed the check where the type of the arbitrary value is unambiguous. In the class `mt-[…]` the arbitrary value can only be a length, so I don't check for it. A consequence of this is that if you use non-Tailwind classes like `mt-[this-is-totally-not-tailwind]`, tailwind-merge will recognize it as a Tailwind class from now on. **Please don't use classes that look like Tailwind classes with arbitrary value but aren't Tailwind classes with tailwind-merge (in default config) to prevent incorrect merging behavior**. ##### Bug Fixes - Fix `col-span-full` class missing in default config by [@​dcastil](https://togithub.com/dcastil) in [https://github.com/dcastil/tailwind-merge/pull/267](https://togithub.com/dcastil/tailwind-merge/pull/267) - Fix arbitrary value with no present length unit not being recognized by [@​dcastil](https://togithub.com/dcastil) in [https://github.com/dcastil/tailwind-merge/pull/263](https://togithub.com/dcastil/tailwind-merge/pull/263) ##### Documentation - Add missing info about where to call config functions to docs by [@​dcastil](https://togithub.com/dcastil) in [https://github.com/dcastil/tailwind-merge/pull/264](https://togithub.com/dcastil/tailwind-merge/pull/264) **Full Changelog**: dcastil/tailwind-merge@v1.13.2...v1.14.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/sebald/pattern-analyzer). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4xMS4wIiwidXBkYXRlZEluVmVyIjoiMzYuMTEuMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
1 task
kkrishguptaa
referenced
this pull request
in kkrishguptaa/study-web3
Aug 7, 2023
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [tailwind-merge](https://togithub.com/dcastil/tailwind-merge) | [`1.13.2` -> `1.14.0`](https://renovatebot.com/diffs/npm/tailwind-merge/1.13.2/1.14.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/tailwind-merge/1.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/tailwind-merge/1.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/tailwind-merge/1.13.2/1.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/tailwind-merge/1.13.2/1.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>dcastil/tailwind-merge (tailwind-merge)</summary> ### [`v1.14.0`](https://togithub.com/dcastil/tailwind-merge/releases/tag/v1.14.0) [Compare Source](https://togithub.com/dcastil/tailwind-merge/compare/v1.13.2...v1.14.0) ##### New Features - Improve support for arbitrary values by [@​dcastil](https://togithub.com/dcastil) in [https://github.com/dcastil/tailwind-merge/pull/263](https://togithub.com/dcastil/tailwind-merge/pull/263) - Previously, tailwind-merge checked the content of the arbitrary value portion of a class in most cases to understand whether the type of the arbitrary value is correct (e.g. it checked for number followed by length unit for the length type). That lead to the issue that a class like `mt-[calc(theme(fontSize.4xl)/1.125)]` would not be recognized correctly because no length unit is present in the arbitrary value. - I changed the check of the arbitrary value to also pass when a `calc()`, `min()`, `max()` and `clamp()` function is used in the arbitrary value. - In ambiguous cases, you can use data type labels to mark the type of a class. [Read more](https://togithub.com/dcastil/tailwind-merge/blob/v1.14.0/docs/features.md#supports-arbitrary-values) - Moreover, I removed the check where the type of the arbitrary value is unambiguous. In the class `mt-[…]` the arbitrary value can only be a length, so I don't check for it. A consequence of this is that if you use non-Tailwind classes like `mt-[this-is-totally-not-tailwind]`, tailwind-merge will recognize it as a Tailwind class from now on. **Please don't use classes that look like Tailwind classes with arbitrary value but aren't Tailwind classes with tailwind-merge (in default config) to prevent incorrect merging behavior**. ##### Bug Fixes - Fix `col-span-full` class missing in default config by [@​dcastil](https://togithub.com/dcastil) in [https://github.com/dcastil/tailwind-merge/pull/267](https://togithub.com/dcastil/tailwind-merge/pull/267) - Fix arbitrary value with no present length unit not being recognized by [@​dcastil](https://togithub.com/dcastil) in [https://github.com/dcastil/tailwind-merge/pull/263](https://togithub.com/dcastil/tailwind-merge/pull/263) ##### Documentation - Add missing info about where to call config functions to docs by [@​dcastil](https://togithub.com/dcastil) in [https://github.com/dcastil/tailwind-merge/pull/264](https://togithub.com/dcastil/tailwind-merge/pull/264) **Full Changelog**: dcastil/tailwind-merge@v1.13.2...v1.14.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/xkrishguptaa/dapp-study-resources). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi44LjExIiwidXBkYXRlZEluVmVyIjoiMzYuMjcuMSIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->
1 task
diegohaz
referenced
this pull request
in ariakit/ariakit
Aug 24, 2023
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [tailwind-merge](https://togithub.com/dcastil/tailwind-merge) | [`1.13.2` -> `1.14.0`](https://renovatebot.com/diffs/npm/tailwind-merge/1.13.2/1.14.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/tailwind-merge/1.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/tailwind-merge/1.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/tailwind-merge/1.13.2/1.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/tailwind-merge/1.13.2/1.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>dcastil/tailwind-merge (tailwind-merge)</summary> ### [`v1.14.0`](https://togithub.com/dcastil/tailwind-merge/releases/tag/v1.14.0) [Compare Source](https://togithub.com/dcastil/tailwind-merge/compare/v1.13.2...v1.14.0) ##### New Features - Improve support for arbitrary values by [@​dcastil](https://togithub.com/dcastil) in [https://github.com/dcastil/tailwind-merge/pull/263](https://togithub.com/dcastil/tailwind-merge/pull/263) - Previously, tailwind-merge checked the content of the arbitrary value portion of a class in most cases to understand whether the type of the arbitrary value is correct (e.g. it checked for number followed by length unit for the length type). That lead to the issue that a class like `mt-[calc(theme(fontSize.4xl)/1.125)]` would not be recognized correctly because no length unit is present in the arbitrary value. - I changed the check of the arbitrary value to also pass when a `calc()`, `min()`, `max()` and `clamp()` function is used in the arbitrary value. - In ambiguous cases, you can use data type labels to mark the type of a class. [Read more](https://togithub.com/dcastil/tailwind-merge/blob/v1.14.0/docs/features.md#supports-arbitrary-values) - Moreover, I removed the check where the type of the arbitrary value is unambiguous. In the class `mt-[…]` the arbitrary value can only be a length, so I don't check for it. A consequence of this is that if you use non-Tailwind classes like `mt-[this-is-totally-not-tailwind]`, tailwind-merge will recognize it as a Tailwind class from now on. **Please don't use classes that look like Tailwind classes with arbitrary value but aren't Tailwind classes with tailwind-merge (in default config) to prevent incorrect merging behavior**. ##### Bug Fixes - Fix `col-span-full` class missing in default config by [@​dcastil](https://togithub.com/dcastil) in [https://github.com/dcastil/tailwind-merge/pull/267](https://togithub.com/dcastil/tailwind-merge/pull/267) - Fix arbitrary value with no present length unit not being recognized by [@​dcastil](https://togithub.com/dcastil) in [https://github.com/dcastil/tailwind-merge/pull/263](https://togithub.com/dcastil/tailwind-merge/pull/263) ##### Documentation - Add missing info about where to call config functions to docs by [@​dcastil](https://togithub.com/dcastil) in [https://github.com/dcastil/tailwind-merge/pull/264](https://togithub.com/dcastil/tailwind-merge/pull/264) **Full Changelog**: dcastil/tailwind-merge@v1.13.2...v1.14.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/ariakit/ariakit). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi41Ni4wIiwidXBkYXRlZEluVmVyIjoiMzYuNTYuMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
context-v1
Related to tailwind-merge v1
feature
Is new feature
needs changelog edit
Needs edit in changelog before release
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #255