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

Disable transform optimizations #694

Merged
merged 1 commit into from Mar 7, 2024

Conversation

RobinMalfait
Copy link
Contributor

This PR disables transform optimizations for now because they are causing issues for CSS transitions and @keyframes. This is because currently minification only minifies if the result is actually shorter.

There are situations where this is not the case:

@keyframes rain {
  0% {transform: translateY(0vh) rotate(0deg);}
  100% {transform: translateY(120vh) rotate(360deg);}
}

Gets optimized to:

 @keyframes rain {
  0% {transform: matrix(1, 0, 0, 1, 0, 0);}
  100% {transform: translateY(120vh) rotate(360deg);}
}

The issue is that this means that the transform property is no longer animatable because different steps in the keyframes have different properties.

I didn't just drop the code, but commented it out with a TODO to the linked issue so that it's easier to re-enable it later.

Fixes: #288

@devongovett devongovett merged commit e37b9ed into parcel-bundler:master Mar 7, 2024
3 checks passed
sungik-choi pushed a commit to channel-io/bezier-react that referenced this pull request Mar 18, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [lightningcss](https://togithub.com/parcel-bundler/lightningcss) |
[`1.24.0` ->
`1.24.1`](https://renovatebot.com/diffs/npm/lightningcss/1.24.0/1.24.1)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/lightningcss/1.24.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/lightningcss/1.24.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/lightningcss/1.24.0/1.24.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/lightningcss/1.24.0/1.24.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>parcel-bundler/lightningcss (lightningcss)</summary>

###
[`v1.24.1`](https://togithub.com/parcel-bundler/lightningcss/releases/tag/v1.24.1)

[Compare
Source](https://togithub.com/parcel-bundler/lightningcss/compare/v1.24.0...v1.24.1)

- Disabled CSS `transform` optimizations using `matrix()`, which could
break transitions and animations. –
[parcel-bundler/lightningcss#694
- Merge `@supports` declarations with the same property (minus vendor
prefix) and value –
[`6bd2761`](https://togithub.com/parcel-bundler/lightningcss/commit/6bd2761badb9d5434783acffcae35ef6c3311e06)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "on Monday after 10am before 7pm" in
timezone Asia/Seoul, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/channel-io/bezier-react).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNDUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjI0NS4wIiwidGFyZ2V0QnJhbmNoIjoiYWxwaGEifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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.

CSS transform optimisation breaks animation
2 participants