From 1ea0a47c82de41b9be974426cc859b0aeefa27bf Mon Sep 17 00:00:00 2001 From: Sam Tay Date: Thu, 26 Sep 2024 19:31:42 -0400 Subject: [PATCH] Fix sprite offset on mobile --- app/src/ui/components/header.rs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/app/src/ui/components/header.rs b/app/src/ui/components/header.rs index 5a3c8d9..891b329 100644 --- a/app/src/ui/components/header.rs +++ b/app/src/ui/components/header.rs @@ -55,7 +55,13 @@ fn AviaryLink() -> Element { }} #aviary-header-link:hover > #aviary-header-img, #aviary-header-link.aviary-active > #aviary-header-img {{ - background-position: -40px -0px; + background-position: -32px -0px; + }} + @media (width>=640px) {{ + #aviary-header-link:hover > #aviary-header-img, + #aviary-header-link.aviary-active > #aviary-header-img {{ + background-position: -40px -0px; + }} }} "# } @@ -85,7 +91,12 @@ fn DonateLink() -> Element { background: no-repeat url({donate_src}) 0 0 / 200% 100%; }} #donate-header-link:hover > #donate-header-img {{ - background-position: -40px -0px; + background-position: -32px -0px; + }} + @media (width>=640px) {{ + #donate-header-link:hover > #donate-header-img {{ + background-position: -40px -0px; + }} }} "# }