@wix/css-property-parser
Version:
A comprehensive TypeScript library for parsing and serializing CSS property values with full MDN specification compliance
28 lines (27 loc) • 1.02 kB
JavaScript
;
// Border-left-width property parser
// Handles parsing of CSS border-left-width property according to MDN specification
// https://developer.mozilla.org/en-US/docs/Web/CSS/border-left-width
Object.defineProperty(exports, "__esModule", { value: true });
exports.parse = parse;
exports.toCSSValue = toCSSValue;
const shared_border_width_1 = require('./shared-border-width.cjs');
/**
* Parse a CSS border-left-width property string
* Accepts non-negative lengths and border width keywords (thin, medium, thick)
*
* @param value - The CSS border-left-width property value
* @returns Parsed border left width value or null if invalid
*/
function parse(value) {
return (0, shared_border_width_1.parseBorderWidthProperty)(value);
}
/**
* Convert BorderLeftWidthValue back to CSS string
*
* @param parsed - The parsed border left width value
* @returns CSS string representation or null if invalid
*/
function toCSSValue(parsed) {
return (0, shared_border_width_1.borderWidthToCSSValue)(parsed);
}