question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incorrect CSS order for plugin components and utilities

See original GitHub issue

Hi, Thanks for the awesome work.
I think there is a problem with order of CSS styles that come from plugins. I created a repo to reproduce this issue: https://github.com/saadeghi/windi-vs-tailwind-daisyui-class-order-issue

There’s a Tailwind CLI setup and Windi CLI setup. Both are using the daisyUI plugin and both are generating style for the same HTML. Tailwind result file is good and all rules have correct order.
But Windi result file has CSS rules with wrong order.

For example in Tailwind file, .btn-lg comes after .btn as it should,
but in Windi file .btn-lg comes before .btn which is wrong.
Since .btn-lg is a modifier class for .btn it should come after .btn

HTML:

  <button class='btn'>btn</button>
  <button class='btn btn-primary btn-sm'>btn btn-primary btn-sm</button>
  <button class='btn btn-lg'>btn btn-lg</button>

Tailwind output:

Windi output: Screen Shot 2021-06-16 at 12 30 52 am

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
antfucommented, Aug 9, 2021

Should be fixed in v3.1.7

3reactions
pkrogel-kwscommented, Aug 10, 2021

@offlinehacker @itpropro @MartinMa did v3.1.7 fix the issues for you? I’m still seeing the same problems.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tailwind CSS classes is not working in my project?
This error is due to tailwind not finding any classes to scan in what it 'thinks' is your HTML code directories.
Read more >
Using with Preprocessors - Tailwind CSS
A guide to using Tailwind with common CSS preprocessors like Sass, Less, and Stylus. Since Tailwind is a PostCSS plugin, there's nothing stopping...
Read more >
Integration for webpack - Windi CSS
Windi CSS Webpack Plugin is a language and framework agnostic way to implement Windi CSS in webpack apps. First Class Framework Support #....
Read more >
The best styling options for Next.js - LogRocket Blog
Whether you prefer utility CSS with its classes or prefer CSS-in-JS, ... Also, Next.js is a component-based framework, meaning it is easier ...
Read more >
Why I Don't Like Tailwind CSS | Aleksandr Hovhannisyan
Adam Wathan, CSS Utility Classes and "Separation of Concerns" ... But as we'll see, Tailwind doesn't actually solve this problem of ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found