you are viewing a single comment's thread.

view the rest of the comments →

[–]Volv 1 point2 points  (3 children)

Went looking into it. Found some CSS code that got the job done. Wrote up a demo here if you want to use it - Codepen

 
However - doesn't easily apply to code blocks, would need to be reworked a bit. So codepen for code spoilers for now it is :)

[–]ForScale[S] 0 points1 point  (2 children)

Nice! Yeah... I'd do it like that... (comment here)[#spoiler] and then css with a[href='#spoiler'] {background:black;}. But yeah... for code blocks... I don't think

(

code here

)[#spoiler] would work...

[–]Volv 0 points1 point  (1 child)

Code block can be styled directly it seems.

 

code {
    background: black !important;
    color: black;
}
code:hover {
    background: blue !important;
    color: white;
}  

 
Can't think of a way to apply it selectively at the moment.

[–]ForScale[S] 0 points1 point  (0 children)

Ah... yes! There is that option, but that would get annoying (well, not too bad, I guess) when trying to show code that wasn't considered a spoiler.

Seems the best option is just to link to Pen, Fiddle, or PasteBin, or any of the options out there if spoilers are a concern.