But there is no Tailwind.Utilities.form_checkbox or Tailwind.Utilities.formCheckbox. According to the Package, the forms-plugin is included. What I am missing? The compiler-message is:
I cannot find a `Tailwind.Utilities.form_checkbox` variable:
108| [ Tailwind.Utilities.form_checkbox
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The `Tailwind.Utilities` module does not expose a `form_checkbox` variable.
These names seem close though:
Tailwind.Utilities.from_black
Tailwind.Utilities.font_black
Tailwind.Utilities.font_semibold
Tailwind.Utilities.from_current
Hint: Read <https://elm-lang.org/0.19.1/imports> to see how `import`
declarations work in Elm.
There’s two modes in which the tailwindcss/forms plugin can operate. The basic strategy and the class strategy (see this section of the project’s readme).
elm-default-tailwind-modules uses the forms plugin in its default configuration (see here). Thus, classes like form_checkbox won’t be generated.
With default settings, the styles will just be applied to your input element automatically. This should already work:
Yeah, sorry. This is due to tailwindcss’s reliance on ordering of CSS, and this is a particularly tricky case of it.
Unfortunately, elm-tailwind-modules can’t control the ordering of the final CSS, because that’s in the user’s control with elm-css. I’m working on fixing that.
In the mean time, you can use Css.important Tw.text_pink_500 to work around the issue.
Please keep up to date for a new version of elm-tailwind-modules
Hello @hans-helmut ,
I wasn’t quite pleased with the use of Css.important, so I changed the way elm-default-tailwind-modules are generated and am now generating the forms plugin using the “class” strategy.
This means, there are now definitions like form_checkbox generated.
Please check out version 2.0.1 and tell me what you think