@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) • 974 B
TypeScript
import { type BorderStylePropertyValue } from './shared-border-style';
export type BorderBottomStyleValue = BorderStylePropertyValue;
/**
* Parse CSS border-bottom-style property
*
* @param value - CSS border-bottom-style property value
* @returns Parsed border style value or null if invalid
*
* @example
* parse('dotted') // { type: 'keyword', keyword: 'dotted' }
* parse('groove') // { type: 'keyword', keyword: 'groove' }
* parse('var(--style)') // null (CSS variables handled at runtime)
*/
export declare function parse(value: string): BorderBottomStyleValue;
/**
* Convert parsed border-bottom-style back to CSS string
*
* @param parsed - Parsed border style value
* @returns CSS string representation or null if invalid
*
* @example
* toCSSValue({ type: 'keyword', keyword: 'dotted' }) // 'dotted'
* toCSSValue({ type: 'keyword', keyword: 'unset' }) // 'unset'
*/
export declare function toCSSValue(parsed: BorderBottomStyleValue): string | null;