From 23be071eeaaa6dffac5e0c99255eb2dcfb68fba4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20P=C4=99dzich?= Date: Sat, 13 May 2023 03:38:20 +0200 Subject: [PATCH] Revert to default style for post links on mobiles --- src/styles/global.css | 104 +++++++++++++++++++++--------------------- 1 file changed, 53 insertions(+), 51 deletions(-) diff --git a/src/styles/global.css b/src/styles/global.css index 5384d85..9023881 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -160,64 +160,66 @@ h1.cmr2-text { /* The following styling rules have been adopted from: https://github.com/codrops/LineHoverStyles/ */ -.post-list a { - position: relative; - outline: none; - cursor: pointer; - white-space: nowrap; - text-decoration: none; -} +@media (min-width: 640px) { + .post-list a { + position: relative; + outline: none; + cursor: pointer; + text-decoration: none; + white-space: nowrap; + } -.post-list a:focus { - outline: 2px solid rgba(255, 255, 255, 0.4); - outline-offset: 3px; -} + .post-list a:focus { + outline: 2px solid rgba(255, 255, 255, 0.4); + outline-offset: 3px; + } -.post-list a:focus:not(:focus-visible) { - background: transparent; -} + .post-list a:focus:not(:focus-visible) { + background: transparent; + } -.post-list a:focus-visible { - color: rgba(255, 255, 255, 0.4); - outline: 2px solid rgba(255, 255, 255, 0.4); - outline-offset: 3px; - background: transparent; -} + .post-list a:focus-visible { + color: rgba(255, 255, 255, 0.4); + outline: 2px solid rgba(255, 255, 255, 0.4); + outline-offset: 3px; + background: transparent; + } -.post-list a:hover { - outline: none; - color: rgba(255, 255, 255, 0.4); -} + .post-list a:hover { + outline: none; + color: rgba(255, 255, 255, 0.4); + } -.post-list a::before, -.post-list a::after { - position: absolute; - width: 100%; - height: 1px; - background: currentColor; - top: 100%; - left: 0; - pointer-events: none; -} + .post-list a::before, + .post-list a::after { + position: absolute; + width: 100%; + height: 1px; + background: currentColor; + top: 100%; + left: 0; + pointer-events: none; + } -.post-list a::before { - content: ''; - transform-origin: 0% 50%; - transform: scale3d(0, 1, 1); - transition: transform 0.3s; -} + .post-list a::before { + content: ''; + transform-origin: 0% 50%; + transform: scale3d(0, 1, 1); + transition: transform 0.3s; + } -.post-list a:hover::before { - transform: scale3d(1, 1, 1); -} + .post-list a:hover::before { + transform: scale3d(1, 1, 1); + } -.post-list a::after { - content: ''; - top: calc(100% + 4px); - transition: transform 0.3s; - transform-origin: 100% 50%; -} + .post-list a::after { + content: ''; + top: calc(100% + 4px); + transition: transform 0.3s; + transform-origin: 100% 50%; + } -.post-list a:hover::after { - transform: scale3d(0, 1, 1); + .post-list a:hover::after { + transform: scale3d(0, 1, 1); + } }