@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) • 856 B
JavaScript
// CSS margin-left property parser - Phase 2 simple property
// Handles parsing of CSS margin-left property according to MDN specification
// https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left
import { parseMarginProperty, marginToCSSValue } from './shared-margin.js';
// ========================================
// Main Functions
// ========================================
/**
* Parses a CSS margin-left property value
* @param value - The CSS margin-left property string
* @returns Parsed margin-left value or null if invalid
*/
export function parse(value) {
return parseMarginProperty(value);
}
/**
* Converts a parsed margin-left value back to CSS string
* @param parsed - The parsed margin-left value
* @returns CSS value string or null if invalid
*/
export function toCSSValue(parsed) {
return marginToCSSValue(parsed);
}