Template:Resize/doc: Difference between revisions

From HIBIKIFORUM
Jump to navigation Jump to search
(Created page with "{{Documentation subpage}} {{template rating|p}} ==Usage== <code><nowiki>{{resize|N|text}}</nowiki></code> — N specifies a size, such as "95%", "1.2em", etc. <code><nowiki>...")
 
Line 10: Line 10:
{{font color|red|Beware}} that if <code>text</code> happens to contain an equality sign (=), it will fail to render properly. Here are the workarounds:
{{font color|red|Beware}} that if <code>text</code> happens to contain an equality sign (=), it will fail to render properly. Here are the workarounds:


Replace all instances of <code>=</code> with <code><nowiki>{{=}}</nowiki></code>, or Specify <code><nowiki>{{resize|N|2=text}}</nowiki></code> or <code><nowiki>{{resize|1=text}}</nowiki></code>.
<ol>
<li>Replace all instances of <code>=</code> with <code><nowiki>{{=}}</nowiki></code>, or </li>
<li>Specify <code><nowiki>{{resize|N|2=text}}</nowiki></code> or <code><nowiki>{{resize|1=text}}</nowiki></code>.</li>
</ol>


Also it will fail to wrap multiple blocks, such as multiple paragraphs or multiple bullet points. Here are the workarounds:
Also it will fail to wrap multiple blocks, such as multiple paragraphs or multiple bullet points. Here are the workarounds:
 
<ol>
Use, for example,
<li>Use, for example,<br />
<code><nowiki><div style="font-size:90%;"></nowiki></code>
<code><nowiki><div style="font-size:90%;"></nowiki></code><br />
...multiple paragraphs...
...multiple paragraphs...<br />
<code><nowiki></div></nowiki></code>, or
<code><nowiki></div></nowiki></code>, or </li>
Apply this template separately to each block of paragraph, bullet point etc.
<li>Apply this template separately to each block of paragraph, bullet point etc.</li>
</ol>

Revision as of 04:03, 22 April 2021

Light bulb.png }}
It contains usage information, categories and other content that is not part of the original template page.

Template:Template rating

Usage

{{resize|N|text}} — N specifies a size, such as "95%", "1.2em", etc.

{{resize|text}} — If N is omitted, as in the second line above, a default 90% size is applied.

Beware

Beware that if text happens to contain an equality sign (=), it will fail to render properly. Here are the workarounds:

  1. Replace all instances of = with {{=}}, or
  2. Specify {{resize|N|2=text}} or {{resize|1=text}}.

Also it will fail to wrap multiple blocks, such as multiple paragraphs or multiple bullet points. Here are the workarounds:

  1. Use, for example,
    <div style="font-size:90%;">
    ...multiple paragraphs...
    </div>, or
  2. Apply this template separately to each block of paragraph, bullet point etc.