UNPKG

@wix/css-property-parser

Version:

A comprehensive TypeScript library for parsing and serializing CSS property values with full MDN specification compliance

35 lines (34 loc) 1.2 kB
"use strict"; // Border-bottom-style property evaluator // https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-style Object.defineProperty(exports, "__esModule", { value: true }); exports.parse = parse; exports.toCSSValue = toCSSValue; const shared_border_style_1 = require('./shared-border-style.cjs'); /** * 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) */ function parse(value) { return (0, shared_border_style_1.parseBorderStyleProperty)(value); } /** * 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' */ function toCSSValue(parsed) { return (0, shared_border_style_1.borderStyleToCSSValue)(parsed); }