From 488aece050494c74055e013fe306af9a3f0c2fbe Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Fri, 1 Mar 2024 16:02:27 +0800 Subject: [PATCH] Better z-indices for the media --- src/pages/catchup.css | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/src/pages/catchup.css b/src/pages/catchup.css index 3f599c49..4ef22de9 100644 --- a/src/pages/catchup.css +++ b/src/pages/catchup.css @@ -748,15 +748,47 @@ .post-peek-media:first-child img { transform-origin: left center; } + } + @media (max-width: 480px) { .post-peek-media:not(:last-child) { margin-right: -24px; - z-index: 1; box-shadow: 0 0 0 2px var(--bg-blur-color); } - .post-peek-media:hover { + /* Max 10, I'm not going to code more than this */ + .post-peek-media:nth-child(1) { + z-index: 10; + } + .post-peek-media:nth-child(2) { + z-index: 9; + } + .post-peek-media:nth-child(3) { + z-index: 8; + } + .post-peek-media:nth-child(4) { + z-index: 7; + } + .post-peek-media:nth-child(5) { + z-index: 6; + } + .post-peek-media:nth-child(6) { + z-index: 5; + } + .post-peek-media:nth-child(7) { + z-index: 4; + } + .post-peek-media:nth-child(8) { + z-index: 3; + } + .post-peek-media:nth-child(9) { z-index: 2; } + .post-peek-media:nth-child(10) { + z-index: 1; + } + .post-peek-media:hover { + z-index: 11; + } } .post-peek-faux-media {