A small library that makes using tailwind.css a little easier and a little safer to use within Elm.
You'll find classes responding to Tailwind rules in Tailwind.Classes.
In there you'll also find functions for appending responsive qualifiers to those classes. Here's an example of what a div using tailwind might look like:
div
[ tailwind
<| withClasses [ "__login_page" ] -- __login_page is not a tailwind class, it's just for marking the div's purpose.
<| [ m_1, lg m_6 ]
]
stylesheet : Html msg
An HTML "link" tag that will import the default tailwind stylesheet
tailwind : List Classes.TailwindClass -> Html.Attribute msg
A convenience function for specifying classes as a list of strings
withClasses : List String -> List Classes.TailwindClass -> List Classes.TailwindClass
A convenience function for adding non-tailwind classes to an element alongside other tailwind classes. Could be used like this:
div
[ tailwind
<| withClasses [ "superfunclass" ]
<| [ sm mt_1 ]
]
asClasses : List Classes.TailwindClass -> List String
Turns tailwind classes into normal strings, for when you just want a list of strings instead of an Html.Attribute.