Template:Resize

From MozillaWiki
Jump to: navigation, search

{{{1}}}

Documentation icon Template documentation[view] [edit] [history] [purge]

Usage

{{resize}} resizes the output of the entered text string.

Parameters

There are 2 parameters, both unnamed, of which 1 is required and 1 is optional.

Syntax

The template's syntax is

  • {{resize|custom text|font size}}

Required parameter

1

Custom text string

The text that you want to resize. The parameter is unnamed, so no parameter name needs to be entered.

Usage
  • {{resize|custom text}}

Optional parameter

2

Custom font size

By default, the template resizes the input text string to 90% of the standard font size. You can enter another resizing value, if you want to. There are different ways of specifying resizing, some values are fixed, and others may be entered as font sizes in points or as a percentage of the standard font size. See the available value types below, under Available values.

Usage
  • {{resize|1|font size}}

Available values

For the 2nd parameter, there are a few value options.

Type Value type Value Template default Notes
Absolute sizes CSS value xx-small
x-small
small
medium
large
x-large
xx-large
Length: number value + pt e.g. 14pt Font size in pt. Negative lengths are invalid.
Percentage: number value + % e.g. 110%
90%
Font size in percent of the parent element's font size.
Relative sizes CSS value smaller Relative to the parent element's font size.
larger
Note
  • When using length or percentage, there can't be any space character between the number value and its unit (pt and %, respectively).

Examples

Correct use

Case What you type What you see
Control sample This text is not resized This text is not resized
No 2nd parameter This text is resized}} This text is resized
Absolute, CSS This text is resized|x-large}} This text is resized
Absolute, length This text is resized|8pt}} This text is resized
Absolute, percentage This text is resized|200%}} This text is resized
Relative, CSS This text is resized|smaller}} This text is resized

See also