tailwind-merge
Advanced tools
Comparing version 2.5.0-dev.0ba31f3c3d64f1f4c334d97ec569d6a2ece5c759 to 2.5.0-dev.41e589bb317c8203857f9293af64c6c9cbf3ddf7
{ | ||
"name": "tailwind-merge", | ||
"version": "2.5.0-dev.0ba31f3c3d64f1f4c334d97ec569d6a2ece5c759", | ||
"version": "2.5.0-dev.41e589bb317c8203857f9293af64c6c9cbf3ddf7", | ||
"description": "Merge Tailwind CSS classes without style conflicts", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -6,3 +6,3 @@ <!-- This file is autogenerated. If you want to change this content, please do the changes in `./docs/README.md` instead. --> | ||
<a href="https://github.com/dcastil/tailwind-merge"> | ||
<img src="https://github.com/dcastil/tailwind-merge/raw/0ba31f3c3d64f1f4c334d97ec569d6a2ece5c759/assets/logo.svg" alt="tailwind-merge" height="150px" /> | ||
<img src="https://github.com/dcastil/tailwind-merge/raw/41e589bb317c8203857f9293af64c6c9cbf3ddf7/assets/logo.svg" alt="tailwind-merge" height="150px" /> | ||
</a> | ||
@@ -29,12 +29,12 @@ </div> | ||
- [What is it for](https://github.com/dcastil/tailwind-merge/tree/0ba31f3c3d64f1f4c334d97ec569d6a2ece5c759/docs/what-is-it-for.md) | ||
- [When and how to use it](https://github.com/dcastil/tailwind-merge/tree/0ba31f3c3d64f1f4c334d97ec569d6a2ece5c759/docs/when-and-how-to-use-it.md) | ||
- [Features](https://github.com/dcastil/tailwind-merge/tree/0ba31f3c3d64f1f4c334d97ec569d6a2ece5c759/docs/features.md) | ||
- [Limitations](https://github.com/dcastil/tailwind-merge/tree/0ba31f3c3d64f1f4c334d97ec569d6a2ece5c759/docs/limitations.md) | ||
- [Configuration](https://github.com/dcastil/tailwind-merge/tree/0ba31f3c3d64f1f4c334d97ec569d6a2ece5c759/docs/configuration.md) | ||
- [Recipes](https://github.com/dcastil/tailwind-merge/tree/0ba31f3c3d64f1f4c334d97ec569d6a2ece5c759/docs/recipes.md) | ||
- [API reference](https://github.com/dcastil/tailwind-merge/tree/0ba31f3c3d64f1f4c334d97ec569d6a2ece5c759/docs/api-reference.md) | ||
- [Writing plugins](https://github.com/dcastil/tailwind-merge/tree/0ba31f3c3d64f1f4c334d97ec569d6a2ece5c759/docs/writing-plugins.md) | ||
- [Versioning](https://github.com/dcastil/tailwind-merge/tree/0ba31f3c3d64f1f4c334d97ec569d6a2ece5c759/docs/versioning.md) | ||
- [Contributing](https://github.com/dcastil/tailwind-merge/tree/0ba31f3c3d64f1f4c334d97ec569d6a2ece5c759/docs/contributing.md) | ||
- [Similar packages](https://github.com/dcastil/tailwind-merge/tree/0ba31f3c3d64f1f4c334d97ec569d6a2ece5c759/docs/similar-packages.md) | ||
- [What is it for](https://github.com/dcastil/tailwind-merge/tree/41e589bb317c8203857f9293af64c6c9cbf3ddf7/docs/what-is-it-for.md) | ||
- [When and how to use it](https://github.com/dcastil/tailwind-merge/tree/41e589bb317c8203857f9293af64c6c9cbf3ddf7/docs/when-and-how-to-use-it.md) | ||
- [Features](https://github.com/dcastil/tailwind-merge/tree/41e589bb317c8203857f9293af64c6c9cbf3ddf7/docs/features.md) | ||
- [Limitations](https://github.com/dcastil/tailwind-merge/tree/41e589bb317c8203857f9293af64c6c9cbf3ddf7/docs/limitations.md) | ||
- [Configuration](https://github.com/dcastil/tailwind-merge/tree/41e589bb317c8203857f9293af64c6c9cbf3ddf7/docs/configuration.md) | ||
- [Recipes](https://github.com/dcastil/tailwind-merge/tree/41e589bb317c8203857f9293af64c6c9cbf3ddf7/docs/recipes.md) | ||
- [API reference](https://github.com/dcastil/tailwind-merge/tree/41e589bb317c8203857f9293af64c6c9cbf3ddf7/docs/api-reference.md) | ||
- [Writing plugins](https://github.com/dcastil/tailwind-merge/tree/41e589bb317c8203857f9293af64c6c9cbf3ddf7/docs/writing-plugins.md) | ||
- [Versioning](https://github.com/dcastil/tailwind-merge/tree/41e589bb317c8203857f9293af64c6c9cbf3ddf7/docs/versioning.md) | ||
- [Contributing](https://github.com/dcastil/tailwind-merge/tree/41e589bb317c8203857f9293af64c6c9cbf3ddf7/docs/contributing.md) | ||
- [Similar packages](https://github.com/dcastil/tailwind-merge/tree/41e589bb317c8203857f9293af64c6c9cbf3ddf7/docs/similar-packages.md) |
@@ -17,11 +17,18 @@ import { ConfigUtils } from './config-utils' | ||
let result = '' | ||
let index = classList.length - 1 | ||
for (let i = classList.length - 1; i >= 0; ) { | ||
while (classList[i] === ' ') { | ||
--i | ||
while (index >= 0) { | ||
while (classList[index] === ' ') { | ||
index -= 1 | ||
} | ||
const nextI = classList.lastIndexOf(' ', i) | ||
const originalClassName = classList.slice(nextI === -1 ? 0 : nextI + 1, i + 1) | ||
i = nextI | ||
if (index < 0) { | ||
break | ||
} | ||
const nextIndex = classList.lastIndexOf(' ', index) | ||
const originalClassName = classList.slice(nextIndex + 1, index + 1) | ||
index = nextIndex | ||
const { modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition } = | ||
@@ -28,0 +35,0 @@ parseClassName(originalClassName) |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
709315
15527