Hi all. I was wondering if anyone could recommend a file format that can provide a spoiler redacting style, similar to what we have at intfiction.org.
The reason is I am creating a document about IF and I want to provide examples from games without spoiling them. The document is currently text and the only option in text is to encode the spoiler in ROT13 and I would rather have a simple mechanism that is built into the file format.
I am thinking Markdown (.MD) right now. Does anyone have any other ideas or suggestions?
Spoiler-hiding is a question of presentation style. (For HTML documents, like forum pages, it’s CSS and Javascript.) Markdown says nothing about presentation style. You can use Markdown, but you’ll still have to make the decision about the CSS/Javascript that gets used to display it.
The forum uses CSS blur styles:
filter: blur(0.5em);
…together with a bit of Javascript that removes that style on click.
(It’s possible that there’s a way to do this with only CSS; I’m not sure.)
A venerable alternative is to display the text in white on a white background, and then ask the user to select or highlight the paragraph to read it. You can do this in a completely static document (CSS only). However, mobile web browsers have different ideas about highlighting so this trick tends not to work on phones.
Good point. The CSS I provided should still work for mobile, though. You’ll go from blurry to sharp in a single tap without the intermediate phase provided by hover.
What I’d love to figure out is how to make an invisiClues class. You’d scrub over the text with the mouse like the marker to reveal the text below, which would eventually fade back again. Certainly it could be done with JavaScript. I don’t know if it could be done with pure CSS, though.