function ctools_stylizer_border_apply_style

File

includes/stylizer.inc, line 1473

Code

function ctools_stylizer_border_apply_style(&$stylesheet, $selector, $settings, $color, $which = NULL) {
    $border = 'border';
    if ($which) {
        $border .= '-' . $which;
    }
    $css = '';
    if (isset($settings['thickness']) && $settings['thickness'] !== '') {
        if ($settings['thickness'] == 'none') {
            $css .= '  ' . $border . ': none';
        }
        else {
            $css .= '  ' . $border . '-width: ' . $settings['thickness'] . ";\n";
            if (isset($settings['style']) && $settings['style'] !== '') {
                $css .= '  ' . $border . '-style: ' . $settings['style'] . ";\n";
            }
            $css .= '  ' . $border . '-color: ' . $color . ";\n";
        }
    }
    if ($css) {
        $stylesheet .= $selector . " {\n" . $css . "}\n";
    }
}