Template:FontColor: Difference between revisions

From Atomix
mNo edit summary
mNo edit summary
 
(8 intermediate revisions by the same user not shown)
Line 9: Line 9:
}}
}}
</pre>
</pre>
Edit the page to see the template text.
You must specify the fonts using names (yellow,red) or [https://meta.wikimedia.org/wiki/Help:Text_color hexadecimal form]. Note that background (bg) or foreground (fg) can be left empty.
</noinclude><includeonly>
'''fg:''' {{{fg|}}}


'''bg:''' {{{bg|}}}
For example, <nowiki>{{FontColor|fg=white|bg=purple|text=this is white text on purple background}}</nowiki> yields {{FontColor|fg=white|bg=purple|text=this is white text on purple background}}.


'''text:''' {{{text|}}}
Edit the page to see the template text.
{{#if: {{{fg|}}} | | fg=black}}
</noinclude><includeonly><span style="color:{{{fg|}}}; background:{{{bg|}}}">{{{text|}}}</span></includeonly>
<span style="color:{{{fg|}}}; background:{{{bg|}}}">{{{text|}}}</span>
 
 
[[Category:Help]]
</includeonly>

Latest revision as of 00:53, 17 December 2021

This is the "FontColor" template. It should be called in the following format:

{{FontColor
|fg=
|bg=
|text=
}}

You must specify the fonts using names (yellow,red) or hexadecimal form. Note that background (bg) or foreground (fg) can be left empty.

For example, {{FontColor|fg=white|bg=purple|text=this is white text on purple background}} yields this is white text on purple background.

Edit the page to see the template text.