Comments on: 6 Creative Ideas for CSS Link Hover Effects https://css-tricks.com/css-link-hover-effects/ Tips, Tricks, and Techniques on using Cascading Style Sheets. Wed, 14 Dec 2022 16:02:30 +0000 hourly 1 https://wordpress.org/?v=6.1.1 By: Daler Yunusov https://css-tricks.com/css-link-hover-effects/#comment-1798037 Wed, 14 Dec 2022 16:02:30 +0000 https://css-tricks.com/?p=363124#comment-1798037 good job

]]>
By: AranZalewski123 https://css-tricks.com/css-link-hover-effects/#comment-1798015 Tue, 13 Dec 2022 07:04:50 +0000 https://css-tricks.com/?p=363124#comment-1798015 Very nice sir, thanks for sharing this with us

]]>
By: Andreas https://css-tricks.com/css-link-hover-effects/#comment-1797799 Mon, 21 Nov 2022 20:34:57 +0000 https://css-tricks.com/?p=363124#comment-1797799 In reply to Tom.

good hack. But this will make all links show in a separate line. especially on mobiles this doesnt work, if links are too long.

]]>
By: mcellroy.3 https://css-tricks.com/css-link-hover-effects/#comment-1797755 Wed, 16 Nov 2022 23:16:01 +0000 https://css-tricks.com/?p=363124#comment-1797755 In reply to Ashley Sheridan.

I couldn’t get it to work when I wanted to change the text to different text.

]]>
By: Geoff Graham https://css-tricks.com/css-link-hover-effects/#comment-1797683 Tue, 08 Nov 2022 14:02:37 +0000 https://css-tricks.com/?p=363124#comment-1797683 In reply to ThePhotographyConfidential.

You’ll want to make sure there’s some sort of wrapper around your article in the HTML — maybe it’s even the <article> tag — and then scope the CSS to it.

For example… this will select all links:

a { color: red; }

But this will only select links within an article:

article a { border: red; }
]]>
By: ThePhotographyConfidential https://css-tricks.com/css-link-hover-effects/#comment-1797682 Tue, 08 Nov 2022 13:54:04 +0000 https://css-tricks.com/?p=363124#comment-1797682 Hello, I love that article thank you ! When I add it in CSS it also applies to my website menu. Is there a way to make the customization of links apply only to the links within my posts? Thank you!

]]>
By: Angela Gough https://css-tricks.com/css-link-hover-effects/#comment-1797374 Tue, 11 Oct 2022 02:20:27 +0000 https://css-tricks.com/?p=363124#comment-1797374 Love these! I’m trying out the Left-to-Right Color Swap effect on my site, but I notice that when the webpage is printed the link text doesn’t show up at all. What do I need to add to my @media print code to disable the effect for printing? Thanks!

]]>
By: Eyad https://css-tricks.com/css-link-hover-effects/#comment-1797161 Mon, 19 Sep 2022 20:28:27 +0000 https://css-tricks.com/?p=363124#comment-1797161 Amazing effects!

]]>
By: Ashley Sheridan https://css-tricks.com/css-link-hover-effects/#comment-1795286 Tue, 29 Mar 2022 10:19:17 +0000 https://css-tricks.com/?p=363124#comment-1795286 The text swapping effect will cause problems for users relying on accessible tech. A lot of screen readers (although not all) now do read out pseudo content, so what they will end up getting is something like:

“Hover link this link this link”

Also, with any of the effects that only change a colour (and not also a shape), care should be taken to ensure that the colour change contrasts sufficiently to be seen as a difference for people who have extreme colour blindness. I believe the ratio would be at least 3:1 for an effect like this if you’re aiming for AA compliance.

]]>
By: Tom https://css-tricks.com/css-link-hover-effects/#comment-1794848 Sat, 05 Mar 2022 11:59:42 +0000 https://css-tricks.com/?p=363124#comment-1794848 For this link “The Growing Background Link Hover Effect” you need to set element a as display: inline-block because if your link is on two rows, this solution wouldn’t work.

]]>
By: Azragh https://css-tricks.com/css-link-hover-effects/#comment-1794084 Thu, 17 Feb 2022 14:51:08 +0000 https://css-tricks.com/?p=363124#comment-1794084 The first one looks really nice, but unfortunately it is not really practical to use. Since top- and bottom-margins can’t be applied to inline-elements, and links in navigation or similar usually already have their own spacings, it’s better to solve this with a pseudo-element. Another advantage of this is that the background color always stretches to 100% width, instead of 100px as specified:

a {
    position: relative;
    color: $content_linkcolor;
    transition: color .3s ease-in-out;
    z-index: 0;
    &:after {
        content: "";
        display: block;
        position: absolute;
        inset: 0;
        width: 0;
        background-color: $content_linkcolor;
        transition: width .3s ease-in-out;
        z-index: -1;
    }
    &:hover {
        color: white;
    }
    &:hover:after {
        width: 100%;
    }
}
]]>
By: Lec https://css-tricks.com/css-link-hover-effects/#comment-1794079 Thu, 17 Feb 2022 11:36:02 +0000 https://css-tricks.com/?p=363124#comment-1794079 Nice effects.
However, the “The Right-to-Left Color Swap Link Hover Effect” can be made more compatible by using a simple
color instead of -webkit-text-fill-color and adding the unprefixed background-clip. The prefix is not needed for Safari, Edge and Firefox (but it seems to work OK with prefix too)

]]>
By: Joosep https://css-tricks.com/css-link-hover-effects/#comment-1794068 Thu, 17 Feb 2022 02:51:26 +0000 https://css-tricks.com/?p=363124#comment-1794068 Very nice ideas, thank you!

]]>
By: Michael Janik https://css-tricks.com/css-link-hover-effects/#comment-1794056 Tue, 15 Feb 2022 23:51:42 +0000 https://css-tricks.com/?p=363124#comment-1794056 Just wow. Really awesome effects

]]>