$css .= "\t" . miss_css_shadow($this_value) . "\n"; } elseif ($property == 'color') { //Regenerates IE Compatible Colours if (strpos($this_value, 'rgba(') !== false) { $css .= $this_value ? "\t" . $property . ':' . miss_ms_rgba($this_value) . ';' . "\n" : ''; } $css .= $this_value ? "\t" . $property . ':' . $this_value . ';' . "\n" : ''; } elseif ($property == 'background-color') { //Regenerates IE Compatible Colours if (strpos($this_value, 'rgba(') !== false) { $css .= $this_value ? "\t" . $property . ':' . miss_ms_rgba($this_value) . ';' . "\n" : ''; } $css .= $this_value ? "\t" . $property . ':' . $this_value . ';' . "\n" : ''; } elseif ($property == 'border-color') { //Regenerates IE Compatible Colours if (strpos($this_value, 'rgba(') !== false) { $css .= $this_value ? "\t" . $property . ':' . miss_ms_rgba($this_value) . ';' . "\n" : ''; } $css .= $this_value ? "\t" . $property . ':' . $this_value . ';' . "\n" : ''; } elseif ($property == 'background-image') { $bg_value = $this_value; if (!empty($bg_value) && $bg_value != 'none') { $css .= "\t" . $property . ':url(' . $bg_value . ');' . "\n"; } } else { $css .= $this_value ? "\t" . $property . ':' . $this_value . ';' . "\n" : ''; } } $css .= '}' . "\n"; } miss_generate_css_cache($css);
function miss_css_gradient($atts) { if (isset($atts['disabled']) && $atts['disabled'] == true) { return false; } if (!isset($atts['orientation']) || isset($atts['orientation']) && empty($atts['orientation'])) { $atts['orientation'] = 'top'; } if (!isset($atts['l1'])) { $atts['l1'] = 0; } if (!isset($atts['l2'])) { $atts['l2'] = 100; } if (!isset($atts['start'])) { $atts['start'] = ''; } if (!isset($atts['end'])) { $atts['end'] = ''; } return 'background-image: linear-gradient(' . $atts['orientation'] . ', ' . $atts['start'] . ' ' . $atts['l1'] . '%, ' . $atts['end'] . ' ' . $atts['l2'] . '%);background-image: -o-linear-gradient(' . $atts['orientation'] . ', ' . $atts['start'] . ' ' . $atts['l1'] . '%, ' . $atts['end'] . ' ' . $atts['l2'] . '%);background-image: -moz-linear-gradient(' . $atts['orientation'] . ', ' . $atts['start'] . ' ' . $atts['l1'] . '%, ' . $atts['end'] . ' ' . $atts['l2'] . '%);background-image: -webkit-linear-gradient(' . $atts['orientation'] . ', ' . $atts['start'] . ' ' . $atts['l1'] . '%, ' . $atts['end'] . ' ' . $atts['l2'] . '%);background-image: -ms-linear-gradient(' . $atts['orientation'] . ', ' . $atts['start'] . ' ' . $atts['l1'] . '%, ' . $atts['end'] . ' ' . $atts['l2'] . '%);background-image: -webkit-gradient(linear,' . $atts['orientation'] . ',color-stop(' . $atts['l1'] / 100 . ', ' . $atts['start'] . '),color-stop(' . $atts['l2'] / 100 . ', ' . $atts['end'] . ')); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr="' . miss_ms_rgba($atts['start']) . '", endColorstr="' . miss_ms_rgba($atts['end']) . '",GradientType=0 );'; }