Skip to main content

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.

Metadata

Release files for starmerge 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for starmerge 0.2.1
File Size Uploaded
starmerge-0.2.1.tar.gz 59.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for starmerge 0.2.1
File Interpreter ABI Platform
starmerge-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 81.9 kB

Release files / starmerge-0.2.1.tar.gz

Download URL starmerge-0.2.1.tar.gz
Size 59.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9d3682de1cef09f5535009180648cdf1e0c6c6f64f4ed69cf908d3f6f1cc8bbb
BLAKE2b-256 checksum
How to use checksums
f855b4f987b4e7890a3cdefcb1a22a35c53a6653d11024bed7ac3ca1921a8826
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 1, 2026.

Transparency log

Release files / starmerge-0.2.1-py3-none-any.whl

Download URL starmerge-0.2.1-py3-none-any.whl
Size 22.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e6318357a70fb698888cec34039c34006d48be2f738f339d797529146c6b89f1
BLAKE2b-256 checksum
How to use checksums
e4d0b72f72e81f2c4447631e420fca16acfe3dd9f3edc0a545adb1a9b8db0114
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 1, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page