mrmcc3 / tailwind-clj

Clojure library for processing tailwind utility classes
Other
33 stars 4 forks source link

Rule ordering in generated css #2

Open mrmcc3 opened 5 years ago

mrmcc3 commented 5 years ago

At the moment rules are sorted by class name before writing the css this is most likely a mistake. should investigate how tailwind orders css output

retro commented 4 years ago

From my research it seems that the order of classes for one media query are not important, but it's important to order media query groups (to ensure correct precedence of CSS rules). So something like:

  1. default classes
  2. sm classes
  3. md classes

BTW, this looks like a great project, I was about to start implementing something very similar my self. Are you looking for contributors?

mrmcc3 commented 4 years ago

Yep that matches my understanding of how the classes should be ordered. I think the current behaviour spits the media query groups out in order, the classes within each group are just sorted by name.

Since I wrote this there's been a fair bit of change in the tailwind space.

Anyway I'd be happy to accept contributions