Sometimes there are questions which could benefit from additional information in an unobstrusive way. Example:

A question about a bug in an MCVE with sample data to use. It might be nice to allow hiding the example data for better overview, especially with long sample data.

Spoilers are a bad way to go about this. Mainly because they use the same screen real-estate as the content they hide:

Spoiler blocks
are just as long
as their content
without any good reason!

There's also another way of hiding text: Stack-Snippets. But snippets currently don't allow this in an arbitrary manner. The only allowed languages for snippets are: html, css, js. This is sligtly unfriendly, especially when it's not possible to open a snippet without declaring one of these languages at the top:

<!-- begin snippet: (html|css|js) hide: (true|false) -->

It might be worth allowing to specify arbitrary languages or at least none, which will be displayed in the snippet block.

Most spoiler blocks I see on other sites are just:

var showspoiler = function() {
.spoiler {
  display: none;
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input type="button" id="showspoiler" onclick="showspoiler()" value="[Spoiler]" />
<div class="spoiler">Some spoiler text
  <br/>with multiple lines
  <br/>that don't show up
  <br/>before the spoiler is expanded</div>

well they are significantly shorter than the spoiler syntax used here.

This would allow users to better manage the screen real-estate of their questions / answers. This would allow hiding of "boring and maybe not required details"

  • 2
    I once asked this, got markes as duplicate of a declined request. – MarioDS Jan 17 '15 at 1:05
  • @MDeSchaepmeester Seems odd to decline this, seeing that's how spoilers already work on mobile. – Martin Ender Jan 26 '15 at 8:02
  • One alternative to hiding (which has SEO impact) is to allow to move context to the bottom of a page (below answers). Another alternative is to offer hosting of tests like github gists for questions, similar as for images in imgur. I'll open a question for that. – tkruse Dec 3 '17 at 3:44

You must log in to answer this question.

Browse other questions tagged .