ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

Difference between revisions of "Template:Color block"

From ModEnc
Jump to: navigation, search
(Template to display the color with a little color block)
 
m (<includeonly>)
 
Line 1: Line 1:
{{#if: {{{1|}}}|<span title="{{{1|}}}" style="display: inline-block; margin: 0 .1rem -1px 0; width: {{#if:{{{width|{{{w|}}}}}}|{{{width|{{{w|}}}}}}|13px}}; height: {{#if:{{{height|{{{h|}}}}}}|{{{height|{{{h|}}}}}}|13px}}; border: 1px solid #555459; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; background: {{{1}}};"></span>}}
+
<includeonly>{{#if: {{{1|}}}|<span title="{{{1|}}}" style="display: inline-block; margin: 0 .1rem -1px 0; width: {{#if:{{{width|{{{w|}}}}}}|{{{width|{{{w|}}}}}}|13px}}; height: {{#if:{{{height|{{{h|}}}}}}|{{{height|{{{h|}}}}}}|13px}}; border: 1px solid #555459; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; background: {{{1}}};"></span>}}</includeonly><noinclude>
 +
{{doc}}</noinclude>

Latest revision as of 09:24, 24 August 2021

Template-info.png Template Documentation  [View] [Edit] [History] [Help] [Refresh]

This template use for displaying the color with a little color block.

Parameters

Parameters Default values Optional values Descriptions
1 (NULL) HTML color code The 1st parameter without name, to set the color you want to display by HTML color code.
w or width 13px CSS style width Set the width of the color block, don't change it easily.
h or height 13px CSS style height Set the height of the color block, don't change it easily.

Example

Code Result Code Result
{{color block|#0F0}}#00FF00
#00FF00
{{color block|#FACD89}}Mayuri Gold
Mayuri Gold
{{color block|green}}green
green[1]
{{color block|rgb(227,107,182)}}Mayuri Pink
Mayuri Pink

References

  1. In fact it's #008000 in our wiki.