modern-canvas
Version:
A JavaScript WebGL rendering engine. only the ESM.
22 lines (21 loc) • 745 B
TypeScript
export interface CssFunctionArg {
unit: string | null;
value: string;
intValue: number;
normalizedIntValue: number;
normalizedDefaultIntValue: number;
}
export interface CssFunction {
name: string;
args: CssFunctionArg[];
}
interface ParseArgumentContext {
index?: number;
fontSize?: number;
width?: number;
height?: number;
}
export declare function getDefaultCssPropertyValue<T extends CssFunctionArg | CssFunction[]>(value: T): T;
export declare function parseCssProperty(name: string, propertyValue: string, context?: ParseArgumentContext): CssFunctionArg | CssFunction[];
export declare function parseCssFunctions(propertyValue: string, context?: ParseArgumentContext): CssFunction[];
export {};