From b4c08a027b2eda591a3238d6647fb5ac5eac9c07 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sun, 6 Jun 2021 19:56:31 -0700 Subject: [PATCH] fix: Remove hover state css on sidebar items on mobile closes #2043 --- .../Sidebar/components/SidebarLink.js | 32 ++++++++++--------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/app/components/Sidebar/components/SidebarLink.js b/app/components/Sidebar/components/SidebarLink.js index 68d197335..769d602f7 100644 --- a/app/components/Sidebar/components/SidebarLink.js +++ b/app/components/Sidebar/components/SidebarLink.js @@ -139,30 +139,32 @@ const Link = styled(NavLink)` transition: fill 50ms; } - &:hover { - color: ${(props) => - props.$isActiveDrop ? props.theme.white : props.theme.text}; - } - &:focus { color: ${(props) => props.theme.text}; background: ${(props) => props.theme.black05}; } - &:hover + ${Actions}, - &:active + ${Actions} { - display: inline-flex; - - svg { - opacity: 0.75; - } - } - } - ${breakpoint("tablet")` padding: 4px 32px 4px 16px; font-size: 15px; `} + + @media (hover: hover) { + &:hover + ${Actions}, + &:active + ${Actions} { + display: inline-flex; + + svg { + opacity: 0.75; + } + } + } + + &:hover { + color: ${(props) => + props.$isActiveDrop ? props.theme.white : props.theme.text}; + } + } `; const Label = styled.div`