@wix/css-property-parser
Version:
A comprehensive TypeScript library for parsing and serializing CSS property values with full MDN specification compliance
29 lines (28 loc) • 987 B
JavaScript
;
// Logical margin-inline-end property evaluator
// Defines the logical inline end margin of an element, adapting to writing mode and direction
// MDN: https://developer.mozilla.org/en-US/docs/Web/CSS/margin-inline-end
Object.defineProperty(exports, "__esModule", { value: true });
exports.parse = parse;
exports.toCSSValue = toCSSValue;
const shared_margin_1 = require('./shared-margin.cjs');
/**
* Parses CSS margin-inline-end property value
*
* Syntax: <length-percentage> | auto | global-keywords
*
* @param value - The CSS value to parse
* @returns Parsed margin-inline-end value or null if invalid
*/
function parse(value) {
return (0, shared_margin_1.parseMarginProperty)(value);
}
/**
* Converts parsed margin-inline-end value back to CSS string
*
* @param parsed - The parsed margin-inline-end value
* @returns CSS string representation or null if invalid
*/
function toCSSValue(parsed) {
return (0, shared_margin_1.marginToCSSValue)(parsed);
}