DiviArea.Utils.toPixel(value, unit, element)
Converts any CSS unit to pixels – at least any CSS unit that is available in Divi Areas.
Params
value
- The number to convert, e.g. 12 or 30.25
unit
- The unit which defines the value, e.g. “in” or “vw”.
element
- Optional. Element that defines the base for relative units like “em” or “%”.
Default: <code>document.body</code>
Returns
Integer that represents the pixel dimension of the input value.
Notes
No notes