@wix/css-property-parser
Version:
A comprehensive TypeScript library for parsing and serializing CSS property values with full MDN specification compliance
28 lines (27 loc) • 1 kB
JavaScript
;
// CSS margin-right property parser - Phase 2 simple property
// Handles parsing of CSS margin-right property according to MDN specification
// https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right
Object.defineProperty(exports, "__esModule", { value: true });
exports.parse = parse;
exports.toCSSValue = toCSSValue;
const shared_margin_1 = require('./shared-margin.cjs');
// ========================================
// Main Functions
// ========================================
/**
* Parses a CSS margin-right property value
* @param value - The CSS margin-right property string
* @returns Parsed margin-right value or null if invalid
*/
function parse(value) {
return (0, shared_margin_1.parseMarginProperty)(value);
}
/**
* Converts a parsed margin-right value back to CSS string
* @param parsed - The parsed margin-right value
* @returns CSS value string or null if invalid
*/
function toCSSValue(parsed) {
return (0, shared_margin_1.marginToCSSValue)(parsed);
}