You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Supports Tailwind v3.0 (if you use Tailwind v2, use [tailwind-merge v0.9.0](https://github.com/dcastil/tailwind-merge/tree/v0.9.0))
19
+
- Supports Tailwind v3.0 up to v3.1 (if you use Tailwind v2, use [tailwind-merge v0.9.0](https://github.com/dcastil/tailwind-merge/tree/v0.9.0))
20
20
- Works in Node >=12 and all modern browsers
21
21
- Fully typed
22
22
-[Check bundle size on Bundlephobia](https://bundlephobia.com/package/tailwind-merge)
Watch out for mixing arbitrary properties which could be expressed as Tailwind classes. tailwind-merge does not resolve conflicts between arbitrary properties and their matching Tailwind classes to keep the bundle size small.
Similarly to arbitrary properties, tailwind-merge does not resolve conflicts between arbitrary variants and their matching predefined modifiers for bundle size reasons.
Copy file name to clipboardexpand all lines: src/lib/merge-classlist.ts
+74-24
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,6 @@ import { ConfigUtils } from './config-utils'
2
2
3
3
constSPLIT_CLASSES_REGEX=/\s+/
4
4
constIMPORTANT_MODIFIER='!'
5
-
// Regex is needed, so we don't match against colons in labels for arbitrary values like `text-[color:var(--mystery-var)]`
6
-
// I'd prefer to use a negative lookbehind for all supported labels, but lookbehinds don't have good browser support yet. More info: https://caniuse.com/js-regexp-lookbehind
0 commit comments