From 8eda6c16d04c7eeeeb5c36162050440a8b05e9c6 Mon Sep 17 00:00:00 2001 From: Imanol Fernandez Date: Fri, 10 Jan 2020 14:40:08 +0100 Subject: [PATCH] Workaround for Youtube homepage layout --- .../web_extensions/webcompat_youtube/main.css | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/app/src/main/assets/web_extensions/webcompat_youtube/main.css b/app/src/main/assets/web_extensions/webcompat_youtube/main.css index 0cf74c110..bbf73b07e 100644 --- a/app/src/main/assets/web_extensions/webcompat_youtube/main.css +++ b/app/src/main/assets/web_extensions/webcompat_youtube/main.css @@ -8,3 +8,31 @@ .ytp-share-icon { display: none; } + + +/* Fix Youtube homepage is wrongly displayed on only one column + See https://github.com/MozillaReality/FirefoxReality/issues/2595 */ +ytd-rich-grid-video-renderer { + min-width: 0px; +} + +@media screen and (max-width: 899px) { + ytd-rich-grid-renderer { + --ytd-rich-grid-items-per-row: 2 !important; + --ytd-rich-grid-posts-per-row: 2 !important; + } +} + +@media screen and (max-width: 1115px) and (min-width: 900px) { + ytd-rich-grid-renderer { + --ytd-rich-grid-items-per-row: 3 !important; + --ytd-rich-grid-posts-per-row: 3 !important; + } +} + +@media screen and (min-width: 1116px) { + ytd-rich-grid-renderer { + --ytd-rich-grid-items-per-row: 4 !important; + --ytd-rich-grid-posts-per-row: 4 !important; + } +}