Metadata-Version: 2.4
Name: tailwhip
Version: 0.9a1
Summary: A pure Python Tailwind CSS class sorter that works with any HTML or CSS file, including Django templates and other template languages.
Author-email: Martin Mahner <martin@mahner.org>
License-Expression: MIT
Project-URL: Homepage, https://github.com/bartTC/tailwhip/
Project-URL: Repository, https://github.com/bartTC/tailwhip/
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: rich
Requires-Dist: typer
Dynamic: license-file

# Tailwhip — Tailwind CSS class sorter

Tailwhip is a pure Python Tailwind CSS class sorter that works with any HTML or CSS 
file — including Django templates and other templating languages.

## Why Tailwhip?

The [official Prettier plugin][1] for sorting Tailwind classes doesn’t play well 
with many template languages, such as Django. While there are Prettier plugins that 
add limited support for [Jinja templates][2], they often require configuration 
workarounds or restrict what you can do with Prettier.

Tailwhip takes a more pragmatic approach. Instead of trying to parse and understand 
every possible template syntax, it focuses on sorting Tailwind classes reliably.

[1]: https://github.com/tailwindlabs/prettier-plugin-tailwindcss
[2]: https://github.com/davidodenwald/prettier-plugin-jinja-template

How it works:

1.	It finds all `class=""` attributes and `@apply` directives in the given files.
2.	It sorts the contained classes according to the official Tailwind CSS class order.
3.	If a class attribute contains template syntax (e.g., `{{ ... }}` or `{% ... %}`), 
    Tailwhip leaves it untouched.

This approach ensures Tailwhip works across diverse environments — Django, Flask, 
Jinja2, or even custom templating engines — without breaking your templates or 
requiring complicated setup.
