Difference between revisions of "Template:Resize"
From MansunWiki
(Created page with "{{#if:{{{2|}}} |<span style="font-size:{{{1|}}};">{{{2|}}}</span> |<span style="font-size:90%;">{{{1}}}</span> }}<noinclude> {{documentation}} {{Resize/TemplateData}} <!--PLEA...") |
(No difference)
|
Latest revision as of 20:38, 15 July 2015
{{{1}}}
This documentation is transcluded from Template:Resize/doc. (edit | history)
Note to editors: Please don't categorize this template by editing it directly. Instead, place the category in its documentation page, in its "includeonly" section.
Note to editors: Please don't categorize this template by editing it directly. Instead, place the category in its documentation page, in its "includeonly" section.
A template to aid switching the font-size used for a text string.
Syntax
-
{{resize|N|text}}
-
{{resize|text}}
N specifies a size, such as "95%", "1.2em", etc. If N is omitted, as in the second line above, a default 90% size is applied.
If text
happens to contain an equality sign ("="), specify {{resize|N|2=text}} or {{resize|1=text}}.
Examples
{{resize|1.2em|This text is 0.2em larger than normal.}} |
This text is 0.2em larger than normal. |
{{resize|80%|This text is 80% normal size.}} |
This text is 80% normal size. |
{{resize|This text defaults to 90% normal size.}} |
This text defaults to 90% normal size. |
Tailored shortcuts
{{small|…}} | = | {{resize|85%|…}} |
{{smaller|…}} | = | {{resize|90%|…}} |
{{larger|…}} {{bigger|…}} |
= | {{resize|110%|…}} |
{{big|…}} | = | {{resize|120%|…}} |
{{large|…}} | = | {{resize|large|…}} |
See also
Template | Size | Semantics | Sample |
---|---|---|---|
{{small}} |
85% | <small> |
HHHHH |
{{smaller}} |
90% | none | HHHHH |
{{midsize}} |
92% | none | HHHHH |
none | 100% | none | HHHHH |
{{larger}} |
110% | none | HHHHH |
{{big}} |
120% | none | HHHHH |
{{large}} |
large | none | HHHHH |
{{huge}} |
180% | none | HHHHH |
{{resize}} |
90% default | none | HHHHH |
{{font|size}} |
TemplateData
This is the TemplateData documentation for this template used by VisualEditor and other tools.
Resize
<templatedata>{
"description": "Template to aid switching the font-size used for a text string. Two forms <span style="font-size:<size>;"><text></span> and <text> are possible.",
"params": {
"1": {
"label": "Size/Text",
"description": "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%'.",
"type": "string",
"required": true
},
"2": {
"label": "Text when size is given",
"description": "The text to display in the two parameter version.",
"type": "string",
"required": false
}
}
} </templatedata>