Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
25

My suggestion is to scrap the whole set of spoiler styles currently in use, and replace them with the following: .spoiler > * { opacity: 0; transition: opacity 0.5s ease-in; /* + optional vendor prefix variants for old browsers */ } .spoiler:hover > * { opacity: 1; } Note: To make this work 100% reliably, the content of each spoiler &...


23

You can do it using HTML >! <pre><code>def invisible_function(): >! print 'Eeek! I feel so naked!'</code></pre> This results in some extra padding, though.


16

You can do it in a better way: add two spaces in the end of the line for line-break add >! with two spaces in the new line for the line break with in spoiler. Sample content as: >! This is a spoiler. >! >! A multi-line spoiler. >! >! It works, as a spoiler, but it is not properly formatted as a multi-line spoiler.


15

I don't think there's any network-wide policy on spoilers. Those particular sites may have policies, but you'd need to ask them. For your scifi example, the question was already asked, but got closed as a duplicate of a post that doesn't seem to address the issue (they focused on how to mark spoilers, instead of whether or not it's mandatory)


14

This was fixed a while back, more or less as suggested by Ilmari Karonen, but with the addition of a bit of script to strip the "spoiler" class entirely upon clicking within the spoiler (and to restore it upon clicking again). This allows you to choose whether to briefly view the content (hover) or leave it visible indefinitely (and also works a bit better ...


13

I removed the background styling for <code> elements inside spoilers, so now they should match the normal "code inside a blockquote" styling and look much less evil as of the next build:


12

Pretty much the entire question is a spoiler. Don't do that. KTHXBYE!


12

This is not a network policy, but it's my policy. Your question must make sense without spoiler protected paragraphs.If the spoiler is the whole point of your question, don't spoiler protect it. Your answer must make sense without spoiler protected paragraphs.If the spoiler is the whole point of your answer, don't spoiler protect it. Your title must be easy ...


12

It's called a 'spoiler markdown'. It is used to hide portions of the text which are only revealed if you hover over it. It is useful in Stack Exchange if you want to ask about a movie (for example) but do not want to spoil key elements of the plot for anyone who may to have seen it. Spoiler markdowns are also used for things like riddles or quizzes. These ...


10

It's a bug in the all.css file used for formatting the page. In the file (which is missing several thousand carriage returns), the style for a spoiler code on hover is .spoiler:hover code{color:#222;background-color:#444} Someone a SE needs to change it to .spoiler:hover code{color:#222;background-color:#eee} Voila! Problem solved. If you want to, you ...


10

The odds of getting a site-wide setting are pretty low, but you can use a userscript to unhide spoilers. I do it with: function with_jquery(f) { var script = document.createElement("script"); ...


10

The new mobile sites support this: Beware that the spoiler text is only hidden after the page has loaded... (Click the "mobile" link at the bottom of this page to see it in a regular browser too.)


10

I agree with this proposal. Spoilers should be accessible. Below, I've made a proof of concept for an alternative interaction model for a keyboard-accessible spoiler by extending the current spoiler behaviour. Scroll to the bottom and hit Run code snippet to run the proof of concept. Here's a gif preview (inside a spoiler because it could be distracting, or ...


9

From the Markdown help page on linebreaks: End a line with two spaces to add a <br/> linebreak: This works fine within spoilers as well. For example: >! This line ends in two spaces: >! >! and so does that one ^ You can also use <br> tags: >! You can end the line with a tag:<br> >! <br> >! or just start ...


9

If you want just a hint, not a complete solution, just state so in the question. Other users don't know you want just a hint until you tell them; most users are looking for complete solutions (up to the point where Math.SE has a special close reason for problem statement questions without context, but I digress ...) I can imagine that there are still users ...


8

If you want to do that, you're probably taking the wrong approach to spoilers. I'm having trouble distilling this into words, so let me give you two examples: Need help with the final jump in Portal. portal spoiler SPOILER ALERT ZOMG! I've reached the end of Portal and I'm having trouble with the final jump of the game, which should trigger the ...


8

Why would you ever have empty blockquotes? http://en.wikipedia.org/wiki/Smith_%26_Dale#.22Dr._Kronkheit_and_His_Only_Living_Patient.22 SMITH: Doctor, it hurts when I do this. DALE: Don't do that.


8

HTML, baby. Yes, okay, not everything hides (looking at you, <hr> and <code>)... but that's a different bug report, now, isn't it? (On Meta Gaming, where this post came from, the above made two nested spoiler blocks where the inner area is only visible on hover of the inner block. The same thing happens in the mobile version of MSO, but not ...


8

You need to extend the spoiler Markdown across all of the lines. For instance, >! *PALPATINE*: Good, Anakin, good. I knew you could do it. Kill him. Kill him now! >! *ANAKIN*: I shouldn't . . . >! *PALPATINE*: Do it!! >! Anakin cuts off Count Dooku's head. renders as


8

I make a rather large distinction between major spoilers and everything else that might spoil some aspects of the future plot. Major spoiler would be something like Darth Vader being Luke's father or the final twist in The Sixth Sense. Age also plays a factor, the Star Wars spoiler I just mentioned is old enough and ingrained in popular culture that it doesn'...


7

This is implemented in the next version of the app, 1.0.29. And just to make things a bit meta (pun extremely intended):


7

Spoilers are obnoxious. Intentionally obnoxious - the whole point is to hide information on a site dedicated to sharing information. They should be used sparingly if at all. Making it slightly easier for readers to un-break a post that should never have been broken in the first place is a poor fix. Instead, when you encounter a lengthy post with multiple, ...


7

I'd argue that this rendering is beneficial. Rendering them as normal spoilers with hidden text is dangerous, as it allows users to insert new text into a block of hidden text that users may potentially not notice while reviewing. We don't want to end up with spam or completely different text in a spoiler simply because it's not shown by default while ...


7

I wrote something up that comes close to what you want: For every Question containing spoiler tags on Anime.SE, this query: Calculates the Post Length Calculates the Amount of Spoiler Chars in the Question Calculates the difference in Percent It then lists off the questions sorted by highest % of the question being a spoiler. Thanks to @rene I was able ...


6

Spoiler markup should never be mandatory and is more a courtesy for other users who have never bothered to watch the movie, television show or read the book discussed that's been out for some time. Inside a year is probably about how much leeway you should have. But then it's entirely possible to write a spoiler free title and first sentence or two without ...


6

Literature moderator here. Literature SE does not yet have a formalized spoiler policy. The issue has never come up yet. As Michael Mrozek said, there is no network-wide policy. I don't know if Literature will ever develop one, but for now common sense applies: if you are asking about something that can ruin the book for someone, mark it as a spoiler. I ...


6

In addition to the current "hover to show spoiler" functionality, the next build will allow clicking spoiler blocks to show them. Works on latest iPad Safari (the only device I tested on).


6

The grey box in your question has nothing to do with <!-- -->, which is a HTML comment. Text included between the <!-- and the --> will simply not appear, and is of limited use on Stack Exchange (but it does have some usefulness occasionally). It has everything to do with using >! at the beginning of your line, which is a spoiler quote: It's ...


Only top voted, non community-wiki answers of a minimum length are eligible