Skip to content

Hide empty Shorts shelf when all items are hidden #78

@Mat4B

Description

@Mat4B

Description:

When Shorts are hidden, YouTube sometimes still renders the Shorts section (ytd-rich-section-renderer) even though all items inside are hidden (hidden attribute).
This results in an empty Shorts block taking space on the homepage.

A working CSS fix:

ytd-rich-section-renderer:not(:has(ytd-rich-shelf-renderer:not([hidden]))) {
  display: none !important;
}

This hides the entire Shorts section when all ytd-rich-shelf-renderer elements are hidden.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions