emToPx

Type:Function
Status:stable
Since:1.0.0
Platform:js
@blackbyte.sugar.js.convert

Convert an em value to a px one

Params

  1. em*-Number

    The em value to convert

  2. $elm”document.documentElement”HTMLElement

    The HTMLElement to take as source for calculating the em

Return

  1. -Number

    The pixel value

Example

import { emToPx } from '@blackbyte/sugar/convert';
emToPx(2);

Todo

  • testsnormal