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 &...


18

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.


18

The spoiler feels very 1998. It reminds me of the <marquee> tag, but I like it. I think the current spoiler-guard isn't clear what it is. At first it just looks like the poster made a mistake and left a blank box.   The spoiler shouldn't reveal what is under it on flyover. It should require a click. It should be clearer that it hides some ...


14

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 ...


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

Example:


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 ...


11

The spoiler quote 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: ...


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

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 ...


9

This isn't supported. Everything inside a spoiler block is treated as a single paragraph of text. If you want to use block elements inside of it, then you'll have to be explicit about making everything a block element, like this: >! <p>Line 1</p> >! <blockquote>Line 2</blockquote> >! <p>Line 3</p> Line 3 While ...


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 to ...


7

As @muru notes in the comments, this can be done by user styles; small snippets of CSS which can be added to a webpage with an extension like Stylus. The first block below adds a quotation mark to blockquotes; the second one changes the background of a spoiler block to the 'scratchable screen surface' from @bobobobo's answer. blockquote:not([class=""]):not(....


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

That is a bug indeed, but with a simple fix. This CSS overrides the styling on tags when inside a spoiler: .spoiler .required-tag { background-color: transparent; border-color: transparent; } .spoiler .post-tag { background-color: transparent; border-color: transparent; } .spoiler .moderator-tag { background-color: transparent; ...


6

Thanks for bringing this up. This behaviour is currently by design. I'm not sure that we want to make this change, just because people might find spoilers in search by accident (which defeats the purpose really). If the community agrees en masse, then we'll consider the change. Another option is to make the text in the spoiler searchable, but not display ...


6

I agree with animuson that it shouldn't be completely hidden, but I also agree with you that it'd be nice to have spoilers look different from normal blockquotes. So I've settled on this: Spoilers in diffs still fade out like in normal question/answer views, but not to complete transparency. With that, from the next build on, it will look like this: (That'...


6

Spoilers hide blocks of text that are only be visible when a user moves their mouse over it. They are implemented similar 'block quotes', so they apply to paragraphs only. You cannot apply hidden text to individual words. The syntax looks like this: >! Spoiler alert: Don't hover below, or you will be shocked!


5

I just noticed this behavior, and would request that this be changed. When searching, the expectation is that this will search the site's posts, not just the stuff that's outside spoiler blocks. For example, if I've seen all of the Star Wars films and am doing searches on a certain event in Empire Strikes Back, I'm going to want to find the posts about ...


5

The query from @Magisch is pretty impressive so let me offer an alternative, both in the source tables used as in the approach. Where @Magisch uses the Post table, that contains the generated HTML you also find in a page, I decided to look at the actual markdown. That is what you see when you edit a post. The markdown is found in the posthistory table for ...


5

This is already possible in a way that lets you see all spoilers at once. Simply click each spoiler to cause it to not disappear. (Clicking again returns it to normal.) This works in both edit histories and while viewing posts normally—and probably everywhere else you'd see a spoiler.


5

It looks like a new CSS update just implemented this feature request: Blockquotes don't have the yellow background anymore, and the background for spoilers has been changed to a light gray.


5

This has been fixed as of the latest round of spoiler fixes. I just missed updating this post at that time. Thanks for the report!


4

I think that the only reasonable way to do this, as perhaps you intended, is to remove the spoiler content entirely from the email. Otherwise you would have to include them as hidden text in the email, which contains the message twice over, once as plain text and once as HTML. It would not be possible in the plain text and might be hard to do for all ...


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