Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Co: Difference between revisions

Template page
Undo revision 112911 by Abelard andedare (talk)
Djavin novienta (talk | contribs)
Moved documentation to Template:Co/doc
Line 1: Line 1:
{{{{{|safesubst:}}}#if:{{{3|}}}|<span style="background-color:{{{2|inherit}}};color:{{{1|inherit}}};">{{{3|}}}</span>|<span style="color:{{{1|inherit}}};">{{{2|}}}</span>}}<noinclude>
<includeonly>{{{{{|safesubst:}}}#if:{{{3|}}}|<span style="background-color:{{{2|inherit}}};color:{{{1|inherit}}};">{{{3|}}}</span>|<span style="color:{{{1|inherit}}};">{{{2|}}}</span>}}</includeonly><noinclude>
 
{{documentation}}
==Template Code==
<nowiki>{{{{{|safesubst:}}}#if:{{{3|}}}|<span style="background-color:{{{2|inherit}}};color:{{{1|inherit}}};">{{{3|}}}</span>|<span style="color:{{{1|inherit}}};">{{{2|}}}</span>}}</nowiki>
 
Have fun if you can make sense of it.
 
==Usage==
<nowiki>{{co|<text color>|<background color>|<text>}}</nowiki>
 
==Example==
<nowiki>{{co|red||This text isn't yellow.}}</nowiki> {{co|red||This text isn't yellow.}}<br>
<nowiki>{{co||green|This text has a green background.}}</nowiki> {{co||green|This text has a green background.}}<br>
<nowiki>{{co|#0033CC||This text uses an HTML color code.}}</nowiki> {{co|#0033CC||This text uses an HTML color code.}}
 
Note the double brackets || which means that that section is empty. Do not miss brackets, all three are needed.
</noinclude>
</noinclude>