Difference between revisions of "Template:Pow"

From Zero-K
Jump to navigation Jump to search
(Template to use for creating exponents.)
 
(The font thing is a hack, but what else is there with the same functionality when the styles are off?)
Line 1: Line 1:
<sup><span style="position:absolute;left:-9999px;display:inline-block;width:1px;height:1px;overflow:hidden"> ^ </span>{{{1|2}}}</sup><noinclude>
+
<font size="1" color="transparent" style="position:absolute;left:-9999px;display:inline-block;width:1px;height:1px;overflow:hidden">^</font><sup style="padding:0 2px">{{{1|2}}}</sup><noinclude>
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Revision as of 12:29, 15 September 2021

^2

Template documentation[view] [edit] [history] [purge]

Use for creating exponents: E = mc^2. Over plain <sup> tags, this template has the benefit of showing up correctly even when copying and pasting plain text.

The default value is squared (^2).