/** * The box sizing (border and padding) for a a DOM node. */ export interface IBoxSizing { /** * The top border width, in pixels. */ borderTop: number; /** * The left border width, in pixels. */ borderLeft: number; /** * The right border width, in pixels. */ borderRight: number; /** * The bottom border width, in pixels. */ borderBottom: number; /** * The top padding width, in pixels. */ paddingTop: number; /** * The left padding width, in pixels. */ paddingLeft: number; /** * The right padding width, in pixels. */ paddingRight: number; /** * The bottom padding width, in pixels. */ paddingBottom: number; /** * The sum of horizontal border and padding. */ horizontalSum: number; /** * The sum of vertical border and padding. */ verticalSum: number; } /** * Compute the box sizing for a DOM node. * * @param node - The DOM node for which to compute the box sizing. * * @returns The box sizing data for the specified DOM node. * * #### Example * ```typescript * import { boxSizing } from 'phosphor/lib/dom/sizing'; * * let div = document.createElement('div'); * div.style.borderTop = 'solid 10px black'; * document.body.appendChild(div); * * let sizing = boxSizing(div); * sizing.borderTop; // 10 * sizing.paddingLeft; // 0 * // etc... * ``` */ export declare function boxSizing(node: HTMLElement): IBoxSizing; /** * The size limits for a DOM node. */ export interface ISizeLimits { /** * The minimum width, in pixels. */ minWidth: number; /** * The minimum height, in pixels. */ minHeight: number; /** * The maximum width, in pixels. */ maxWidth: number; /** * The maximum height, in pixels. */ maxHeight: number; } /** * Compute the size limits for a DOM node. * * @param node - The node for which to compute the size limits. * * @returns The size limit data for the specified DOM node. * * #### Example * ```typescript * import { sizeLimits } from 'phosphor/lib/dom/sizing'; * * let div = document.createElement('div'); * div.style.minWidth = '90px'; * document.body.appendChild(div); * * let limits = sizeLimits(div); * limits.minWidth; // 90 * limits.maxHeight; // Infinity * // etc... * ``` */ export declare function sizeLimits(node: HTMLElement): ISizeLimits;