Template:Px

This is the current revision of this page, as edited by Alex (talk | contribs) at 00:42, 17 October 2024 (Created page with "{{#replace:{{{1}}}|px|}}<noinclude>{{/doc}}</noinclude>"). The present address (URL) is a permanent link to this version.

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

{{{1}}}

Template documentation
This documentation is transcluded from Template:Px/doc. [edit] [history] [purge]

This template makes it easy to let values for parameters have the suffix "px" removed, to make sure there's only one suffix. For example when a width of a certain element is to be entered, the template could have <span style="width:{{px|{{{width}}}}}px;">contents</span> so that for when the template is used, the values |width=50 and |width=50px will both result in a width of 50 pixels. When plain parameters would be used, entering |width=50px would result in width:50pxpx; which wouldn't do anything.