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

[JIT] apply: duplicate transform properties #5806

Closed
trurl-master opened this issue Oct 16, 2021 · 1 comment · Fixed by #5830
Closed

[JIT] apply: duplicate transform properties #5806

trurl-master opened this issue Oct 16, 2021 · 1 comment · Fixed by #5830

Comments

@trurl-master
Copy link

What version of Tailwind CSS are you using?

2.2.15 (also tested with 3.0.0-alpha.1 and 2.2.17)

Reproduction URL

https://play.tailwindcss.com/KkuBVniu30?file=css

Describe your issue

Using multiple transform-based properties (like translate-x and translate-y) results in duplicated transform property, eg

.absolute-center {
  @apply absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2;
}

Generates:

.absolute-center {
    position: absolute;
    top: 50%;
    left: 50%;
    --tw-translate-x: -50%;
    transform: var(--tw-transform);
    --tw-translate-y: -50%;
    transform: var(--tw-transform);
    transform: var(--tw-transform);
}
@RobinMalfait
Copy link
Member

This should be fixed, and will be available in Tailwind v3.

If you are using JIT mode, then you can already try it by using the v3 alpha version using npm install tailwindcss@insiders or yarn add tailwindcss@insiders.

If you are using AOT mode, then I would recommend you to try and switch to JIT mode first. If you can't do that for technical reasons / bugs, please open an issue with a minimal reproduction repo so that we can help.

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.

2 participants