UNPKG

@wix/css-property-parser

Version:

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

17 lines (16 loc) 505 B
// Max-width property parser // https://developer.mozilla.org/en-US/docs/Web/CSS/max-width import { MAX_SIZING_KEYWORDS } from '../types.js'; import { parseSizingProperty, sizingToCSSValue } from './shared-sizing.js'; /** * Parse a CSS max-width property string */ export function parse(value) { return parseSizingProperty(value, MAX_SIZING_KEYWORDS, true); } /** * Convert a parsed max-width value back to CSS string */ export function toCSSValue(parsed) { return sizingToCSSValue(parsed); }