Fix themes not covering entire page #3888#3891
Open
TrivCodez wants to merge 1 commit into
Open
Conversation
- Added selectors for ytd-app, ytd-browse-view, ytd-watch-flexy, #page, and #content - Ensures background-color covers all main content areas - Fixes issue where themes only covered the top bar of the screen - Applies theme to all major YouTube containers for consistent coverage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3888
Problem
Themes (especially custom themes) were not covering the entire YouTube page - they only covered the top bar/header area. The main content area remained the default YouTube theme/background.
Root Cause
The CSS selectors in
themes.jswere only applying theme colors tohtml[it-theme=custom]andhtml[it-theme=custom] [dark], but didn't explicitly target the main content containers:ytd-app- The root YouTube application containerytd-browse-view- Browse pages (Home, Subscriptions, etc.)ytd-watch-flexy- Watch pages#pageand#content- Legacy content containersSolution
Added an additional CSS rule that explicitly targets all major YouTube containers and ensures the background-color cascades properly through the page hierarchy:
'html[it-theme=custom] ytd-app, html[it-theme=custom] ytd-browse-view, html[it-theme=custom] ytd-watch-flexy, html[it-theme=custom] #page, html[it-theme=custom] #content { background-color: var(--yt-spec-base-background) !important; }'Changes Made
js&css/web-accessible/www.youtube.com/themes.jsytd-app,ytd-browse-view,ytd-watch-flexy,#page, and#content--yt-spec-base-backgroundvariable is applied consistently across all main content areasTesting
The fix should be tested with:
Impact
This fix ensures that when users select a theme (particularly custom themes), the entire page adopts the theme colors instead of just the top bar, providing a consistent and immersive viewing experience.