matheus23 / elm-tailwind-modules

Generate Elm code for Tailwind Utilities and Components that purges using Elm's dead code elimination!
https://matheus23.github.io/elm-tailwind-modules/
117 stars 12 forks source link

Tailwind 2.0 2xl breakpoint causes invalid Elm code #3

Closed mcasper closed 3 years ago

mcasper commented 3 years ago

Hey folks, thank you for this wonderful tool!

It looks like the (relatively) new 2xl breakpoint introduced in Tailwind 2.0 causes this library to generate invalid Elm functions: https://blog.tailwindcss.com/tailwindcss-v2#extra-wide-2-xl-breakpoint

Compiling ...-- WEIRD DECLARATION -------------------------------- src/Tailwind/Utilities.elm

I am trying to parse a declaration, but I am getting stuck here:

11196| 2xl__absolute : Css.Style

This is easy to work around by disabling the breakpoint in your tailwind config, but just wanted to report it in case it wasn't known.

matheus23 commented 3 years ago

Hi Matt, thanks for the kind words.

Yes, we should fix this.

Just wanted to let you (or anyone reading this) know you should not have to disable the breakpoint, but instead disable variants in your tailwind config via this setting: variants: [].