26

Answers with low scores are faded out. This is good. However, it would be nice to have the ability to temporarily un-fade such answers should we want to have an easier time reading them (for example, maybe there's a status-declined answer with a score in the -50's that you're having trouble reading). Rollover seems like a reasonable way to do this, or maybe clicking the answer's text.

8
  • You could click edit
    – Nick T
    Commented Apr 18, 2012 at 3:03
  • 1
    That's not exactly convenient, and it does nothing for comments attached to the answer.
    – Toomai
    Commented Apr 18, 2012 at 3:08
  • 1
    Do you only want this on Meta, where it is likely that someone would actually be reading a heavily-downvoted answer? Because I can't really see how it would be useful elsewhere... Commented Apr 18, 2012 at 3:11
  • I can userscript it for you if you want... Commented Apr 18, 2012 at 3:16
  • 12
    I very much want to read the comments on a massively downvoted answer, many of which explain what is wrong with it. Commented Jan 14, 2014 at 18:33
  • 1
    This is a good idea. We've now made it so that downvoted answers return un-fade on hover. Commented Jul 8, 2015 at 13:40
  • 1
    @KurtisBeavers Shouldn't that be an answer!? Commented Jul 16, 2015 at 16:02
  • 1
    @ᔕᖺᘎᕊ yes, it should! Commented Jul 16, 2015 at 16:04

3 Answers 3

8

This is a good idea. We've now made it so that downvoted answers return un-fade on hover.

7
  • 1
    Can you also add the unfade-on-click behavior from my and Manishearth's scripts? Something like $('.downvoted-answer .post-text').click( function () { $(this).closest('.answer').toggleClass('downvoted-answer') } ) should do it. Commented Jul 16, 2015 at 16:17
  • ...or see the slightly more complex but robust implementation from my answer below. Commented Jul 16, 2015 at 16:36
  • If we want the unfade-on-click as @IlmariKaronen said, will we have to open a new feature-request?? Commented Jul 20, 2015 at 20:40
  • @ᔕᖺᘎᕊ yes, please do so that we can get it back into our list of feature requests. Thanks! Commented Jul 20, 2015 at 21:15
  • @IlmariKaronen will you or should I?? ^^^ :) Commented Jul 20, 2015 at 21:22
  • 1
    @ᔕᖺᘎᕊ: Done. Commented Jul 30, 2015 at 11:33
  • BTW, this feature is apparently broken on some SE sites. Commented Jul 30, 2015 at 11:35
8

JQUERY TIME!

$('.downvoted-answer').on("click",function(){$(this).find('.post-text, .post-signature, .votecell, .comments').css('color','#000');this.clicked=true;});
$('.downvoted-answer').on("mouseover",function(){$(this).find('.post-text, .post-signature, .votecell, .comments').css('color','#000')});
$('.downvoted-answer').on("mouseout",function(){if(!this.clicked){$(this).find('.post-text, .post-signature, .votecell, .comments').css('color','#888')}});

This fades in/out on mouseover/out, and makes it permanent if you click it.

Userscript in two ticks.

Here it is; bundled in a nice userscript

1
  • 4
    You should totally drop that and use jQuery...oh wait! Commented Apr 18, 2012 at 10:44
4

Here's my version of Manishearth's user script fix:

$('#answers').on('mouseover', '.downvoted-answer',
    function () { $(this).addClass('downvoted-answer-hover').removeClass('downvoted-answer') }
).on('mouseout',  '.downvoted-answer-hover:not(.clicked)',
    function () { $(this).addClass('downvoted-answer').removeClass('downvoted-answer-hover') }
).on('click', '.downvoted-answer-hover .post-text',
    function () { $(this).closest('.downvoted-answer-hover').toggleClass('clicked') }
);

It's a bit klugey, but it has the advantage of not assuming anything about how downvoted answers are styled on each site (since that turns out not to be as consistent as one might hope).

I've included the code above in a collection of small user script fixes that I'm calling the Stack Overflow Unofficial Patch. Please feel welcome to give it a try!


Ps. Actually, it would almost be possible to fix this purely in CSS by adding appropriate .downvoted-answer:hover rules to override the fading. The tricky part here would be figuring out exactly what to override in those rules, since, as noted above, the styling of both normal and downvoted answers varied between sites. Also, the "click to un-fade" functionality would still require JavaScript.


Update: Since July 2015, the unfade-on-hover feature has been implemented using the CSS :hover pseudo-class. Since the current implementation still doesn't support the additional unfade-on-click part, I've replaced the earlier SOUP implementation with the following JS code:

$('#answers').on( 'click', '.answer.downvoted-answer .post-text', function () {
    $(this).closest('.answer').toggleClass('clicked');
} );

and the following CSS:

.downvoted-answer.clicked .post-text,
.downvoted-answer.clicked .post-signature,
.downvoted-answer.clicked .comments,
.downvoted-answer.clicked .vote > * { opacity: 1 }

This should be compatible with the new implementation.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .