Template:Colorsquare2/doc: Difference between revisions
(Created page with "{{documentation |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 squ...") |
No edit summary |
||
Line 1: | Line 1: | ||
{{documentation | {{documentation | ||
|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 <code>&nbsp;</code> (with no space between the ampersand and the 'n'. As spaces after the templates can further break things.<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. 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 <code>&nbsp;</code> (with no space between the ampersand and the 'n'. As spaces after the templates can further break things.<br /> | ||
'''''Note: Using this template in a table or div will misalign the color squares and any text next to it. Template: | '''''Note: Using this template in a table or div will misalign the color squares and any text next to it. The CSS margin-top value is adjusted differently in this template. Using Template:Colorsquare instead can be used for different alignments.''''' | ||
|<code><nowiki>{{ | Use this one instead of a square doesn't align with the text properly. | ||
|<code><nowiki>{{ | |<code><nowiki>{{colorsquare2|box color|border color}}</nowiki></code> | ||
Output:<br>{{ | |<code><nowiki>{{colorsquare2|purple|yellow}} Some wicked text.</nowiki></code><br> | ||
<code><nowiki>{{ | Output:<br>{{colorsquare2|purple|yellow}} Some wicked text.<br> | ||
{{ | <code><nowiki>{{colorsquare2|#88ffff|#777777}} Still wicked text.</nowiki></code><br> | ||
{{colorsquare2|#88ffff|#777777}} Still wicked text.}}<noinclude>[[Category:Doc templates]]</noinclude> |
Latest revision as of 20:08, 19 November 2021
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
(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. The CSS margin-top value is adjusted differently in this template. Using Template:Colorsquare instead can be used for different alignments.
Use this one instead of a square doesn't align with the text properly.
{{colorsquare2|box color|border color}}
{{colorsquare2|purple|yellow}} Some wicked text.
Some wicked text.
{{colorsquare2|#88ffff|#777777}} Still wicked text.
Still wicked text.