Difference between revisions of "Template:Inline"

From mtgpq wiki
Jump to: navigation, search
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
 
==Usage==
 
==Usage==
When surrounding content (such an icon or symbol image), cause that content to be formatted inline such that it sits on aligned with the baseline of any surrounding normally formatted text, as opposed to being aligned with the descender.
+
Cause content (such an icon or symbol image) to be formatted inline such that it sits aligned with the baseline of any surrounding normally formatted text, as opposed to being aligned with the descender.
  
The only parameter is the content to inline.
+
The first parameter is the content to inline.
 +
The optional second parameter is a flag which skips inlining if present.
  
 
==Example==
 
==Example==
Line 22: Line 23:
 
[[Category:Symbol templates]]
 
[[Category:Symbol templates]]
  
</noinclude><includeonly><span class="ie9" style="display:inline-block;vertical-align:baseline;position:relative;top:-0.15em;margin:0 0.035em">{{{1}}}</span></includeonly>
+
</noinclude><includeonly>{{#if:{{{2|}}}||<span class="ie9" style="display:inline-block;vertical-align:baseline;position:relative;top:-0.15em;margin:0 0.035em">}}{{{1}}}{{#if:{{{2|}}}||</span>}}</includeonly>

Latest revision as of 08:24, 13 May 2020

Usage

Cause content (such an icon or symbol image) to be formatted inline such that it sits aligned with the baseline of any surrounding normally formatted text, as opposed to being aligned with the descender.

The first parameter is the content to inline. The optional second parameter is a flag which skips inlining if present.

Example

This mark-up:

Not inlined [[File:Vigilance-b.png|x13px]][[File:Flying-b.png|x13px]][[File:Token-b.png|x13px]] Not inlined

Inlined {{Inline|[[File:Vigilance-b.png|x13px]][[File:Flying-b.png|x13px]][[File:Token-b.png|x13px]]}} Inlined

Produces:

Not inlined Vigilance-b.pngFlying-b.pngToken-b.png Not inlined

Inlined Vigilance-b.pngFlying-b.pngToken-b.png Inlined