Difference between revisions of "Template:WFont"
Jump to navigation
Jump to search
m (added another example) |
(added 'back_color' and 'back_rgb' to fields, re-worked the explanation, re-worked the examples) |
||
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: {{{ | <includeonly><span {{ #if: {{{id|}}} | id='{{{id}}}' | }} style='{{ #if: {{{family|}}} | font-family:{{{family}}}; | }} {{ #if: {{{size|}}} | font-size:{{{size}}}; | }} {{ #if: {{{weight|}}} | font-weight:{{{weight}}}; | }} {{ #if: {{{color|}}} | color:{{{color}}}; | }} {{ #if: {{{rgb|}}} | color:rgb({{{rgb}}}); | }} {{ #if: {{{back_color|}}} | background-color:{{{back_color}}}; | }} {{ #if: {{{back_rgb|}}} | background-color:rgb({{{back_rgb}}}); | }}'>{{{text|}}}</span></includeonly><noinclude> | ||
== Usage == | == Usage == | ||
Line 8: | Line 8: | ||
|family= | |family= | ||
|size= | |size= | ||
|weight= | |||
|color= | |color= | ||
|rgb= | |rgb= | ||
| | |back_color= | ||
|back_rgb= | |||
|}}</nowiki></pre></code></div> | |}}</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 <span style="font-family:monospace;font-size:10pt">color</span> and <span style="font-family:monospace;font-size:10pt">back_color<span> allow for HEX color specifications. | |||
Both <span style="font-family:monospace;font-size:10pt">rgb</span> and <span style="font-family:monospace;font-size:10pt">back_rgb</span> allow 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>. | <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>. | ||
Line 24: | Line 28: | ||
This is {{wFont|size=10px|family=monospace|rgb=255,64,128|text=my line|}} of text. | This is {{wFont|size=10px|family=monospace|rgb=255,64,128|text=my line|}} of text. | ||
<div style="font-size:140%"><code><pre><nowiki>This is yet {{wFont|size=large|family=serif|color=orange|text=more of my|}} of text.</nowiki></pre></code></div> | <div style="font-size:140%"><code><pre><nowiki>This is yet {{wFont|size=large|family=serif|color=orange|back_color=blue|text=more of my|}} of text.</nowiki></pre></code></div> | ||
This is yet {{wFont|size=large|family=serif|color=orange|text=more of my|}} of text. | This is yet {{wFont|size=large|family=serif|color=orange|back_color=blue|text=more of my|}} of text. | ||
</noinclude> | </noinclude> |
Revision as of 14:07, 30 March 2008
Usage
Minimum Requirements
{{wFont|
|id=
|family=
|size=
|weight=
|color=
|rgb=
|back_color=
|back_rgb=
|}}
Both color and back_color allow for HEX color specifications.
Both rgb and back_rgb allow for an RGB specification.
size requires either pt or px.
All fields expect CSS values.
Examples
This is {{wFont|size=10px|family=monospace|rgb=255,64,128|text=my line|}} of text.
This is my line of text.
This is yet {{wFont|size=large|family=serif|color=orange|back_color=blue|text=more of my|}} of text.
This is yet more of my of text.