@wix/css-property-parser
Version:
A comprehensive TypeScript library for parsing and serializing CSS property values with full MDN specification compliance
26 lines (25 loc) • 970 B
TypeScript
import { type BorderStylePropertyValue } from './shared-border-style';
export type BorderRightStyleValue = BorderStylePropertyValue;
/**
* Parse CSS border-right-style property
*
* @param value - CSS border-right-style property value
* @returns Parsed border style value or null if invalid
*
* @example
* parse('solid') // { type: 'keyword', keyword: 'solid' }
* parse('dashed') // { type: 'keyword', keyword: 'dashed' }
* parse('var(--style)') // null (CSS variables handled at runtime)
*/
export declare function parse(value: string): BorderRightStyleValue;
/**
* Convert parsed border-right-style back to CSS string
*
* @param parsed - Parsed border style value
* @returns CSS string representation or null if invalid
*
* @example
* toCSSValue({ type: 'keyword', keyword: 'dashed' }) // 'dashed'
* toCSSValue({ type: 'keyword', keyword: 'initial' }) // 'initial'
*/
export declare function toCSSValue(parsed: BorderRightStyleValue): string | null;