Template:AddPxUnit/doc

From Zombie Panic! Official Wiki
Revision as of 14:11, 10 June 2025 by Wuffesan (talk | contribs) (Created page with "{{Documentation/Header}} Adds the <code>px</code> unit to a numeric value if it does not already have a unit. If it already has a unit, then that unit is kept. ==Syntax== * '''1:''' numeric value with or without units ==Examples== <pre>{{AddPxUnit|50}}</pre> {{AddPxUnit|50}} <pre>{{AddPxUnit|50px}}</pre> {{AddPxUnit|50px}} <pre>{{AddPxUnit|2em}}</pre> {{AddPxUnit|2em}} <pre>{{AddPxUnit|inherit}}</pre> {{AddPxUnit|inherit}} <pre>{{AddPxUnit|initial}}</pre> {{AddPxUn...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
This is the documentation page for AddPxUnit.
It contains usage information, categories, and other content not part of the original template page.

Adds the px unit to a numeric value if it does not already have a unit. If it already has a unit, then that unit is kept.

Syntax

  • 1: numeric value with or without units

Examples

{{AddPxUnit|50}}

50px

{{AddPxUnit|50px}}

50pxpx

{{AddPxUnit|2em}}

2empx

{{AddPxUnit|inherit}}

inheritpx

{{AddPxUnit|initial}}

initialpx

Template Data

Add the "px" unit to a numeric value if it does not already have a unit

Template parameters

ParameterDescriptionTypeStatus
11

The numeric value

Stringrequired