Skip to main content
Topic: linktree color bug (Read 2065 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

linktree color bug

There's a little color bug in my linktree. As I am a perfectionist in such things it would be great if there's a solution.

Code: [Select]
.linktree a {
color: #464646;
}

.linktree:hover, .linktree:last-child {
background: #6eb4e0;
background-image: linear-gradient(0deg, #6eb4e0, #529DCC);
}
.linktree:hover:after, .linktree:last-child:after {
background: #6eb4e0;
background-image: linear-gradient(-45deg, #6eb4e0, #529DCC);
}
.linktree:last-child, .linktree:last-child:after {
background: #9dd16d;
background-image: linear-gradient(0deg, #9dd16d, #76b13f);
}
.linktree:last-child:hover, .linktree:last-child:hover:after {
background: #9dd16d;
background-image: linear-gradient(0deg, #9dd16d, #76b13f);
}

And a second question:

Shouldn't the code above, taken from original CSS file, not be this:

Code: [Select]
.linktree a {
color: #464646;
}
.linktree:hover {
background: #6eb4e0;
background-image: linear-gradient(0deg, #6eb4e0, #529DCC);
}
.linktree:hover:after {
background: #6eb4e0;
background-image: linear-gradient(-45deg, #6eb4e0, #529DCC);
}
.linktree:last-child, .linktree:last-child:after {
background: #9dd16d;
background-image: linear-gradient(0deg, #9dd16d, #76b13f);
}
.linktree:last-child:hover, .linktree:last-child:hover:after {
background: #9dd16d;
background-image: linear-gradient(0deg, #9dd16d, #76b13f);
}

There seems to be duplicate code for linktree:last-child and linktree:last-child:after...  :o

Re: linktree color bug

Reply #1

Elk default is using a gradient at 90 degrees, while you are using one at 0, so you have to separate the li from the :after:
Code: [Select]
.linktree:last-child {
    background: #9dd16d;
    background-image: linear-gradient(0deg, #9dd16d, #76b13f);
}
.linktree:last-child:after {
    background: #9dd16d;
    background-image: linear-gradient(-45deg, #9dd16d, #76b13f);
}

About the second... I'm not entirely sure, this code is sometimes difficult to read to me... lol
Bugs creator.
Features destroyer.
Template killer.

Re: linktree color bug

Reply #2

Thanks, worked!  :)

If you look at the first code you will see that "linktree:last-child" and "linktree:last-child:after" is there two times in the code.