Skip to content

Repository files navigation

Tailwind Processor

codecov

This is a Python package that processes Tailwind CSS classes into a single raw CSS string. It's super modular and simple, you can just copy the class directly and use it in your code. Just make sure to install pytailwindcss first.

It uses GO style error handling.

Installation

pip install tailwind-processor

Usage

from tailwind_processor import TailwindProcessor

tp = TailwindProcessor()

result, err = tp.process(["text-red-500", "h-dvh"])
if err:
    # Or do another thing
    raise err

file_content = textwrap.dedent("""
    <div class="text-red-500 h-dvh">
        Hey!
    </div>
""")

result, err = tp.process_file_str(file_content)

if err:
    # Or do another thing
    raise err

About

Processes Tailwind CSS classes into a string

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages