public static function styles($element, $typename = null, $props = array())
{
$props = $props + array('type' => 'text/css');
if (!empty($typename)) {
$props['media'] = $typename;
}
$wrapper = '%s';
if (isset($props['_wrapper'])) {
$wrapper = $props['_wrapper'];
unset($props['_wrapper']);
}
if (self::is_url($element)) {
$props = $props + array('rel' => 'stylesheet', 'href' => $element);
$output = sprintf("<link %s>\r\n", Utils::html_attr($props));
} else {
$output = sprintf("<style %2\$s>%1\$s</style>\r\n", $element, Utils::html_attr($props));
}
$output = sprintf($wrapper, $output);
return $output;
}