/* ==UserStyle== @name YouTube - Tweaks @description Miscellaneous style overrides for YouTube. @version 2026.04.15.11.57 @author MetalTxus @namespace https://github.com/jesuscc1993/ @license CC BY-SA 4.0 @preprocessor stylus @var text duration-font-size "Video duration font size" 16px @var text duration-spacing "Video duration spacing" 4px @var checkbox hide-playlist-index "Hide playlist index" 0 @var checkbox restore-fullscreen-scroll "Restore fullscreen scroll" 0 ==/UserStyle== */ @-moz-document domain("youtube.com") { :root { --duration-font-size: duration-font-size; --duration-spacing: duration-spacing; } ytd-grid-video-renderer { height: 296px; } .ytThumbnailOverlayProgressBarHostWatchedProgressBar, ytd-thumbnail-overlay-resume-playback-renderer { height: calc(var(--duration-font-size) + var(--duration-spacing) * 2 + 4px); z-index: 0; opacity: 0.9; } .ytThumbnailBottomOverlayViewModelHost .ytThumbnailBottomOverlayViewModelBadge { z-index: 1; } .ytThumbnailOverlayProgressBarHostWatchedProgressBar { background: var(--yt-spec-text-disabled); } #hover-overlays { zoom: 1.5; } /* hide metadata on grids */ .ytd-rich-item-renderer .ytd-video-meta-block { > :nth-child(3), > :nth-child(4):before { display: none !important; } } /* hide playlist index */ if (hide-playlist-index) { .ytd-playlist-panel-renderer.index-message-wrapper { display: none; } } /* hide text on video buttons */ #top-row > *:not(:first-child) .ytd-menu-renderer:not(:first-child) .yt-spec-button-shape-next__button-text-content { display: none; } #top-level-buttons-computed > *:not(:first-child) .yt-spec-button-shape-next__icon, #flexible-item-buttons .yt-spec-button-shape-next__icon { margin: 0 -6px !important; } /* remove headers from sections past the first one */ [page-subtype="subscriptions"][role="main"] ytd-item-section-renderer { border: none !important; &:not(:nth-child(1)) { #contents.ytd-shelf-renderer { margin-top: 0; } .grid-subheader { display: none; } } } /* menu items */ ytd-guide-section-renderer:first-child, ytd-guide-section-renderer:has(> * > * > .ysm-group-popup-in-list), ytd-guide-section-renderer:has([href="/premium"]) { display: none !important; } /* extensions */ .ryd-tooltip, .ryd-premium-teaser, .ytp-right-controls #infoButton, .ytp-right-controls #startSegmentButton { display: none !important; } [aria-label="Dislike this video"] #text { margin-left: 6px; } html[ysm-filter-hidden][ysm-filter-hidden-ready] [page-subtype="subscriptions"] ytd-rich-grid-renderer #contents ytd-rich-grid-row #contents { yt-formatted-string { font-size: var(--font-size-sm) !important; line-height: var(--line-height-sm) !important; } } /* prevent accidental pagination */ [page-subtype="channels"][role="main"] ytd-continuation-item-renderer, [page-subtype="playlist"][role="main"] ytd-continuation-item-renderer, [page-subtype="subscriptions"][role="main"] ytd-continuation-item-renderer, ytd-search[role="main"] ytd-continuation-item-renderer { margin-top: 80vh; } /* misc */ #country-code, #top-level-buttons-computed > :nth-child(4), #voice-search-button, #buttons.ytd-masthead > ytd-topbar-menu-button-renderer.ytd-masthead.style-default { display: none !important; } /* video duration text */ .ytBadgeShapeTypography { font-size: var(--duration-font-size) !important; line-height: 0.975 !important; max-height: none !important; &.ytBadgeShapeThumbnailDefault { background-color: rgba(0, 0, 0, 0.75); } } ytd-thumbnail[size="large"] ytd-thumbnail-overlay-button-renderer.ytd-thumbnail, ytd-thumbnail[size="large"] ytd-thumbnail-overlay-time-status-renderer.ytd-thumbnail, ytd-thumbnail[size="large"] ytd-thumbnail-overlay-toggle-button-renderer.ytd-thumbnail, ytd-thumbnail[size="medium"] ytd-thumbnail-overlay-button-renderer.ytd-thumbnail, ytd-thumbnail[size="medium"] ytd-thumbnail-overlay-time-status-renderer.ytd-thumbnail, ytd-thumbnail[size="medium"] ytd-thumbnail-overlay-toggle-button-renderer.ytd-thumbnail { margin: var(--duration-spacing); } .ytThumbnailBottomOverlayViewModelBadgeContainerLarge { padding: 0 var(--duration-spacing) var(--duration-spacing) 0; z-index: 0; } /* side menu items */ ytd-guide-entry-renderer[guide-refresh] { width: 100%; } /* hide "your videos" sidebar items */ ytd-guide-entry-renderer:has(a[href*="studio.youtube.com"]) { display: none; } /* better clickable videos */ #meta.ytd-playlist-video-renderer { display: flex; flex-direction: column; h3 { flex: 1; a { display: block; height: 100%; } } } /* highlight unavailable videos */ ytd-playlist-video-renderer:has([src="https://i.ytimg.com/img/no_thumbnail.jpg"]) { background: #ffffff66; } /* restore fullscreen scroll (https://www.reddit.com/r/youtube/comments/1n3wizl/comment/nbh8r43/) */ if (restore-fullscreen-scroll) { ytd-watch-flexy[fullscreen] #single-column-container.ytd-watch-flexy, ytd-watch-flexy[fullscreen] #columns.ytd-watch-flexy { display: flex !important; } .ytp-fullscreen-grid, .ytp-fullscreen-grid .ytp-fullscreen-grid-expand-button { display: none !important; } } /* */ }