src/utils/geometry.js
function getPaddings(styles) {
    const positions = ['top', 'right', 'bottom', 'left'];
    const paddings = {};

    for (const position of positions) {
        const value = styles['padding-' + position];

        paddings[position] = toFloat(value);
    }

    return paddings;
}
function getPaddings(styles) {
    const positions = ['top', 'right', 'bottom', 'left'];
    const paddings = {};

    for (const position of positions) {
        const value = styles['padding-' + position];

        paddings[position] = toFloat(value);
    }

    return paddings;
}
function getPaddings ( styles ) { const positions = [ 'top' , 'right' , 'bottom' , 'left' ] ; const paddings = { } ; for ( const position of positions ) { const value = styles [ 'padding-' + position ] ; paddings [ position ] = toFloat ( value ) ; } return paddings ; }
Extracts paddings sizes from provided styles.

@param {CSSStyleDeclaration} styles
@returns {Object} Paddings box.
Extracts paddings sizes from provided styles .