I'm making a custom stylesheet for a particular web site in Firefox 4. In it, I'm trying to prefix red 'x's to links that I've visited. Now, when I say making, I mean it used to work a while ago, and at some point, these 'x's stopped appearing (though the rest of the stylesheet works just fine).
Now, a:before (and a::before, per CSS3) works fine. a:visited works fine. Neither a:visited:before nor a:visited::before works at all (well, almost).
During my play-testing, I left in a::before, and still had my a:visited::before declaration to use red 'x's. For non-visited links, the a::before content was the same text color, but for vis开发者_开发技巧ited links, the ::before content was the 'right' color (red).
Here is a pastebin of the CSS at one point: http://pastebin.com/6Tzy1Q87
And here is a screencap of what that CSS resulted in: http://i.stack.imgur.com/rtw9L.png
Notice that the a::before simply specifies the content to a checkmark. The a:visited::before should change the weight, color, and content, but only changes the color.
I heard about a recent security 'feature' regarding Firefox and page history, but as I understood it, that would affect the regular a:visited selector as well.
Selectors including :visited
are only allowed to change colors in Firefox 4, yes. That applies whether or not ::before
is involved. See http://dbaron.org/mozilla/visited-privacy
I'd be curious to see what CSS you had that allowed you to change something other than colors using :visited
.
精彩评论