Template:Color/doc: Difference between revisions
From Elwiki
m (Ritsu moved page Template:Color/doc to Doc:Template:Color) |
|||
Line 7: | Line 7: | ||
*<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 '''1''' 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 (using normal markup still works) | ||
*'''b''' - if '''1''', apply bold style | *'''b''' - if '''1''', apply bold style (using normal markup still works) | ||
*'''i''' - if '''1''', apply italic style | *'''i''' - if '''1''', apply italic style (using normal markup still works) | ||
== Examples == | == Examples == |
Revision as of 19:33, 6 March 2022
Usage
{{color|textcolor|bgcolor|text|link=1/link|size=number|b=1|i=1}}
Parameters
(colors accept any CSS3 colors)
- {{color|textcolor|bgcolor|text}} - color of the text (first parameter)
- {{color|textcolor|bgcolor|text}} - color of the background (second parameter)
- {{color|textcolor|bgcolor|text}} - content (second or third parameter, depending on whether bgcolor was provided)
- size - size of the font in pixels
- link - if 1 provided, creates a local link from the content provided. Any other parameter creates a local link from the link parameter itself (using normal markup still works)
- b - if 1, apply bold style (using normal markup still works)
- i - if 1, apply italic style (using normal markup still works)
Examples
{{color|teal|Lorem ipsum}}
result: Lorem ipsum
{{color|white|teal|Lorem ipsum}}
result: Lorem ipsum
{{color|teal|Lorem ipsum|b=1|i=1}}
result: Lorem ipsum
{{color|teal|Lorem ipsum|size=25}}
result: Lorem ipsum
{{color|purple|Aisha|link=1}}
result: Aisha
{{color|purple|Genius Magician|link=Aisha}}
result: Genius Magician