protected function applyLayoutStyles(View\AttributesInterface $attributes, array $layout)
    {
        foreach ([static::PADDING_TOP => '%spx', static::PADDING_BOTTOM => '%spx'] as $property => $template) {
            if (isset($layout[$property]) && 0 < $layout[$property]) {
                $attributes->addStyle(
                    str_replace('_', '-', $property),
                    sprintf($template, $layout[$property])
                );
            }
        }
    }
protected function applyLayoutStyles(View\AttributesInterface $attributes, array $layout)
    {
        foreach ([static::PADDING_TOP => '%spx', static::PADDING_BOTTOM => '%spx'] as $property => $template) {
            if (isset($layout[$property]) && 0 < $layout[$property]) {
                $attributes->addStyle(
                    str_replace('_', '-', $property),
                    sprintf($template, $layout[$property])
                );
            }
        }
    }
protected function applyLayoutStyles ( View \ AttributesInterface $ attributes , array $ layout ) { foreach ( [ static :: PADDING_TOP => '%spx' , static :: PADDING_BOTTOM => '%spx' ] as $ property => $ template ) { if ( isset ( $ layout [ $ property ] ) && 0 < $ layout [ $ property ] ) { $ attributes -> addStyle ( str_replace ( '_' , '-' , $ property ) , sprintf ( $ template , $ layout [ $ property ] ) ) ; } } }
Adds the css styles regarding to the layout data.

@param View\AttributesInterface $attributes
@param array                    $layout
Adds the css styles regarding to the layout data .