Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doesn't work with tailwind #55

Closed
sibbng opened this issue Jan 6, 2020 · 1 comment
Closed

doesn't work with tailwind #55

sibbng opened this issue Jan 6, 2020 · 1 comment

Comments

@sibbng
Copy link

sibbng commented Jan 6, 2020

This plugin is not process tailwind classes. I'm importing tailwind in my css like that.

@import 'tailwindcss/base'; /*https://github.com/tailwindcss/tailwindcss/blob/master/base.css */
@import 'tailwindcss/components'; 
@import 'tailwindcss/utilities';
@import 'tailwindcss/screens';

These imports are using tailwind's @tailwind directive under the hood. I'm also using @fullhuman/postcss-purgecss in my project and it is process unused styles including tailwind ones.

@screen directives are working. Source code:

/* https://tailwindcss.com/docs/functions-and-directives/#screen */
@screen md {
  header {
    margin-left: 60px;
  }
}

Generated code:

@media (min-width: 568px) {
  [dir='rtl'] header {
    margin-left: 60px !important;
  }
}

Half Workaround: If i replace these imports with compiled ones it is works.

@import 'tailwindcss/dist/base'; /* https://github.com/tailwindcss/tailwindcss/blob/master/base.css */
@import 'tailwindcss/dist/components'; 
@import 'tailwindcss/dist/utilities';
@import 'tailwindcss/screens'; /* no compiled version */

But this is breaks my custom tailwind config.

@sibbng
Copy link
Author

sibbng commented Jan 10, 2020

Fixed. It was about postcss plugins order.

@sibbng sibbng closed this as completed Jan 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant