Meii
Meii

Reputation: 33

How to prevent link_to icon change color on hover?

I'm creating simple app using RoR.

I have a link which looks like this

 <%= link_to (fa_icon "heart-o", class: "fa-lg"), like_path %>

When the mouse is over the icon I cannot longer see the icon, I see just black square in a size of the icon. I was able to set the visited color and it works fine but I'm not able to change the hover option.

Any ideas?

@edit: I was sure it worked before, so I've created a branch from one of my old commits in repository and applied changes to the code step by step checking when it stopped working. The app didn't load my scss files, except application.scss so I added:

/*
*= require_tree
*/

to my application.scss and then it stopped working.

@edit2: I've solved the problem, there was hover background color deffined in scaffolds.scss. I removed that and everything works fine now. Thanks.

Upvotes: 1

Views: 513

Answers (1)

Ramon Marques
Ramon Marques

Reputation: 3264

It's simple like this in css:

a.fa-lg:hover {
    color: #3af !important;
}

Upvotes: 1

Related Questions