Repository navigation
Fix: Update thumbnail size CSS to support YouTube's modern grid layout - #3646
Merged
Merged
Conversation
Member
Author
|
PR: #3691 should take care of those issues! and btw back to the grind captain ;) |
Member
Author
|
@ImprovedTube Thanks for the insights on the hardware limits and server rejections! I just put together a fix for this over in #3770 It now silently probes for maxresdefault in the background to stop the 404 broken layouts, and it dynamically hides the HD options on smaller screens (basically 1000 or less pixels going horizontally from the left edge of their monitor to the right edge) to save everyone's data. I'm ready for some more challenges to tackle, So let me know what high priority things you want me to do next and if you have any more suggestions regarding my approach!! |
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.
This PR addresses layout-breaking issues associated with the "Thumbnail Size" feature on YouTube's modern grid layout and expands the feature to give users more granular control over their feeds.
YouTube recently transitioned its Home and Subscriptions feeds to a rigid CSS variable-based Grid (
ytd-rich-grid-renderer). The previous legacy approach of applying percentage-based width constraints (width: 90%) directly to child elements (#thumbnailandytd-rich-grid-media) conflicted with YouTube's internalcalc()math. This resulted in unpredictable layouts, stretched images, and large empty gray spaces.This patch refactors the thumbnail size logic to use a native CSS Grid approach at the container level, bypassing YouTube's inline variables, and introduces new user options.
Changes Included
grid-template-columns: repeat(auto-fill, ...)rules applied to the#contentscontainer to cleanly override YouTube's grid engine.:not([it-change-thumbnails-per-row="default"])CSS overrides to ensure the new size options scale correctly when a user has a custom row count active.ytd-rich-item-renderer[is-empty]) and row wrappers (display: contentsonytd-rich-grid-row) to prevent blank gaps at the bottom of the feed and ensure a fluid grid.Screenshots
