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

View Transitions: Fixes Astro's fade animation to prevent flicker during morph transitions #12046

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

martrapp
Copy link
Member

@martrapp martrapp commented Sep 20, 2024

Changes

Adds mix-blend-mode: plus-lighter to Astro's fade transitions
Fixes #12045

Testing

manually tested

Docs

n.a. / bug fix

Copy link

changeset-bot bot commented Sep 20, 2024

🦋 Changeset detected

Latest commit: 780db2d

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Sep 20, 2024
@martrapp
Copy link
Member Author

martrapp commented Sep 20, 2024

I tried hard to extend the generic solution in runtime/server/transition.ts with another dimension for CSS pseudo-classes or at least a hard-coded :only-child, in a way that is widely compatible with what we had before. And failed.

I have then buried my original doubts whether it might be a bad idea to set the mix-blend-mode for image-pairs with a single image, too.

Adding the mix-blend-mode to the @keyframes works without much bloat and has the desired effect, although it is now also set for image pairs with only one child.

@martrapp martrapp changed the title View Transitions: Fixes Astro's fade animation to prevent flashing during morph transitions View Transitions: Fixes Astro's fade animation to prevent flicker during morph transitions Sep 20, 2024
@ematipico ematipico merged commit d7779df into main Sep 26, 2024
13 checks passed
@ematipico ematipico deleted the mt/plusLighter branch September 26, 2024 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

View Transitions: Flickering images on morph transitions
2 participants