Difference between revisions of "Template:Code/sandbox2"

From blackwiki
Jump to navigation Jump to search
imported>SMcCandlish
(moving spacing test cases ehre from main sandbox)
 
imported>SMcCandlish
(path fix)
Line 2: Line 2:
  
 
;New code:
 
;New code:
*Foo bar {{code/sandbox|fee fi fo fum}} baz quux.
+
*Foo bar {{code/sandbox2|fee fi fo fum}} baz quux.
*Foo bar {{code/sandbox|lang=html5|<div id{{=}}"quux" class{{=}}"weasel-razor">blah blah blah</div>}} baz quux.
+
*Foo bar {{code/sandbox2|lang=html5|<div id{{=}}"quux" class{{=}}"weasel-razor">blah blah blah</div>}} baz quux.
*Measure me: ! ! {{code/sandbox|! !}} ! !
+
*Measure me: ! ! {{code/sandbox2|! !}} ! !
 
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).
 
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).
  
Line 18: Line 18:
 
*Measure me: ! ! {{kbd|! !|spacing=n}} ! !&nbsp;&nbsp;{{tlx|kbd|spacing{{=}}n}}
 
*Measure me: ! ! {{kbd|! !|spacing=n}} ! !&nbsp;&nbsp;{{tlx|kbd|spacing{{=}}n}}
 
*Measure me: ! ! {{samp|! !}} ! !&nbsp;&nbsp;{{tlx|samp}}
 
*Measure me: ! ! {{samp|! !}} ! !&nbsp;&nbsp;{{tlx|samp}}
*Measure me: ! ! {{code/sandbox|! !}} ! !&nbsp;&nbsp;{{tlx|code/sandbox}}
+
*Measure me: ! ! {{code/sandbox2|! !}} ! !&nbsp;&nbsp;{{tlx|code/sandbox}}
 
*Measure me: ! ! {{code|! !}} ! !&nbsp;&nbsp;{{tlx|code}}
 
*Measure me: ! ! {{code|! !}} ! !&nbsp;&nbsp;{{tlx|code}}
 
*Measure me: ! ! <code>! !</code> ! !&nbsp;&nbsp;{{tag|code|open}}
 
*Measure me: ! ! <code>! !</code> ! !&nbsp;&nbsp;{{tag|code|open}}

Revision as of 22:36, 22 June 2011

​{{{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/sandbox}}
  • Measure me: ! ! ! ! ! !  {{code}}
  • Measure me: ! ! ! ! ! !  <code>