Skip to content

Commit

Permalink
adding any-hover
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin committed Feb 25, 2024
1 parent 57d64e7 commit 77b6103
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/ThemeToggle.astro
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import MoonIcon from "@/icons/moon.astro"

<button
id="themeToggle"
class="inline-flex text-primary transition md:hover:scale-125 md:hover:opacity-70"
class="inline-flex text-primary transition any-hover:scale-125 any-hover:opacity-70"
>
<SunIcon
class="opacity-100 transition-transform dark:-rotate-90 dark:opacity-0"
Expand Down
6 changes: 3 additions & 3 deletions src/sections/Footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import XIcon from "@/icons/x.astro"
class="mt-20 w-full border-primary border-t-2 flex flex-col md:flex-row place-items-center md:justify-between pt-6 pb-20"
>
<span class="text-primary text-center">
&copy; 2024 La Velada del Año <span
&#169; 2024 La Velada del Año <span
aria-hidden="true"
class="hidden md:inline">|</span
><br aria-hidden="true" class="block md:hidden" /> Todos los derechos reservados.
Expand All @@ -25,7 +25,7 @@ import XIcon from "@/icons/x.astro"
rel="noopener"
aria-label="Instagram de la velada"
href="https://www.instagram.com/infolavelada"
class="md:hover:scale-125 md:hover:opacity-70 transition inline-block"
class="any-hover:scale-125 any-hover:opacity-70 transition inline-block"
>
<InstagramIcon class="text-primary" />
</a>
Expand All @@ -36,7 +36,7 @@ import XIcon from "@/icons/x.astro"
rel="noopener"
aria-label="X de la velada"
href="https://x.com/infoLaVelada"
class="md:hover:scale-125 md:hover:opacity-70 transition inline-block"
class="any-hover:scale-125 any-hover:opacity-70 transition inline-block"
>
<XIcon class="text-primary" />
</a>
Expand Down
4 changes: 3 additions & 1 deletion tailwind.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@ export default {
},
},
darkMode: 'class',
plugins: [animations],
plugins: [animations, function ({ addVariant }) {
addVariant("any-hover", "@media (any-hover: hover) { &:hover }")
}],
}

0 comments on commit 77b6103

Please sign in to comment.