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

[Bug]: JIT: media break points do not generate for postcss7-compat #4680

Closed
gcavanunez opened this issue Jun 17, 2021 · 7 comments · Fixed by #4695
Closed

[Bug]: JIT: media break points do not generate for postcss7-compat #4680

gcavanunez opened this issue Jun 17, 2021 · 7 comments · Fixed by #4695

Comments

@gcavanunez
Copy link

What version of Tailwind CSS are you using?

v2.2.0

What build tool (or framework if it abstracts the build tool) are you using?

@vue/cli 4.5.12 | postcss 7

What version of Node.js are you using?

v15.6.0

What browser are you using?

Chrome

What operating system are you using?

Windows

Reproduction repository

https://github.com/gcavanunez/tailwindcss-jit-prefix-vue-sample

Describe your issue

Hello, first of congrats on the new release, tons of awesome features I can't imagine shipping the features can be simple.

Describe the bug
When enabling the JIT mode media queries are not generated properly.

Additional context
I initially found the issue while working with a prefix key then to make sure if it was an issue only with the prefix key activated I disabled it and ran it against the Base.vue file that's a copy of the play.tailwindcss.com.

I'm using postcss to compile to further isolate the issue, I tried using the tailwind cli but since it requires postcss 8 to work was unable to use it, some of the code from another example component I've extracted contains vuetify components, but bringing it on board to demonstrate the issue is not necessary.
To Reproduce

  1. yarn dev-tw-sample
  2. view the tw.build.css under src directory

Screenshots
image

Issues/Pull requests that touch on the issue
#4078
#4151
#4034 (comment)

@charklewis
Copy link

charklewis commented Jun 18, 2021

I have also found that when enabling dark mode, the darkMode classes are always applied (no matter what). I have followed to use tailwind exactly as in the create-react-app guide.

My config looks like:

const colors = require("tailwindcss/colors")

module.exports = {
  mode: "jit",
  purge: ["./src/**/*.{js,jsx,ts,tsx}", "./public/index.html"],
  darkMode: "media",
  theme: {
    extend: {
      colors: {
        transparent: "transparent",
        current: "currentColor",
        black: colors.black,
        white: colors.white,
        gray: colors.trueGray,
        indigo: colors.indigo,
        red: colors.rose,
        yellow: colors.amber
      }
    }
  }
  plugins: [require("@tailwindcss/forms")]
}

@amaelftah
Copy link

i have the same issue too

@w99910
Copy link

w99910 commented Jun 18, 2021

I'm having the same issue too.

@imjohnlouie04
Copy link

media query got break to my project too

@adamwathan
Copy link
Member

Should be fixed in v2.2.1! 🥳

@imjohnlouie04
Copy link

Should be fixed in v2.2.1! 🥳

Got tested on my project and viola working properly.. love it

@maximeg
Copy link
Contributor

maximeg commented Jun 18, 2021

Nickel !

Thanks

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

Successfully merging a pull request may close this issue.

7 participants