@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) • 588 B
TypeScript
import { BorderValue } from '../types';
export type { BorderValue } from '../types';
/**
* Parses a CSS border property string into structured components
* @param value - The CSS border property value
* @returns Parsed border object with width, style, and color components
*/
export declare function parse(value: string): BorderValue | null;
/**
* Converts a parsed border value back to a CSS string
* @param parsed - The parsed border value
* @returns CSS string representation or null if invalid
*/
export declare function toCSSValue(parsed: BorderValue | null): string | null;