Teamplaid:Resize
{{{1}}}
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. |
Coimeas - Comparison
deasaichCode | Equivalent | Result |
---|---|---|
{{smaller|text}} | {{Resize|90%|text}} | text |
{{larger|text}} | {{Resize|110%|text}} | text |
{{large|text}} | {{Resize|large|text}} | text |
Code | Size | Semantics | Result |
---|---|---|---|
{{Small|text}} | 85% | <small> |
text |
{{Mór|text|85%|0%}} | 85% | <small> |
text |
{{Resize|85%|text}} | 85% | <small> |
text |
{{Resize|small|text}} | 85% | <small> |
text |
{{Resize|Small|text}} | 85% | <small> |
text |
{{Smaller|text}} | 90% | none | text |
{{Mór|text|90%|0%}} | 90% | none | text |
{{Resize|text}} | 90% | none | text |
{{Resize|smaller|text}} | 90% | none | text |
{{Resize|Smaller|text}} | 90% | none | text |
{{Midsize|text}} | 92% | none | text |
{{Mór|text|92%|0%}} | 92% | none | text |
{{Resize|92%|text}} | 92% | none | text |
{{Resize|midsize|text}} | 92% | none | text |
{{Resize|Midsize|text}} | 92% | none | text |
none | 100% | none | text |
{{Mór|text|100%|0%}} | 100% | none | text |
{{Resize|100%|text}} | 100% | none | text |
{{Larger|text}} | 110% | none | text |
{{Mór|text|110%|0%}} | 110% | none | text |
{{Resize|110%|text}} | 110% | none | text |
{{Resize|larger|text}} | 110% | none | text |
{{Resize|Larger|text}} | 110% | none | text |
{{Mór|text}} | 120% | none | text |
{{Mór|text|120%|0%}} | 120% | none | text |
{{Resize|120%|text}} | 120% | none | text |
{{Resize|big|text}} | 120% | none | text |
{{Resize|Big|text}} | 120% | none | text |
{{Large|text}} | large | none | text |
{{Resize|large|text}} | Large | none | text |
{{Resize|Large|text}} | Large | none | text |
{{Huge|text}} | 180% | none | text |
{{Mór|text|180%|0%}} | 180% | none | text |
{{Resize|180%|text}} | 180% | none | text |
{{Resize|huge|text}} | 180% | none | text |
{{Resize|Huge|text}} | 180% | none | text |
{{Resize|x-large|text}} | 180% | none | text |
{{Resize|X-large|text}} | 180% | none | text |
{{Resize|XL|text}} | 180% | none | text |
{{Resize|xl|text}} | 180% | none | text |
{{Resize|Xl|text}} | 180% | none | text |
{{Resize|x%}} | custom | none | |
{{Font|size=x%}} | custom | none |
Faic cuideachd - Also see
The above documentation is transcluded from Teamplaid:Resize/documentation. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /documentation subpage. Subpages of this template. |
TemplateData
deasaichThis is the WP:TemplateData documentation for this template used by WP:VisualEditor and other tools; see the monthly parameter usage report for this template.
TemplateData for Resize
It is to change the font size of a text string. Two forms {{resize|<size>|<text>}} and {{resize|<text>}} are possible.
Paramadair | Tuairisgeul | Seòrsa | Staid | |
---|---|---|---|---|
Size/Text | 1 | Specifies a css font size e.g. '80%', '1.2em', 'x-large', 'larger'. In the one parameter version the first parameter is the text and the font size is '90%'. | Sreang | riatanach |
Text when size is given | 2 | The text to display in the two parameter version. | Sreang | roghainneil |