fix: fix transition breaking the css layout #11166
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related to #11165 (includes example)
Remove unnecessary
fill: "forwards"
which prevents any future modification of animated properties. This is discouraged as stated in the official spec. This animation property breaks the layout in a very confusing manner since there's no way to see inside devtools why styles no longer have any effect on the element.I couldn't find the commit that explains why
forwards
was used in this case, butfill: 'none'
seems to work perfectly fine for transitions and makes it behave as expected.Alternative approach didn't seem to work, simply using
.cancel()
at finish doesn't fix the behavior and.commitStyles()
applies the styles to the element which is not a desired result.Before submitting the PR, please make sure you do the following
feat:
,fix:
,chore:
, ordocs:
.Tests and linting
pnpm test
and lint the project withpnpm lint