tailwind_filter Tailwind Templates

Tailwind_filter

TailwindFilter

This package filters a string containing tailwind classes to prevent conflicting classes from happening.

Installation

If available in Hex, the package can be installed by adding tailwind_filter to your list of dependencies in mix.exs:

def deps do
  [
    {:tailwind_filter, "~> 0.1.0"}
  ]
end

Usage

iex> TailwindFilter.filter("p-2 bg-red-200 hover:bg-red-100 m-2 bg-blue-100 hover:bg-blue-50")
"p-2 m-2 bg-blue-100 hover:bg-blue-50"

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/tailwind_filter.

Top categories

Loading Svelte Themes