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

@astro/tailwind is not adding prefixes in devmode #5989

Closed
1 task done
royeden opened this issue Jan 26, 2023 · 2 comments · Fixed by #6002
Closed
1 task done

@astro/tailwind is not adding prefixes in devmode #5989

royeden opened this issue Jan 26, 2023 · 2 comments · Fixed by #6002
Assignees
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority)

Comments

@royeden
Copy link
Contributor

royeden commented Jan 26, 2023

What version of astro are you using?

2.0.1

Are you using an SSR adapter? If so, which one?

Vercel

What package manager are you using?

npm

What operating system are you using?

Linux

Describe the Bug

When updating to Astro 2.0 and the latest @astro/tailwind integration, vendor prefixes are no longer being added to classes when the dev server is running.

To specify:

<h1 class="bg-clip-text text-transparent bg-gradient-to-r from-cyan-500 to-blue-500">Test</h1>

poduces the following <style> injected into astro by vite:

.bg-clip-text {
  background-clip: text;
}

instead of the expected:

.bg-clip-text {
  -webkit-background-clip: text;
  background-clip: text;
}

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-hbvmrj

Participation

  • I am willing to submit a pull request for this issue.
@marcjulian
Copy link

I have noticed this behavioir too. I think this is because autoprefixer is only used during build and not in dev mode.

if (isBuild) {
postcssPlugins.push(autoprefixerPlugin());
}

@matthewp matthewp added the - P4: important Violate documented behavior or significantly impacts performance (priority) label Jan 26, 2023
@royeden
Copy link
Contributor Author

royeden commented Jan 26, 2023

It's actually documented on this commit on the changelog, this seems like an intentional fix, which strikes me as odd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants