UNPKG

@wix/css-property-parser

Version:

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

21 lines (20 loc) 783 B
// Min-inline-size property parser // https://developer.mozilla.org/en-US/docs/Web/CSS/min-inline-size import { BASIC_SIZING_KEYWORDS } from '../types.js'; import { parseSizingProperty, sizingToCSSValue } from './shared-sizing.js'; /** * Parses a CSS min-inline-size property value into structured components * @param value - The CSS min-inline-size property string * @returns Parsed min-inline-size object or null if invalid */ export function parse(value) { return parseSizingProperty(value, BASIC_SIZING_KEYWORDS, true); } /** * Converts a parsed min-inline-size value back to a CSS string * @param parsed - The parsed min-inline-size object * @returns CSS value string or null if invalid */ export function toCSSValue(parsed) { return sizingToCSSValue(parsed); }