Template:Color: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 1: Line 1:
<includeonly>{{#css:.custom-link a {color:inherit!important}
<includeonly>{{#css:.custom-link a {color:inherit!important}
}}
}}
{{#if: {{{link|}}}
<span style="color: {{trim|{{{1|}}}}}; {{#if: {{{3|}}}|background-color: {{trim|{{{2|}}}}};}} {{#if: {{{size|}}}|font-size: {{trim|{{{size|}}}}}px;}}" class="custom-link {{{class|}}}">{{#if: {{{link|}}} | [[{{#ifeq:{{{link|}}}|1||{{{link|}}}{{!}}}}{{trim|{{#if: {{{3|}}}|{{{3|}}}|{{{2|}}}}}}}]] | {{trim|{{#if: {{{3|}}}|{{{3|}}}|{{{2|}}}}}}} }}</span>
| <span style="color: {{trim|{{{1|}}}}}; {{#if: {{{3|}}}|background-color: {{trim|{{{2|}}}}};}} {{#if: {{{size|}}}|font-size: {{trim|{{{size|}}}}}px;}}" class="custom-link {{{class|}}}">[[{{#ifeq:{{{link|}}}|yes||{{{link|}}}{{!}}}}{{trim|{{#if: {{{3|}}}|{{{3|}}}|{{{2|}}}}}}}]]</span>
| <span style="color: {{trim|{{{1|}}}}}; {{#if: {{{3|}}}|background-color: {{trim|{{{2|}}}}};}} {{#if: {{{size|}}}|font-size: {{trim|{{{size|}}}}}px;}}" class="custom-link {{{class|}}}">
{{trim|{{#if: {{{3|}}}|{{{3|}}}|{{{2|}}}}}}}
</span>}}
</includeonly><noinclude>
</includeonly><noinclude>
== Usage ==
== Usage ==
  <nowiki>{{color|textcolor|bgcolor|text|link=yes/link|size=number}}</nowiki>
  <nowiki>{{color|textcolor|bgcolor|text|link=1/link|size=number|b=1|i=1}}</nowiki>
== Parameters ==
== Parameters ==
(colors accept any [https://developer.mozilla.org/en-US/docs/Web/CSS/color_value CSS3] colors)
(colors accept any [https://developer.mozilla.org/en-US/docs/Web/CSS/color_value CSS3] colors)
Line 15: Line 11:
*<nowiki>{{color|textcolor|bgcolor|</nowiki>'''text'''<nowiki>}}</nowiki> - content (second or third parameter, depending on whether '''bgcolor''' was provided)
*<nowiki>{{color|textcolor|bgcolor|</nowiki>'''text'''<nowiki>}}</nowiki> - content (second or third parameter, depending on whether '''bgcolor''' was provided)
*'''size''' - size of the font in pixels
*'''size''' - size of the font in pixels
*'''link''' - if '''yes''' provided, creates a local link from the '''content''' provided. Any other parameter creates a local link from the '''link''' parameter itself.
*'''link''' - if '''1''' provided, creates a local link from the '''content''' provided. Any other parameter creates a local link from the '''link''' parameter itself.
*'''b''' - if '''1''', apply bold style
*'''i''' - if '''1''', apply italic style


== Examples ==
== Examples ==
Line 22: Line 20:
  <nowiki>{{color|white|teal|Lorem ipsum}}</nowiki>
  <nowiki>{{color|white|teal|Lorem ipsum}}</nowiki>
result: {{color|white|teal|Lorem ipsum}}
result: {{color|white|teal|Lorem ipsum}}
<nowiki>{{color|teal|Lorem ipsum|b=1|i=1}}</nowiki>
result: {{color|teal|Lorem ipsum|b=1|i=1}}
  <nowiki>{{color|teal|Lorem ipsum|size=25}}</nowiki>
  <nowiki>{{color|teal|Lorem ipsum|size=25}}</nowiki>
result: {{color|teal|Lorem ipsum|size=25}}
result: {{color|teal|Lorem ipsum|size=25}}
  <nowiki>{{color|purple|Aisha|link=yes}}</nowiki>
  <nowiki>{{color|purple|Aisha|link=1}}</nowiki>
result: {{color|purple|Aisha|link=yes}}
result: {{color|purple|Aisha|link=1}}
  <nowiki>{{color|purple|Genius Magician|link=Aisha}}</nowiki>
  <nowiki>{{color|purple|Genius Magician|link=Aisha}}</nowiki>
result: {{color|purple|Genius Magician|link=Aisha}}
result: {{color|purple|Genius Magician|link=Aisha}}
[[Category:Formats]]
[[Category:Formats]]
</noinclude>
</noinclude>