UNPKG

@wix/css-property-parser

Version:

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

24 lines (23 loc) 891 B
// Border-bottom-width property parser // Handles parsing of CSS border-bottom-width property according to MDN specification // https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-width import { parseBorderWidthProperty, borderWidthToCSSValue } from './shared-border-width.js'; /** * Parse a CSS border-bottom-width property string * Accepts non-negative lengths and border width keywords (thin, medium, thick) * * @param value - The CSS border-bottom-width property value * @returns Parsed border bottom width value or null if invalid */ export function parse(value) { return parseBorderWidthProperty(value); } /** * Convert BorderBottomWidthValue back to CSS string * * @param parsed - The parsed border bottom width value * @returns CSS string representation or null if invalid */ export function toCSSValue(parsed) { return borderWidthToCSSValue(parsed); }