@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) • 509 B
JavaScript
// Max-height property parser
// https://developer.mozilla.org/en-US/docs/Web/CSS/max-height
import { MAX_SIZING_KEYWORDS } from '../types.js';
import { parseSizingProperty, sizingToCSSValue } from './shared-sizing.js';
/**
* Parse a CSS max-height property string
*/
export function parse(value) {
return parseSizingProperty(value, MAX_SIZING_KEYWORDS, true);
}
/**
* Convert a parsed max-height value back to CSS string
*/
export function toCSSValue(parsed) {
return sizingToCSSValue(parsed);
}