nehan
Version:
Html layout engine for paged-media written in Typescript
20 lines (19 loc) • 1.53 kB
TypeScript
import { NehanElement } from "./public-api";
export declare const CssLengthUnits: string[];
export declare type OptionalBoxLengthProps = "min-measure" | "max-measure" | "min-extent" | "max-extent";
export declare type AutableBoxLengthProps = "measure" | "extent" | "width" | "height" | "start" | "end" | "before" | "after" | "margin-start" | "margin-end" | "margin-before" | "margin-after";
export declare class CssLength {
static hasUnit(value: string): boolean;
static computeRootFontSize(element: NehanElement): number;
static computeContainingMeasure(contElement: NehanElement): number;
static computeContainingExtent(contElement: NehanElement): number;
static computeParentFontSize(element: NehanElement): number;
static computeFontSize(element: NehanElement, directValue?: string): number;
static computeLineHeight(element: NehanElement, directValue?: string): string;
static computeBaseBoxLength(element: NehanElement, prop: string): number;
static computeOptionalBoxLength(element: NehanElement, prop: OptionalBoxLengthProps, directValue?: string): number | "none";
static computeAutableBoxLength(element: NehanElement, prop: AutableBoxLengthProps, directValue?: string): number | "auto";
static computeBoxLength(element: NehanElement, prop: string, directValue?: string): number;
static computeBorderWidth(element: NehanElement, prop: string, directValue?: string): number;
static computeBorderRadius(element: NehanElement, prop: string, directValue?: string): number;
}