- Patch #145218 by profix898, bennybobw, Crell, forngren et al: use href instead of @import for CSS.
parent
7b7ab29a22
commit
f2ce877d43
|
@ -1554,15 +1554,15 @@ function drupal_get_css($css = NULL) {
|
|||
// If a CSS file is not to be preprocessed and it's a module CSS file, it needs to *always* appear at the *top*,
|
||||
// regardless of whether preprocessing is on or off.
|
||||
if (!$preprocess && $type == 'module') {
|
||||
$no_module_preprocess .= '<style type="text/css" media="'. $media .'">@import "'. base_path() . $file .'";</style>' ."\n";
|
||||
$no_module_preprocess .= '<link type="text/css" rel="stylesheet" media="'. $media .'" href="'. base_path() . $file .'" />'."\n";
|
||||
}
|
||||
// If a CSS file is not to be preprocessed and it's a theme CSS file, it needs to *always* appear at the *bottom*,
|
||||
// regardless of whether preprocessing is on or off.
|
||||
else if (!$preprocess && $type == 'theme') {
|
||||
$no_theme_preprocess .= '<style type="text/css" media="'. $media .'">@import "'. base_path() . $file .'";</style>' ."\n";
|
||||
$no_theme_preprocess .= '<link type="text/css" rel="stylesheet" media="'. $media .'" href="'. base_path() . $file .'" />'."\n";
|
||||
}
|
||||
else {
|
||||
$output .= '<style type="text/css" media="'. $media .'">@import "'. base_path() . $file .'";</style>' ."\n";
|
||||
$output .= '<link type="text/css" rel="stylesheet" media="'. $media .'" href="'. base_path() . $file . '" />'."\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1571,7 +1571,7 @@ function drupal_get_css($css = NULL) {
|
|||
if ($is_writable && $preprocess_css) {
|
||||
$filename = md5(serialize($types)) .'.css';
|
||||
$preprocess_file = drupal_build_css_cache($types, $filename);
|
||||
$output .= '<style type="text/css" media="'. $media .'">@import "'. base_path() . $preprocess_file .'";</style>'. "\n";
|
||||
$output .= '<link type="text/css" rel="stylesheet" media="'. $media .'" href="'. base_path() . $preprocess_file .'" />'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -992,13 +992,13 @@ function menu_list_system_menus() {
|
|||
function menu_primary_links() {
|
||||
return menu_navigation_links('primary-links');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return an array of links to be rendered as the Secondary links.
|
||||
*/
|
||||
function menu_secondary_links() {
|
||||
|
||||
// If the secondary menu source is set as the primary menu, we display the
|
||||
// If the secondary menu source is set as the primary menu, we display the
|
||||
// second level of the primary menu.
|
||||
if (variable_get('menu_secondary_links_source', 'secondary-links') == 'primary-links') {
|
||||
return menu_navigation_links('primary-links', 1);
|
||||
|
|
|
@ -943,9 +943,9 @@ function theme_placeholder($text) {
|
|||
function theme_maintenance_page($content, $show_messages = TRUE) {
|
||||
// Set required headers.
|
||||
drupal_set_header('Content-Type: text/html; charset=utf-8');
|
||||
drupal_set_html_head('<style type="text/css" media="all">@import "'. base_path() .'misc/maintenance.css";</style>');
|
||||
drupal_set_html_head('<style type="text/css" media="all">@import "'. base_path() . drupal_get_path('module', 'system') .'/defaults.css";</style>');
|
||||
drupal_set_html_head('<style type="text/css" media="all">@import "'. base_path() . drupal_get_path('module', 'system') .'/system.css";</style>');
|
||||
drupal_set_html_head('<link type="text/css" rel="stylesheet" media="all" href="'. base_path() .'misc/maintenance.css" />');
|
||||
drupal_set_html_head('<link type="text/css" rel="stylesheet" media="all" href="'. base_path() . drupal_get_path('module', 'system') .'/defaults.css" />');
|
||||
drupal_set_html_head('<link type="text/css" rel="stylesheet" media="all" href="'. base_path() . drupal_get_path('module', 'system') .'/system.css" />');
|
||||
drupal_set_html_head('<link rel="shortcut icon" href="'. base_path() .'misc/favicon.ico" type="image/x-icon" />');
|
||||
|
||||
// Prepare variables.
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
<?php print $head ?>
|
||||
<?php print $styles ?>
|
||||
<?php print $scripts ?>
|
||||
<style type="text/css" media="all">@import "<?php print $path_to_theme ?>/style.css";</style>
|
||||
<link type="text/css" rel="stylesheet" media="all" href="<?php print $path_to_theme ?>/style.css" />
|
||||
<!--[if lt IE 7]>
|
||||
<style type="text/css" media="all">@import "<?php print $path_to_theme ?>/fix-ie.css";</style>
|
||||
<link type="text/css" rel="stylesheet" media="all" href="<?php print $path_to_theme ?>/fix-ie.css" />
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body class="<?php
|
||||
|
|
|
@ -1122,11 +1122,10 @@ function theme_book_export_html($title, $content) {
|
|||
$html .= "<head>\n<title>". $title ."</title>\n";
|
||||
$html .= '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';
|
||||
$html .= '<base href="'. $base_url .'/" />'."\n";
|
||||
$html .= "<style type=\"text/css\">\n@import url(misc/print.css);\n";
|
||||
$html .= '<link type="text/css" rel="stylesheet" href="misc/print.css" />';
|
||||
if (defined('LANGUAGE_RTL') && $language->direction == LANGUAGE_RTL) {
|
||||
$html .= "@import url(misc/print-rtl.css);\n";
|
||||
$html .= '<link type="text/css" rel="stylesheet" href="misc/print-rtl.css" />';
|
||||
}
|
||||
$html .= "</style>\n";
|
||||
$html .= "</head>\n<body>\n". $content ."\n</body>\n</html>\n";
|
||||
return $html;
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<?php print $styles ?>
|
||||
<?php print $scripts ?>
|
||||
<!--[if lt IE 7]>
|
||||
<style type="text/css" media="all">@import "<?php print base_path() . path_to_theme() ?>/fix-ie.css";</style>
|
||||
<link type="text/css" rel="stylesheet" media="all" href="<?php print base_path() . path_to_theme() ?>/fix-ie.css" />
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body<?php print phptemplate_body_class($sidebar_left, $sidebar_right); ?>>
|
||||
|
|
Loading…
Reference in New Issue