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

feat: add CSS variable to customize the <media-controller> hide transition #1051

Merged
merged 3 commits into from
Jan 28, 2025

Conversation

R-Delfino95
Copy link
Contributor

@R-Delfino95 R-Delfino95 commented Jan 14, 2025

Related to #874

  • Added --media-control-transition-out CSS variable to optionally change the transition effect when hiding the <media-controller> component.
  • Added --media-control-transition-in CSS variable to optionally change the transition effect when showing the <media-controller> component.
  • Added example of use in basic-video.html

@R-Delfino95 R-Delfino95 requested review from heff and a team as code owners January 14, 2025 18:02
Copy link

vercel bot commented Jan 14, 2025

@R-Delfino95 is attempting to deploy a commit to the Mux Team on Vercel.

A member of the Team first needs to authorize it.

@R-Delfino95 R-Delfino95 changed the title Added CSS variable to customize the <media-controller> hide transition feat: add CSS variable to customize the <media-controller> hide transition Jan 14, 2025
Copy link

vercel bot commented Jan 15, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
media-chrome ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 15, 2025 4:38pm

@@ -169,7 +169,7 @@ template.innerHTML = /*html*/ `
Attributes.NO_AUTOHIDE
}]):not([role=dialog])) {
opacity: 0;
transition: opacity 1s;
transition: var(--media-hide-transition, opacity 1s);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is good but I would change the naming to include control. we've also used in and out naming for transitions to make that distinction. @heff @cjpillsbury thoughts?

I propose making this CSS var --media-control-transition-out and then the transition above we can make --media-control-transition-in

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! I renamed the variable and created the variable for the show transition

@R-Delfino95 R-Delfino95 requested a review from luwes January 17, 2025 20:40
Copy link
Contributor

@luwes luwes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! thanks

@luwes luwes merged commit e334971 into muxinc:main Jan 28, 2025
1 of 5 checks passed
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.

2 participants