Template:Code/sandbox2

From blackwiki
Jump to navigation Jump to search

{{{1}}}

New code
  • Foo bar fee fi fo fum baz quux.
  • Foo bar <div id="quux" class="weasel-razor">blah blah blah</div> baz quux.
  • Measure me: ! ! ! ! ! !

Spaces between proportional and monospaced segments are (depending on browser) precisely or very close to precisely the same as the spaces between characters inside the monospaced segment (which are necessarily larger than those between characters in the proportional segments).

Old code
  • Foo bar fee fi fo fum baz quux.
  • Foo bar <div id="quux" class="weasel-razor">blah blah blah</div> baz quux.
  • Measure me: ! ! ! ! ! !

Spaces between proportional and monospaced segments are (depending on browser) farcically smaller than the spaces between characters inside the monospaced segment, making the content weird-looking and hard to parse.

Comparisons

Blow up your font size to twice normal or so, and get out a ruler.

  • Measure me: ! ! ! ! ! !  {{kbd}} (intentionally wider padding to match wider monospacing)
  • Measure me: ! ! ! ! ! !  {{kbd|spacing=n}}
  • Measure me: ! ! ! ! ! !  {{samp}}
  • Measure me: ! ! ! ! ! !  {{code/sandbox2}}
  • Measure me: ! ! ! ! ! !  {{code}}
  • Measure me: ! ! ! ! ! !  <code>

For cases where the padding left or right is undesirable, use |l=n or |r=n (or any other value, like 'no" or "0", with either parameter: