-
Notifications
You must be signed in to change notification settings - Fork 90
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
feat: add CSS variable to customize the <media-controller> hide transition #1051
Conversation
@R-Delfino95 is attempting to deploy a commit to the Mux Team on Vercel. A member of the Team first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
src/js/media-container.ts
Outdated
@@ -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); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! thanks
Related to #874
--media-control-transition-out
CSS variable to optionally change the transition effect when hiding the<media-controller>
component.--media-control-transition-in
CSS variable to optionally change the transition effect when showing the<media-controller>
component.basic-video.html