14
$\begingroup$

It appears that using MathJax color in a hidden text block "pokes through" the hidden environment. I don't believe this is desired behavior, so I'm reporting as a bug.

very hidden. $\color{red}{\text{Not so hidden...}}$ Hidden again.

$\endgroup$
  • 1
    $\begingroup$ Disclaimer: I know nothing about this! While certainly a surprise, this may be A) not so easy to fix, if the working of the spoiler field relies on turning black text to grey and back, B) a feature as opposed to a bug or, if you prefer, by-design :-) $\endgroup$ – Jyrki Lahtonen Dec 29 '14 at 17:06
  • 3
    $\begingroup$ I thought it wouldn't be easy to fix, but I still felt that reporting the behavior would be better than leaving it undocumented. $\endgroup$ – apnorton Dec 29 '14 at 17:13
  • 5
    $\begingroup$ I think this is a legitimate bug, though likely in the "won't fix" territory. The spoilers indeed work by making the color of text identical to background, and MathJax, running later on the page, overrules that. $\endgroup$ – user147263 Dec 29 '14 at 17:16
  • 2
    $\begingroup$ Interestingly enough, the behavior does not exist on the Android app. $\endgroup$ – apnorton Dec 29 '14 at 17:16
  • $\begingroup$ This might just be me being naïf with my limited skills, but wouldn't simply applying something like hidden instead of changing the color solve this? I imagine there are other technical problems with that though. $\endgroup$ – Najib Idrissi Dec 29 '14 at 17:30
  • $\begingroup$ This behaviour also does not exist on mobile site (click "mobile" in the footer). Both the mobile site and the app implement spoilers differently, by replacing the text with "[Click to show] spoiler", and then inserting the text if clicked. $\endgroup$ – user147263 Dec 29 '14 at 17:31
  • $\begingroup$ @NajibIdrissi Shog says it's because of reasons, some of the reasons being copy-paste and ability to display the text by selecting it. $\endgroup$ – user147263 Dec 29 '14 at 17:38
  • 2
    $\begingroup$ @Behaviour I don't really understand the argument, since you can click on the spoiler block to make it visible. How about opacity otherwise? $\endgroup$ – Najib Idrissi Dec 29 '14 at 17:43
  • 1
    $\begingroup$ @NajibIdrissi I never knew about click-to-keep-visible. Thanks! The post I linked is from 2011, so it's quite possible that by now whatever reasons made them use the color attribute for spoilers no longer apply. $\endgroup$ – user147263 Dec 29 '14 at 17:44
  • 1
    $\begingroup$ SOUP fixes this, as a side effect of this general spoiler CSS fix. (It seems to break the click-to-keep-visible functionality, though. I'll fix that ASAP; thanks for pointing it out!) $\endgroup$ – Ilmari Karonen Dec 29 '14 at 21:20
  • $\begingroup$ ...and the click functionality is fixed too, as of SOUP v1.26.3. $\endgroup$ – Ilmari Karonen Dec 29 '14 at 21:46
4
$\begingroup$

I don't know why you're using colored text in spoiler blocks, but the obvious solution here is to just not use colored text in spoiler blocks.

Spoilers are fairly reader-hostile by-design, so if something about them strikes you as odd perhaps you could just skip using them entirely.

$\endgroup$
  • 10
    $\begingroup$ ...or just think about the color-blinded readers, and don't use colored text at all. $\endgroup$ – Asaf Karagila Dec 29 '14 at 19:46
  • 1
    $\begingroup$ That's even better. $\endgroup$ – Shog9 Dec 29 '14 at 19:47
  • 4
    $\begingroup$ @AsafKaragila It's possible to use colored text in ways that even color-blind readers can distinguish. Colored text is frequently useful. $\endgroup$ – Emily Dec 29 '14 at 19:53
  • 2
    $\begingroup$ @Arkamis: I know. I've opened a meta thread about this issue some long time ago, you can probably find it and see for yourself. (I'm not saying that colors should never be used, but more often than not, their use can be replaced by something monochromatic.) $\endgroup$ – Asaf Karagila Dec 29 '14 at 20:01
  • 3
    $\begingroup$ This is as much of an answer as a doctor saying "oh, it hurts when you jump on one foot? Don't do that--no one needs to jump on one foot anyway." :P However, as a programmer, I understand that this issue is so minor that it's most likely not worth fixing. $\endgroup$ – apnorton Dec 29 '14 at 20:38
  • 5
    $\begingroup$ Yes, it is exactly like that, @anorton. "Doctor, holding my hand in front of my face hurts when I suddenly draw my hand inwards!" What do you want me to say, "oh, let's engineer a hole in your face?" Obviously, if you have a good reason for putting colored text in spoilers (and for using spoilers at all on a math site) then you should elaborate on that in your bug report - as it is, I consider this a feature implemented for the benefit of folks on sites for speculative fiction, and sort of a misfeature everywhere else. $\endgroup$ – Shog9 Dec 29 '14 at 20:49
  • 1
    $\begingroup$ @Shog9 well played, well played. :) $\endgroup$ – apnorton Dec 29 '14 at 20:50
  • $\begingroup$ @Shog: There are excellent reasons for using spoiler tags on a math site, actually. You give a hint, or a partial solution, and add a spoiler with the final answer, or a more elaborate hint. But I do like that attitude about engineering a hole in someone's face just so they can push their hand through! $\endgroup$ – Asaf Karagila Dec 30 '14 at 4:01

You must log in to answer this question.

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