private function parseCssShorthandValue($value)
    {
        $values = preg_split('/\\s+/', $value);

        $css = [];
        $css['top'] = $values[0];
        $css['right'] = (count($values) > 1) ? $values[1] : $css['top'];
        $css['bottom'] = (count($values) > 2) ? $values[2] : $css['top'];
        $css['left'] = (count($values) > 3) ? $values[3] : $css['right'];

        return $css;
    }
private function parseCssShorthandValue($value)
    {
        $values = preg_split('/\\s+/', $value);

        $css = [];
        $css['top'] = $values[0];
        $css['right'] = (count($values) > 1) ? $values[1] : $css['top'];
        $css['bottom'] = (count($values) > 2) ? $values[2] : $css['top'];
        $css['left'] = (count($values) > 3) ? $values[3] : $css['right'];

        return $css;
    }
private function parseCssShorthandValue ( $ value ) { $ values = preg_split ( '/\\s+/' , $ value ) ; $ css = [ ] ; $ css [ 'top' ] = $ values [ 0 ] ; $ css [ 'right' ] = ( count ( $ values ) > 1 ) ? $ values [ 1 ] : $ css [ 'top' ] ; $ css [ 'bottom' ] = ( count ( $ values ) > 2 ) ? $ values [ 2 ] : $ css [ 'top' ] ; $ css [ 'left' ] = ( count ( $ values ) > 3 ) ? $ values [ 3 ] : $ css [ 'right' ] ; return $ css ; }
Parses a shorthand CSS value and splits it into individual values

@param string $value a string of CSS value with 1, 2, 3 or 4 sizes
For example: padding: 0 auto;
'0 auto' is split into top: 0, left: auto, bottom: 0,
right: auto.

@return string[] an array of values for top, right, bottom and left (using these as associative array keys)
Parses a shorthand CSS value and splits it into individual values