Template:Colorsquare: Difference between revisions

From Songs of Syx Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div style="background-color: {{{1}}}; height: 12px; width: 12px; float: left; margin-top: 4px; border: 2px solid #ddd;">&nbsp;</div>
<div class="colorsquare" style="background-color: {{{1}}}; height: 12px; width: 12px; float: left; border: 2px solid {{{2}}};">&nbsp;</div>
<noinclude><br /><br /><br />This template makes a little colored square, where the inside of the box as well as it's border can be customized with any color.<br />The syntax of this template is as follows: <code><nowiki>{{colorsquare|box color|border color}}</nowiki></code>
<noinclude>{{Colorsquare/doc}}[[Category:Templates]]</noinclude>
[[Category:Templates]]</br /><br />
 
 
{| class="wikitable" style="width: 900px;"
|-
|{{colorsquare|red|orange}}Text 1
|-
|{{colorsquare|blue|aqua}}Text 2
|-
|{{colorsquare|green|lime}}Text 3
|}
 
 
 
{{colorsquare|red|orange}}Text 1
{{colorsquare|red|orange}}Text 2
{{colorsquare|red|orange}}Text 3
</noinclude>

Latest revision as of 22:39, 18 November 2021

 
Template Documentation

Description

This template makes a little colored square, where the inside of the box as well as it's border can be customized with any color. Making a list with these squares can misalign themselves or break pages, so a lot of finesse is needed when using these. It's also advised to use &nbsp; (with no space between the ampersand and the 'n'. As spaces after the templates can further break things.
Note: Using this template in a table or div will misalign the color squares and any text next to it. Template:Colorsquare2 can be used for different alignments.

Syntax

{{colorsquare|box color|border color}}

Examples

{{colorsquare|purple|yellow}} Some wicked text.

Output:
 

 Some wicked text.
{{colorsquare|#88ffff|#777777}} Still wicked text.

 

 Still wicked text.