Skip to content

Remove double translate-z-px values#16718

Merged
RobinMalfait merged 3 commits intomainfrom
fix/double-translate-z-px
Feb 21, 2025
Merged

Remove double translate-z-px values#16718
RobinMalfait merged 3 commits intomainfrom
fix/double-translate-z-px

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; }
- 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

2 participants