Template:Color label: Difference between revisions
From Space Station 14 Wiki
No edit summary |
No edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly><!-- | <includeonly><!-- | ||
--><templatestyles src="Color label/styles.css" /><!-- | --><!--<templatestyles src="Color label/styles.css" />--><!-- | ||
--><span class="color-label"> | --><span class="color-label" style=" | ||
<span class="color-label-label" style=" | display: inline-block; | ||
<span class="color-label-color-square" style="background-color: {{{1}}};"></span> | border: 1px solid var(--border-color); | ||
<span class="color-label-code">{{{1}}}</span> | padding: 0px 3px 2px 4px; | ||
</span></includeonly><noinclude> | border-radius: 0.2rem; | ||
margin: -1px 0px -3px 0px; | |||
text-wrap: nowrap; | |||
"><!-- | |||
--><span class="color-label-label" style=" | |||
/* offset from the color rect */ | |||
margin-right: 0.3rem; | |||
">{{{2|}}}</span><!-- | |||
--><span class="color-label-color-square" style=" | |||
background-color: {{{1}}}; | |||
display: inline-block; | |||
vertical-align: middle; | |||
width: 1em; | |||
height: 1em; | |||
border-radius: 2px; | |||
margin-right: 0.15rem; | |||
"></span><!-- | |||
--><span class="color-label-code" style=" | |||
font-family: monospace; | |||
">{{{1}}}</span><!-- | |||
--></span></includeonly><noinclude> | |||
{{docs|bb= | {{docs|bb= | ||
{{uses template styles}} | {{uses template styles}} | ||
}} | }} | ||
<templatedata> | <templatedata> |
Latest revision as of 14:49, 9 August 2024
Uses template styles
This template uses template styles found in:
Examples
Hex color (gold): #FFD700
Predefined color (red): red
RGB color (orange) with a custom name: Sunset#FFD700
Produces a little square with given color and a color code label. Can also add a custom label.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Color | 1 | A valid CSS color.
| Line | required |
Label | 2 | A custom label.
| Line | suggested |