Skip to content

Commit

Permalink
Apply active FreeTube theme to shaka-player menus (#5986)
Browse files Browse the repository at this point in the history
* Apply active FreeTube theme to shaka-player menus

* Add primary color override for range containers with the Hot Pink theme
  • Loading branch information
absidue authored Nov 3, 2024
1 parent fdd0f61 commit 98958ae
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,31 @@
flex-direction: column-reverse;
}

/*
Apply the active FreeTube base theme to shaka-player's menus.
Usually we go for classes and not element names,
however as we need to override shaka-player's CSS
we need to use the same selectors that they do.
*/

:deep(.shaka-overflow-menu),
:deep(.shaka-settings-menu) {
background: var(--card-bg-color) !important;
}

:deep(.shaka-overflow-menu button),
:deep(.shaka-settings-menu button) {
color: var(--primary-text-color) !important;
}

:deep(.shaka-overflow-menu button:hover),
:deep(.shaka-settings-menu button:hover) {
background: var(--side-nav-hover-color) !important;
color: var(--side-nav-hover-text-color) !important;
}

/* End of theming code */

.sixteenByNine {
aspect-ratio: 16 / 9;
}
Expand Down
4 changes: 4 additions & 0 deletions src/renderer/themes.css
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ it can be safely elided. This looks quite pleasant on this theme. */
text-decoration: underline;
}

.hotPink .shaka-range-container {
--primary-color: #fff;
}


/*************** DARK THEME ADJUSTMENTS ***************/

Expand Down

0 comments on commit 98958ae

Please sign in to comment.