Template:Key press: Difference between revisions

Jump to navigation Jump to search
Should now in be safe from line breaks most cases; etc
m (Making the template markup slightly easier to follow)
(Should now in be safe from line breaks most cases; etc)
Line 1: Line 1:
<span style="border: 1px solid #777; padding: 1px 3px; background: #eee; font-family: inherit; font-size: 0.85em; text-transform: none;">{{{1|Key}}}</span>{{#if: {{{2|}}}
<span style="white-space: nowrap;><!--
  | +<span style="border: 1px solid #777; padding: 1px 3px; background: #eee; font-family: inherit; font-size: 0.85em; text-transform: none;">{{{2}}}</span>
--><span style="border: 1px solid #777; padding: 1px 3px; background: #eee; font-family: inherit; font-size: 0.85em; text-transform: none;">{{{1|Key}}}</span><!--
  | }}{{#if: {{{3|}}}
-->{{#if: {{{2|}}}
  | +<span style="border: 1px solid #777; padding: 1px 3px; background: #eee; font-family: inherit; font-size: 0.85em; text-transform: none;">{{{2}}}</span>
  |
}}{{#if: {{{3|}}}
  | +<span style="border: 1px solid #777; padding: 1px 3px; background: #eee; font-family: inherit; font-size: 0.85em; text-transform: none;">{{{3}}}</span>
  | +<span style="border: 1px solid #777; padding: 1px 3px; background: #eee; font-family: inherit; font-size: 0.85em; text-transform: none;">{{{3}}}</span>
  | }}{{#if: {{{4|}}}  
  |
}}{{#if: {{{4|}}}  
  | +<span style="border: 1px solid #777; padding: 1px 3px; background: #eee; font-family: inherit; font-size: 0.85em; text-transform: none;">{{{4}}}</span>
  | +<span style="border: 1px solid #777; padding: 1px 3px; background: #eee; font-family: inherit; font-size: 0.85em; text-transform: none;">{{{4}}}</span>
  | }}<noinclude>
  |
}}<!--
--></span><noinclude>
{{Informative template|1=
{{Informative template|1=
__NOTOC__
__NOTOC__
Line 22: Line 28:


== Known issues ==
== Known issues ==
* In some cases workarounds will be required. Two of them are for example the captions {{key press|{{!}}}} and {{key press|{{=}}}} which would require you to insert <code><nowiki>{{!}}</nowiki></code> or  <code><nowiki>{{=}}</nowiki></code> instead of <code>{{!}}</code> or <code>{{=}}</code>, since using a "{{!}}" or "{{=}}" inside a template will break it.
* For some captions workarounds will be required. Two of them are for example the captions {{key press|{{!}}}} and {{key press|{{=}}}} which would require you to insert <code><nowiki>{{!}}</nowiki></code> or  <code><nowiki>{{=}}</nowiki></code> instead of <code>{{!}}</code> or <code>{{=}}</code>, since using a "{{!}}" or "{{=}}" inside a template will break it.


* This template currently wraps, so that for example {{key press|Page up}} may end up having two half boxes with "Page" at the end of one line and "up" at the beginning of the following line.
* If a line breaks right before the template the leftmost key border stays on that line.


== To do ==
== To do ==

Navigation menu