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
Proton One (talk | contribs)
Adding design variable colors
 
(4 intermediate revisions by 3 users not shown)
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:{{design var|{{{1|inherit}}}}};">{{{3|}}}</span>|<span style="color:{{design var|{{{1|inherit}}}}};">{{{2|}}}</span>}}</includeonly><noinclude>
 
{{documentation}}
==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>