@wix/css-property-parser
Version:
A comprehensive TypeScript library for parsing and serializing CSS property values with full MDN specification compliance
14 lines (13 loc) • 587 B
TypeScript
import type { LengthPercentageValue } from '../types';
/**
* Parses a CSS <length-percentage> value into structured components
* @param value - The CSS length-percentage value
* @returns Parsed length-percentage object or null if invalid
*/
export declare function parse(value: string): LengthPercentageValue | null;
/**
* Converts a parsed length-percentage back to a CSS value string
* @param parsed - The parsed length-percentage object
* @returns CSS value string or null if invalid
*/
export declare function toCSSValue(parsed: LengthPercentageValue | null): string | null;