Template:Color: Difference between revisions
Template page
More actions
New features: Text color. Inline usage. Tags: Reverted 2017 source edit |
Undo revision 11674. Bugged. Tags: Undo Reverted |
||
| Line 1: | Line 1: | ||
<onlyinclude><includeonly>{{#if:{{{ | <onlyinclude><includeonly>{{#if:{{{1|}}}|{{#tag:span|{{{2}}}|style=display:inline-block; min-width:200px; padding:1px 10px 1px 5px; margin:1px; background-color:{{#switch: {{{1}}} | ||
background-color:{{#switch: {{{ | | #default = {{{1}}} | ||
| #default = {{{ | |||
| Eribu = #2e1816 | | Eribu = #2e1816 | ||
| Absu = #38174d | | Absu = #38174d | ||
| Line 11: | Line 10: | ||
| E-Kur-Mah = #503d2a | | E-Kur-Mah = #503d2a | ||
| Mar-Uru = #3c3e49 | | Mar-Uru = #3c3e49 | ||
}}; | }}; border-radius:5px;}}|{{{2}}}}}</includeonly></onlyinclude> | ||
This template puts text inside a box of a specified background color | This template puts text inside a box of a specified background color. It is most useful for indicating in which area something is. (Note: Currently, the template can only be applied to list items. More formats (like for inline text) are planned to be added later.)<br> | ||
This template supports HTML/CSS color names, hex codes (#000000), and AV1 area names. (AV2 area names are planned to be added later.) | This template supports HTML/CSS color names, hex codes (#000000), and AV1 area names. (AV2 area names are planned to be added later.) | ||
Syntax: | Syntax: <nowiki>{{Color|<ColorCode>|<Content>}}</nowiki><br> | ||
If | If <nowiki><ColorCode></nowiki> is empty, ie: <nowiki>{{Color||<Content>}}</nowiki>, this template is ignored and will return <nowiki><Content></nowiki> as is.<br> | ||
Revision as of 03:20, 7 October 2022
This template puts text inside a box of a specified background color. It is most useful for indicating in which area something is. (Note: Currently, the template can only be applied to list items. More formats (like for inline text) are planned to be added later.)
This template supports HTML/CSS color names, hex codes (#000000), and AV1 area names. (AV2 area names are planned to be added later.)
Syntax: {{Color|<ColorCode>|<Content>}}
If <ColorCode> is empty, ie: {{Color||<Content>}}, this template is ignored and will return <Content> as is.