A comprehensive Python port of tailwind-merge - intelligently merge Tailwind CSS classes
Project description
starMERGE
A comprehensive Python port of tailwind-merge - intelligently merge Tailwind CSS classes without style conflicts.
Description
starmerge is a utility function to efficiently merge Tailwind CSS classes in Python without style conflicts. This is a complete port of the popular JavaScript library tailwind-merge.
from starmerge import merge
merge("px-2 py-1 bg-red hover:bg-dark-red", "p-3 bg-[#B91C1C]")
# → 'hover:bg-dark-red p-3 bg-[#B91C1C]'
Installation
pip install starmerge
Features
- ✅ Full class merging functionality with conflict resolution
- ✅ Support for Tailwind v4.x syntax
- ✅ Handles arbitrary values, modifiers, and variants
- ✅ Comprehensive test coverage matching the original library
- ✅ Production-ready and battle-tested
Requirements
- Python 3.11+
- Works with Tailwind CSS v4.x
Contributing
Contributions are welcome! Feel free to open issues for bugs or unexpected behavior, or submit pull requests with improvements.
Credits
This is a port of tailwind-merge by Dany Castillo. All credit for the original implementation goes to the original authors.
License
Licensed under the MIT License. This is a port of tailwind-merge which is also licensed under the MIT License.
Disclaimer
This is an independent port and is not officially affiliated with or endorsed by the original tailwind-merge project or Tailwind CSS.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file starmerge-0.2.1.tar.gz.
File metadata
- Download URL: starmerge-0.2.1.tar.gz
- Upload date:
- Size: 59.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d3682de1cef09f5535009180648cdf1e0c6c6f64f4ed69cf908d3f6f1cc8bbb
|
|
| MD5 |
6861c402b224d18b92eeda8c72304328
|
|
| BLAKE2b-256 |
f855b4f987b4e7890a3cdefcb1a22a35c53a6653d11024bed7ac3ca1921a8826
|
Provenance
The following attestation bundles were made for starmerge-0.2.1.tar.gz:
Publisher:
release.yml on banditburai/starmerge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
starmerge-0.2.1.tar.gz -
Subject digest:
9d3682de1cef09f5535009180648cdf1e0c6c6f64f4ed69cf908d3f6f1cc8bbb - Sigstore transparency entry: 1006695981
- Sigstore integration time:
-
Permalink:
banditburai/starmerge@bb204f789de6637580dee14378aa419efa0d07c6 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/banditburai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@bb204f789de6637580dee14378aa419efa0d07c6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file starmerge-0.2.1-py3-none-any.whl.
File metadata
- Download URL: starmerge-0.2.1-py3-none-any.whl
- Upload date:
- Size: 22.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6318357a70fb698888cec34039c34006d48be2f738f339d797529146c6b89f1
|
|
| MD5 |
2a23263c4a1997fb1aa273a4a09fb2c5
|
|
| BLAKE2b-256 |
e4d0b72f72e81f2c4447631e420fca16acfe3dd9f3edc0a545adb1a9b8db0114
|
Provenance
The following attestation bundles were made for starmerge-0.2.1-py3-none-any.whl:
Publisher:
release.yml on banditburai/starmerge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
starmerge-0.2.1-py3-none-any.whl -
Subject digest:
e6318357a70fb698888cec34039c34006d48be2f738f339d797529146c6b89f1 - Sigstore transparency entry: 1006695983
- Sigstore integration time:
-
Permalink:
banditburai/starmerge@bb204f789de6637580dee14378aa419efa0d07c6 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/banditburai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@bb204f789de6637580dee14378aa419efa0d07c6 -
Trigger Event:
push
-
Statement type: