模板:Small/doc

来自决策链云智库
< 模板:Small
Zeroclanzhang讨论 | 贡献2024年1月16日 (二) 18:27的版本 (创建页面,内容为“{{Documentation subpage}} {{High-risk| 901592 }} {{COinS safe|n}} {{Notice|As of June 10, 2016, a rule has been added to MediaWiki:Common.css, so now {{tag|small|o}} consistently renders at size that is 85% of the surrounding text. This template remains as a convenience wrapper.}} {{Template redirect|Smaller|Petit|HW-small|Sma}} == Usage == This template is a replacement for {{tag|small}}. Remember "Avoid using smaller font sizes in…”)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

Usage

This template is a replacement for small>>...</small>.

Remember "Avoid using smaller font sizes in elements that already use a smaller font size, such as infoboxes, navboxes and references sections", per MOS:ACCESS and MOS:SMALLFONT. Using this template within an infobox would produce a font size 75% of the page default, well below the 85% minimum specified in the linked guidelines.

The only parameter is the content and may contain templates, images, etc. if a block needs to be wrapped in this template and contains such elements. Note that if the = character appears in the content, the parameter must be explicitly specified as |1=.

Do not use this template to wrap multiple lines; doing so will cause Linter errors. If you need to wrap multiple list items or multiple paragraphs, use {{smalldiv}} around the entire block, or wrap each list item or paragraph separately.

Thus 模板:Done:

input shows
What a wonderful world What a wonderful world
{{small|What a wonderful world}} What a wonderful world
{{small|1=3 + 2 = 5}} 3 + 2 = 5
{{small|1=103}}
{{small|1=+ 2}}
——
{{small|1=105}}
103

+ 2

——

105

模板:Not done:

{{small|
*One
*Two
*Three}}

模板:Done:

{{smalldiv|
*One
*Two
*Three}}

Template data

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Small in articles based on its TemplateData.

TemplateData for Small

A template shortcut for the "small" HTML tag that makes the font smaller

模板参数

参数描述类型状态
Text1

The text that you'd like to be made smaller

字符串必需

Tracking category

See also

Font size templates
Code for inline content Code for block content Size Result
{{small|<text>}}
{{smaller|<text>}}
{{smalldiv|<text>}} 85% text
{{resize|<text>}} {{resizediv|<text>}} 90% text
{{midsize|<text>}} 92% text
none none 100% text
{{large|<text>}}
{{larger|<text>}}
{{big|<text>}}
{{largediv|<text>}} 120% text
{{huge|<text>}} 180% text
{{resize|<x%>|<text>}} {{resizediv|<x%>|<text>}} custom varies
{{font|<size=x%>}} custom varies