Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

starmerge-0.2.1.tar.gz (59.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

starmerge-0.2.1-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

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

Hashes for starmerge-0.2.1.tar.gz
Algorithm Hash digest
SHA256 9d3682de1cef09f5535009180648cdf1e0c6c6f64f4ed69cf908d3f6f1cc8bbb
MD5 6861c402b224d18b92eeda8c72304328
BLAKE2b-256 f855b4f987b4e7890a3cdefcb1a22a35c53a6653d11024bed7ac3ca1921a8826

See more details on using hashes here.

Provenance

The following attestation bundles were made for starmerge-0.2.1.tar.gz:

Publisher: release.yml on banditburai/starmerge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for starmerge-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e6318357a70fb698888cec34039c34006d48be2f738f339d797529146c6b89f1
MD5 2a23263c4a1997fb1aa273a4a09fb2c5
BLAKE2b-256 e4d0b72f72e81f2c4447631e420fca16acfe3dd9f3edc0a545adb1a9b8db0114

See more details on using hashes here.

Provenance

The following attestation bundles were made for starmerge-0.2.1-py3-none-any.whl:

Publisher: release.yml on banditburai/starmerge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page