UNPKG

vevet

Version:

Vevet is a JavaScript library for creative development that simplifies crafting rich interactions like split text animations, carousels, marquees, preloading, and more.

23 lines 779 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getTextAlignment = getTextAlignment; function getTextAlignment(node) { var _a = getComputedStyle(node), direction = _a.direction, textAlign = _a.textAlign; if (textAlign === 'center') { return textAlign; } if (textAlign === 'justify') { return direction === 'rtl' ? 'right' : 'left'; } if (textAlign === 'left' || textAlign === 'right') { return textAlign; } if (textAlign === 'start') { return direction === 'rtl' ? 'right' : 'left'; } if (textAlign === 'end') { return direction === 'rtl' ? 'left' : 'right'; } return direction === 'rtl' ? 'right' : 'left'; } //# sourceMappingURL=getTextAlignment.js.map