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

Remove double translate-z-px values #16718

Merged
merged 3 commits into from
Feb 21, 2025
Merged

Conversation

RobinMalfait
Copy link
Member

This PR fixes an issue where if you used translate-z-px or -translate-z-px that the utility was generated twice:

.translate-z-px {
  --tw-translate-z: 1px;
  translate: var(--tw-translate-x) var(--tw-translate-y) var(--tw-translate-z);
}
.translate-z-px {
  --tw-translate-z: 1px;
  translate: var(--tw-translate-x) var(--tw-translate-y) var(--tw-translate-z);
}
@property --tw-translate-x {
  syntax: "*";
  inherits: false;
  initial-value: 0;
}
@property --tw-translate-y {
  syntax: "*";
  inherits: false;
  initial-value: 0;
}
@property --tw-translate-z {
  syntax: "*";
  inherits: false;
  initial-value: 0;
}

With this PR, it will only generate once:

.translate-z-px {
  --tw-translate-z: 1px;
  translate: var(--tw-translate-x) var(--tw-translate-y) var(--tw-translate-z);
}
@property --tw-translate-x {
  syntax: "*";
  inherits: false;
  initial-value: 0;
}
@property --tw-translate-y {
  syntax: "*";
  inherits: false;
  initial-value: 0;
}
@property --tw-translate-z {
  syntax: "*";
  inherits: false;
  initial-value: 0;
}

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
- update test to include `translate-z-px` and `-translate-z-px`
- remove the additional `translate: …` properties

These should be fixed by the next commit
These are already covered by the `translate` functional utility.
@RobinMalfait RobinMalfait force-pushed the fix/double-translate-z-px branch from ffbcd26 to 1bdf94a Compare February 21, 2025 14:05
@RobinMalfait RobinMalfait enabled auto-merge (squash) February 21, 2025 14:06
@RobinMalfait RobinMalfait merged commit b47b6d2 into main Feb 21, 2025
5 checks passed
@RobinMalfait RobinMalfait deleted the fix/double-translate-z-px branch February 21, 2025 14:08
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 this pull request may close these issues.

None yet

2 participants