lnkr-a/tailwindcss-typed - version: 2.0.1

for more information visit the package's GitHub page

Package contains the following modules:

Tailwind CSS Typed

Definition of Tailwind CSS classes as Elm types.

Library is inspirated by afidegnum/elm-tailwind, but I used types instead functions with all advantages and disadvantages.

Example

Look in div's attribute list.

import TailwindCSS exposing (..)
import Html exposing (Html, div, text)

view : String -> Html msg
view str =
  div [ tailwind [ TextGreen400, HOVER BgYellow400 ] ]
    [ text "Green \"" ++ str ++ "\" with yellow background on hover"
    ]

If you call view "Hello world!" you get something like this:

<div class="text-green-400 hover:bg-yellow-400">
    Green "Hello world!" with yellow background on hover
</div>

Naming conventions

Examples (TailwindCSS type to Tailwind Css class):