Difference between revisions of "Template:Code/sandbox2"
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/ | + | *Foo bar {{code/sandbox2|fee fi fo fum}} baz quux. |
| − | *Foo bar {{code/ | + | *Foo bar {{code/sandbox2|lang=html5|<div id{{=}}"quux" class{{=}}"weasel-razor">blah blah blah</div>}} baz quux. |
| − | *Measure me: ! ! {{code/ | + | *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}} ! ! {{tlx|kbd|spacing{{=}}n}} | *Measure me: ! ! {{kbd|! !|spacing=n}} ! ! {{tlx|kbd|spacing{{=}}n}} | ||
*Measure me: ! ! {{samp|! !}} ! ! {{tlx|samp}} | *Measure me: ! ! {{samp|! !}} ! ! {{tlx|samp}} | ||
| − | *Measure me: ! ! {{code/ | + | *Measure me: ! ! {{code/sandbox2|! !}} ! ! {{tlx|code/sandbox}} |
*Measure me: ! ! {{code|! !}} ! ! {{tlx|code}} | *Measure me: ! ! {{code|! !}} ! ! {{tlx|code}} | ||
*Measure me: ! ! <code>! !</code> ! ! {{tag|code|open}} | *Measure me: ! ! <code>! !</code> ! ! {{tag|code|open}} | ||
Revision as of 22:36, 22 June 2011
{{{1}}}
- New code
- Foo bar
baz quux.fee fi fo fum - Foo bar
baz quux.<div id="quux" class="weasel-razor">blah blah blah</div> - 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 fumbaz 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>