You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
882 B
36 lines
882 B
"use strict";
|
|
|
|
exports.__esModule = true;
|
|
exports["default"] = void 0;
|
|
|
|
var _pxto = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("../internalHelpers/_pxto"));
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
|
|
/**
|
|
* Convert pixel value to ems. The default base value is 16px, but can be changed by passing a
|
|
* second argument to the function.
|
|
* @function
|
|
* @param {string|number} pxval
|
|
* @param {string|number} [base='16px']
|
|
* @example
|
|
* // Styles as object usage
|
|
* const styles = {
|
|
* 'height': em('16px')
|
|
* }
|
|
*
|
|
* // styled-components usage
|
|
* const div = styled.div`
|
|
* height: ${em('16px')}
|
|
* `
|
|
*
|
|
* // CSS in JS Output
|
|
*
|
|
* element {
|
|
* 'height': '1em'
|
|
* }
|
|
*/
|
|
var em = /*#__PURE__*/(0, _pxto["default"])('em');
|
|
var _default = em;
|
|
exports["default"] = _default;
|
|
module.exports = exports.default; |