Template:Fs: Difference between revisions
From Step Mods | Change The Game
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
<includeonly><span style="font-size:{{{1|1em}}}">{{{2}}}</span></includeonly><noinclude>__NOTOC__ [[Category:Formatting Templates]][https://stepmodifications.org/forum/topic/9769-font-color/ '''Forum Topic'''] | <includeonly><span style="font-size:{{{1|1em}}}">{{{text|{{{2|}}}}}}</span></includeonly><noinclude>__NOTOC__ [[Category:Formatting Templates]][https://stepmodifications.org/forum/topic/9769-font-color/ '''Forum Topic'''] | ||
==Purpose & Usage== | ==Purpose & Usage== | ||
This template is used to change text size. | |||
{{Alert|text=Always use a 'named' second parameter (text) when using this template to color text that includes an equal ('=') symbol to avoid parser errors.}} | |||
: | === Required Parameters === | ||
This template uses 'anonymous' and optionally 'named' parameters, and all are required and must appear in a particular order. | |||
<span class="salmontx">'''First Prameter - font size'''</span> - Sets the size of text | |||
: '''Values''' | |||
:: Any [https://www.w3schools.com/cssref/pr_font_font-size.asp valid CSS font-size] ('rem' or '%' units preferred) | |||
<span class="salmontx">'''Second Prameter - text'''</span> - Sets the text to be colored | |||
: '''Values''' | |||
:: Free text (this parameter can also be 'named' if the text to be sized includes an equal ('=') symbol) | |||
=== Optional Parameters === | |||
Not applicable. | |||
==Examples== | ==Examples== | ||
'''Code:''' <code><nowiki>{{Fs|30px|This is 30px font.}}</nowiki></code> | |||
'''Code:''' <code><nowiki>{{Fs|30px|This is font | |||
'''Result:''' {{Fs|30px|This is font | '''Result:''' {{Fs|30px|This is 30px font.}} | ||
<hr class="my-5"> | <hr class="my-5"> | ||
Line 20: | Line 32: | ||
<hr class="my-5"> | <hr class="my-5"> | ||
'''Code:''' <code><nowiki> | '''Code:''' <code><nowiki>{{Fs|large|Font that is larger}} than the default site font</nowiki></code> | ||
'''Result:''' | '''Result:''' {{Fs|large|Font that is larger}} than the default site font | ||
== See Also == | == See Also == |
Revision as of 15:45, September 22, 2021
Purpose & Usage[edit source]
This template is used to change text size.
NOTE
Always use a 'named' second parameter (text) when using this template to color text that includes an equal ('=') symbol to avoid parser errors.Required Parameters[edit source]
This template uses 'anonymous' and optionally 'named' parameters, and all are required and must appear in a particular order.
First Prameter - font size - Sets the size of text
- Values
- Any valid CSS font-size ('rem' or '%' units preferred)
Second Prameter - text - Sets the text to be colored
- Values
- Free text (this parameter can also be 'named' if the text to be sized includes an equal ('=') symbol)
Optional Parameters[edit source]
Not applicable.
Examples[edit source]
Code: {{Fs|30px|This is 30px font.}}
Result: This is 30px font.
Code: This shows how {{Fs|80%|users can mix {{Fs|25px|font sizes}} for various applications.}}
Result: This shows how users can mix font sizes for various applications.
Code: {{Fs|large|Font that is larger}} than the default site font
Result: Font that is larger than the default site font
See Also[edit source]