function ctools_stylizer_padding_apply_style

File

includes/stylizer.inc, line 1631

Code

function ctools_stylizer_padding_apply_style(&$stylesheet, $selector, $settings) {
    $css = '';
    if (isset($settings['top']) && $settings['top'] !== '') {
        $css .= '  padding-top: ' . $settings['top'] . ";\n";
    }
    if (isset($settings['right']) && $settings['right'] !== '') {
        $css .= '  padding-right: ' . $settings['right'] . ";\n";
    }
    if (isset($settings['bottom']) && $settings['bottom'] !== '') {
        $css .= '  padding-bottom: ' . $settings['bottom'] . ";\n";
    }
    if (isset($settings['left']) && $settings['left'] !== '') {
        $css .= '  padding-left: ' . $settings['left'] . ";\n";
    }
    if ($css) {
        $stylesheet .= $selector . " {\n" . $css . "}\n";
    }
}