Teamplaid:Resize/doc/main
It is to change the font size of a text string.
Ùsaid - Usage
deasaich{{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.
Thoir an aire - Beware
deasaichBeware that if text
happens to contain an equality sign (=
), it will fail to render properly. Here are the workarounds:
- Replace all instances of
=
with {{=}}, or - 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:
- Use, for example,
<div style="font-size:90%;">
...multiple paragraphs...</div>
, or - Apply this template separately to each block of paragraph, bullet point etc.
Eisimpleirean - Examples
deasaichCode | Result |
---|---|
{{Resize|This text defaults to 90% normal size.}} |
This text defaults to 90% normal size. |
{{Resize|80%|This text is 80% normal size.}} |
This text is 80% normal size. |
{{Resize|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. |