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) 616 B
import { MarginValue, MarginInput } from '../types'; export type { MarginValue, MarginExpanded } from '../types'; /** * Parses a CSS margin property value into structured components * @param value - The CSS margin property string * @returns Parsed margin object with individual side values or null if invalid */ export declare function parse(value: string): MarginValue | null; /** * Converts a parsed margin back to a CSS value string * @param parsed - The parsed margin object * @returns CSS value string or null if invalid */ export declare function toCSSValue(parsed: MarginInput | null): string | null;