Jump to content

Template:Fs/doc

From Wikisource

Purpose

[edit]

This template simplifies formatting text that has a specified font-size in line. In contrast to {{font-size}}, it does not make sure the line-height is adjusted proportionally to the font size.

Examples

[edit]

Example: Basic

{{font-size|150%|font-size}}

font-size


Example: Style

{{font-size|150%|style=color:#FF0000;|RED}}

RED


Example: Line-height

{{font-size|200%|Lorem<br />ipsum}}

Lorem
ipsum

{{font-size|200%|line-height=100%|Lorem<br />ipsum}}

Lorem
ipsum


Usage notes

[edit]
  • sizes expressed as a percentage or in 'em' will give the best results
  • if the text being resized contains an equal sign it needs to be written as {{=}}

See also

[edit]

All Wikisource size templates are relative to the default size. There are two kinds of sizing template: inline and block templates. Inline templates are suitable for use within a paragraph, but can't handle paragraph breaks, and do not adjust line spacing. Block templates can handle paragraph breaks, and adjust line spacing, but are not suitable for use within a paragraph, as they will cause a paragraph break. See H:DIVSPAN for more details.

Font size definition by relative differences using words

[edit]
Inline template Block template Size 12pt/16px
default base[1]
Sample
{{xx-smaller}} {{xx-smaller block}} 58% 7pt/9px Lorem ipsum dolor sit amet,
{{x-smaller}} {{x-smaller block}} 69% 8pt/11px Lorem ipsum dolor sit amet,
{{smaller}} {{smaller block}} 83% 10pt/13px Lorem ipsum dolor sit amet,
{{fine}} {{fine block}} 92% 11pt/15px Template:Fine
100% 12pt/16px Lorem ipsum dolor sit amet,
{{m-larger}} {{m-larger block}} 110% 13pt/18px Template:M-larger
{{larger}} {{larger block}} 120% 14pt/19px Lorem ipsum dolor sit amet,
{{x-larger}} {{x-larger block}} 144% 17pt/23px Lorem ipsum dolor sit amet,
{{xx-larger}} {{xx-larger block}} 182% 22pt/29px Lorem ipsum dolor sit amet,
{{xxx-larger}} {{xxx-larger block}} 207% 25pt/33px Lorem ipsum dolor sit amet,
{{xxxx-larger}} {{xxxx-larger block}} 249% 30pt/40px Lorem ipsum dolor sit amet,
  1. Contemporary web browsers have largely standardized on a default base font size of 12pt or 16px.



No description.

Template parameters

ParameterDescriptionTypeStatus
11 size

no description

Unknownoptional
22

no description

Unknownoptional
line-heightline-height

no description

Unknownoptional
stylestyle

no description

Unknownoptional