Jump to content

Template:Resize/doc: Difference between revisions

From pool
[checked revision][checked revision]
Content deleted Content added
Created page with "{{Documentation subpage}} {{Commons Import}} <!-- Please add categories at the bottom of this page, and interwikis at Wikidata (see Wikipedia:Wikidata) --> {{When pagename is..."
 
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Documentation subpage}}
{{Documentation subpage}}
{{Commons Import}}
<!-- Please add categories at the bottom of this page, and interwikis at Wikidata (see Wikipedia:Wikidata) -->
<!-- Please add categories at the bottom of this page, and interwikis at Wikidata (see Wikipedia:Wikidata) -->
{{When pagename is
{{When pagename is
| Template:Resize/doc = {{High-risk| 194909 }} {{COinS safe|n}} {{Resize/doc/main}}
| Template:Resize/doc = {{High-risk}} {{COinS safe|n}} {{Commons Import}}{{Resize/doc/main}}
| Template:Resize/sandbox = {{Resize/doc/main}}
| Template:Resize/sandbox = {{Commons Import}}{{Resize/doc/main}}
| Template:Resize = {{High-risk| 194909 }} {{COinS safe|n}} {{Resize/doc/main}}
| Template:Resize = {{High-risk}} {{COinS safe|n}} {{Commons Import}}{{Resize/doc/main}}
| /doc = <div style="margin:0.5em 0;">This template is a tailored shortcut to {{tl|resize}}.</div>
| /doc = <div style="margin:0.5em 0;">This template is a tailored shortcut to {{tl|resize}}.</div>
| other = {{COinS safe|n}} <div style="margin:0.5em 0;">This template is a tailored shortcut to {{tl|resize}}.</div>
| other = {{COinS safe|n}} {{Commons Import}}<div style="margin:0.5em 0;">This template is a tailored shortcut to {{tl|resize}}.</div>
}}
}}


== Comparison ==
{{Resize shortcuts}}
{{Font size templates}}


== See also ==
== See also ==
See wikipedia for more detail: [[wikipedia:Template:Resize]]
* [[:Category:Resizing templates]]
* [https://developer.mozilla.org/en-US/docs/Web/CSS/font-size font-size - CSS: Cascading Style Sheets | Mozilla Developer Network]


<includeonly>{{When pagename is
<includeonly>{{When pagename is

Latest revision as of 17:11, 17 October 2020

It is to change the font size of a text string.

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.

Examples

Code Result
This text defaults to 90% normal size.}} This text defaults to 90% normal size.
80%|This text is 80% normal size.}} This text is 80% normal size.
1.2em|This text is 0.2em larger than normal.}} This text is 0.2em larger than normal.
{{resize|We know 1+1=2 and 2+2=4. It will fail to render}} {{{1}}}
{{resize|We know 1+1{{=}}2 and 2+2{{=}}4.}} We know 1+1=2 and 2+2=4.
{{resize|1=We know 1+1=2 and 2+2=4.}} We know 1+1=2 and 2+2=4.
{{resize|120%|2=We know 1+1=2 and 2+2=4. This text is 120% normal size.}} We know 1+1=2 and 2+2=4. This text is 120% normal size.


See also

See wikipedia for more detail: wikipedia:Template:Resize