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

fix(mux-player): gerwig theme misapplying opt in controls selector. #841

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletions packages/mux-player/src/themes/gerwig/gerwig.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
<template id="media-theme-gerwig">
<!--
NOTE: Using conditional templates here so initial value is as expected due to state update cycling.
For more, see: MuxPlayer::secondaryColor getter and its application in template.ts (CJP).
-->
<template if="!audio">
<style>
:host {
--_secondary-color: var(--media-secondary-color, transparent);
}
</style>
</template>
<template if="audio">
<style>
:host([audio]) media-control-bar {
--_secondary-color: var(--media-secondary-color, black);
background-color: var(--_secondary-color);
}
</style>
</template>
<style>
@keyframes pre-play-hide {
0% {
Expand All @@ -18,10 +37,8 @@

:host {
--_primary-color: var(--media-primary-color, #fff);
--_secondary-color: var(--media-secondary-color, transparent);
--_accent-color: var(--media-accent-color, #fa50b5);
--_text-color: var(--media-text-color, #000);

--media-icon-color: var(--_primary-color);
--media-control-background: var(--_secondary-color);
--media-control-hover-background: var(--_accent-color);
Expand Down Expand Up @@ -486,7 +503,7 @@
* Our defaults for these buttons are to hide them at small sizes
* users can override this with CSS
*/
:not([breakpointsm]) {
media-controller:not([breakpointsm]):not([audio]) {
--bottom-play-button: none;
--bottom-seek-backward-button: none;
--bottom-seek-forward-button: none;
Expand Down
Loading