UNPKG

@fluentui/react-northstar

Version:
19 lines (18 loc) 714 B
export declare const getDocumentRemSize: () => number; export declare const round: (n: number) => number; /** * Converts the provided px size to rem based on the default font size of 16px unless * the HTML font size has been previously defined with setHTMLFontSize(). * @param valueInPx - The px value to convert to rem. * @param baseRemSize - Rem size to use for conversions. Optional - document's font size will be taken otherwise. * @example * ``` * // Returns '1rem' for default document font size (16px). * pxToRem(16) * * // Returns '2rem'. * pxToRem(32, 16) * ``` * @returns The value converted to the rem. */ export declare const pxToRem: (valueInPx: number, baseRemSize?: number) => string;