A couple of hours ago the venerable hermit Xiong was opining in the monastery courtyard on the lack of a standard way of posting the output of a script on the monastery notice boards.
Some fellow monks (myself included at times) have used the <code> tags to do this, but in cases of notices containing both code and output, this leads to a lack of visual distinction between the two. Some monks may have customised their display settings for code (adding line numbers and so forth) in a manner inappropriate for displaying script output.
An ideal solution would be for the monastery to adopt HTML's <samp> element which is designed for this very purpose: marking up sample output. It could perhaps be implemented in a manner similar to <code>, so that its contents are automatically escaped, whitespace preserved, etc.
In the mean time I have taken to including output samples like this:
<code> use Modern::Perl; say "Hello world!"; </code> <pre class="output"> Hello world! </pre>
On 450961 you can add some custom CSS to display <pre class="output"> nicely. Right now I'm using:
pre.output { color: #006; background:#ddf url(http://buzzword.org.uk/2012/output) no-repeat sc +roll top right; padding:0.33em; border:1px solid; font-size:90%; line-height:1.05; } pre.output em { font-style: italic; color: black; } pre.output strong { font-weight: bolder; color: black; }
But you can use whatever you like.
|
|---|