Tailwind_formatter

screenshot of Tailwind_formatter
tailwind

Tailwind_formatter

Sorts tailwind classes within elixir projects

Overview:

TailwindFormatter is a mix format plugin designed to sort TailwindCSS classes used in HEEx templates and ~H sigils. This tool, inspired by Tailwind's official Prettier plugin, enhances code organization by following a set of rules while formatting TailwindCSS classes. The formatter requires Elixir v1.15 or later to function properly.

Features:

  • Opinionated Sorting: TailwindFormatter sorts classes based on specific rules, enhancing code readability.
  • Installation Assistance: Provides clear guidelines for adding TailwindFormatter to Elixir projects.
  • Custom TailwindCSS Configuration Support: Allows appending custom TailwindCSS configurations for tailored formatting.
  • Usage Convenience: Performing automatic formatting of Tailwind classes by simply running mix format.
  • Divergence from Original Formatter: Highlights differences in sorting algorithm from the original Tailwind Prettier plugin for Elixir use cases.

Summary:

tailwind
Tailwind

Tailwind CSS is a utility-first CSS framework that provides pre-defined classes for building responsive and customizable user interfaces.