UNPKG

@wix/css-property-parser

Version:

A comprehensive TypeScript library for parsing and serializing CSS property values with full MDN specification compliance

15 lines (14 loc) 643 B
import { Percentage, PercentageCalcExpression, PercentageValue } from '../types'; /** * Parses a CSS percentage value into structured components * @param value - The CSS percentage value string * @returns Parsed percentage object or null if invalid */ export declare function parse(value: string): PercentageValue | null; /** * Converts a parsed percentage back to a CSS value string * @param parsed - The parsed percentage object * @returns CSS value string or null if invalid */ export declare function toCSSValue(parsed: PercentageValue | null): string | null; export type { Percentage, PercentageValue, PercentageCalcExpression };