Difference between revisions of "Template:WFont"
Jump to navigation
Jump to search
(added comment and exmaple) |
|||
Line 1: | Line 1: | ||
<includeonly><span {{ #if: {{{id|}}} | id='{{{id}}}' | }} style='{{ #if: {{{family|}}} | font-family:{{{family}}}; | }} {{ #if: {{{size|}}} | font-size:{{{size}}}; | }} {{ #if: {{{color|}}} | color:{{{color}}}; | }} {{ #if: {{{rgb|}}} | color:rgb({{{rgb}}}); | }} {{ #if: {{{weight|}}} | font-weight:{{{weight}}}; | }}'>{{{text|}}}</span></includeonly><noinclude> | <includeonly><span {{ #if: {{{id|}}} | id='{{{id}}}' | }} style='{{ #if: {{{family|}}} | font-family:{{{family}}}; | }} {{ #if: {{{size|}}} | font-size:{{{size}}}; | }} {{ #if: {{{color|}}} | color:{{{color}}}; | }} {{ #if: {{{rgb|}}} | color:rgb({{{rgb}}}); | }} {{ #if: {{{weight|}}} | font-weight:{{{weight}}}; | }}'>{{{text|}}}</span></includeonly><noinclude> | ||
This is {{wFont|family=monospace|rgb=64,64,128|text=my line|}} of text. | == Usage == | ||
'''Minimum Requirements''' | |||
<div style="font-size:140%"><code><pre><nowiki>{{wFont| | |||
|id= | |||
|family= | |||
|size= | |||
|color= | |||
|rgb= | |||
|weight= | |||
|}}</nowiki></pre></code></div> | |||
<span style="font-family:monospace;font-size:10pt">color</span> and <span style="font-family:monospace;font-size:10pt">rgb</span> both set the text color but the former allows a HEX specification and the latter allows for an RGB specification. | |||
<span style="font-family:monospace;font-size:10pt">size</span> requires either <span style="font-family:monospace;font-size:10pt">pt</span> or <span style="font-family:monospace;font-size:10pt">px</span>. | |||
== Examples == | |||
<div style="font-size:140%"><code><pre><nowiki>This is {{wFont|size=10px|family=monospace|rgb=255,64,128|text=my line|}} of text.</nowiki></pre></code></div> | |||
This is {{wFont|size=10px|family=monospace|rgb=255,64,128|text=my line|}} of text. | |||
</noinclude> | </noinclude> |
Revision as of 13:40, 30 March 2008
Usage
Minimum Requirements
{{wFont|
|id=
|family=
|size=
|color=
|rgb=
|weight=
|}}
color and rgb both set the text color but the former allows a HEX specification and the latter allows for an RGB specification.
size requires either pt or px.
Examples
This is {{wFont|size=10px|family=monospace|rgb=255,64,128|text=my line|}} of text.
This is my line of text.