ember-sortable
Version:
Sortable UI primitives for Ember.
22 lines (18 loc) • 564 B
JavaScript
/**
Gets a numeric border-spacing values for a given element.
@method getBorderSpacing
@param {Element} element
@return {Object}
@private
*/
function getBorderSpacing(el) {
const css = getComputedStyle(el).borderSpacing; // '0px 0px'
const [horizontal, initialVertical] = css.split(' ');
const vertical = initialVertical === undefined ? horizontal : initialVertical;
return {
horizontal: parseFloat(horizontal ?? ''),
vertical: parseFloat(vertical ?? '')
};
}
export { getBorderSpacing };
//# sourceMappingURL=css-calculation.js.map