Difference between revisions of "Template:Spacing"

From mtgpq wiki
Jump to: navigation, search
(Created page with "<noinclude> ==Usage== The Spacing template inserts spacing of a specified number of pixels. This is achieved via a transparent image stretched to the requested size. The sp...")
 
 
Line 25: Line 25:
 
|}
 
|}
  
</noinclude><includeonly>[[File:spacing-{{#ifeq:{{#sub:{{{1}}}|0|1}}|x|vert|horz}}.png|{{{1}}}]]</includeonly>
+
</noinclude><includeonly>[[File:spacing-{{#ifeq:{{#sub:{{{1}}}|0|1}}|x|vert|horz}}.png|{{{1}}}|link=]]</includeonly>

Latest revision as of 04:37, 28 December 2019

Usage

The Spacing template inserts spacing of a specified number of pixels. This is achieved via a transparent image stretched to the requested size. The spacing may be vertical or horizontal.

The amount and direction of spacing is specified in a single parameter, in the same way as image scaling dimensions, as a number followed by px, optionally preceded by x to specify vertical spacing as opposed to horizontal.

Examples

The examples below invoke the template as indicated.

Horizontal spacing: 20 pixelsSpacing-horz.png{{Spacing|20px}}
Horizontal spacing: 40 pixelsSpacing-horz.png{{Spacing|40px}}
Horizontal spacing: 60 pixelsSpacing-horz.png{{Spacing|60px}}
Vertical spacing: 20 pixels
Spacing-vert.png
{{Spacing|x20px}}
Vertical spacing: 40 pixels
Spacing-vert.png
{{Spacing|x40px}}
Vertical spacing: 60 pixels
Spacing-vert.png
{{Spacing|x60px}}