@wix/css-property-parser
Version:
A comprehensive TypeScript library for parsing and serializing CSS property values with full MDN specification compliance
17 lines (16 loc) • 657 B
TypeScript
import { NumberValue, Number } from '../types';
/**
* Parses a CSS number value into structured components
* Following MDN specification: https://developer.mozilla.org/en-US/docs/Web/CSS/number
* @param value - The CSS number value string
* @returns Parsed number object or null if invalid
*/
export declare function parse(value: string): Number | null;
/**
* Converts a parsed number back to a CSS value string
* @param parsed - The parsed number object
* @returns CSS value string or null if invalid
*/
export declare function toCSSValue(parsed: Number | null): string | null;
export type { NumberValue };
export type { Number } from '../types';