What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 128 Stack Exchange communities.

Code samples (using the backtick) inside of spoilers are still visible. Like shown in this screen capture:

Code fragment visible in spoiler text

It does this on most sites other than SO and Meta.

As you can see below, code is still invisible inside of spoilers here on meta.

- Spoilers are denoted by the >! string before the line that is being spoiled.

Having bits of a spoiler visible before you mouse over it kind of spoils the purpose of a spoiler.

share|improve this question

closed as off-topic by Anna Lear Apr 4 at 22:33

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "The problem described here can no longer be reproduced. Changes to the system or to the circumstances affecting the asker have rendered it obsolete. If you encounter a similar problem, please post a new question." – Anna Lear
If this question can be reworded to fit the rules in the help center, please edit the question.

    
Oops, my bad: I voted to close too, but when I was about to change "visible" into "not visible" in the title, I realized I totally misread this. Enhanced the post a bit. I think it's NOT a duplicate, @Michael et al! –  Arjan Nov 15 '11 at 21:00
    
@Arjan They seem the same; the post I linked to is "how do I make code in a spoiler block invisible", this is "bug: code in a spoiler block is visible" –  Michael Mrozek Nov 15 '11 at 21:01
    
I disagree, @Michael. This one is about the backticks erroneously being visible (which actually matches the 2nd example in the other post, which renders fine, in Meta's color scheme). Just a minor CSS tweak to fix this, I guess. –  Arjan Nov 15 '11 at 21:03
2  
@MichaelMrozek No. On the other question, he made inline code invisible in his spoiler. I'm saying that on some sites, inline code is visible inside of spoilers. His problem was specific to block code, this is specific to inline code. –  Peter Olson Nov 15 '11 at 21:03
1  
While waiting for a proper fix from the SE folks, I've included a client-side fix for this (and a bunch of other spoiler CSS issues) in SOUP v1.6. –  Ilmari Karonen Feb 10 at 14:05
    
I'd love to see this resolved, there is a great technique for posting answers on Math that I'd love to be able to easily apply on SO. –  Jason C Mar 22 at 17:02
1  
Looks like this got fixed somewhere down the line. –  Anna Lear Apr 4 at 22:33
add comment

1 Answer 1

Also, prettified code blocks are visible, even on SO and here on Meta. I'd have guessed this was not an issue for anyone, but apparently it is.

In spoilers, using <pre> works, but using <pre><code> currently messes up with hiding the spoiler:

Spoiler with a code block:


 var a = 3;
 while (not (a > 0)) {
   alert("JavaScript code <b>goes</b> here.");
 }
 
(Also, the paragraph spacing is very different from regular Markdown.)

Even <!-- language-all: none --> does not fix this, as then all text is just rendered in black once Prettify kicks in:

Spoiler with a code block:


 var a = 3;
 while (not (a > 0)) {
   alert("JavaScript code <b>goes</b> here.");
 }
 
(Also, the paragraph spacing is very different from regular Markdown.)

share|improve this answer
    
We have never really supported mixing HTML and Markdown in the same post. Don't use the <pre> and <code> tags inside spoilers, and you're pretty much all set. –  Anna Lear Apr 4 at 22:32
    
Unfortunately, spoilers don't support Markdown code blocks, @Anna. (Not that I ever use spoilers, and even if I did I'd dislike the huge blank grey block... For that, I'd still recommend re-using the spoilers from the mobile theme on regular sites, but like noted above, the mobile layout messes up the above as well.) –  Arjan Apr 5 at 0:55
add comment

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