summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2007-08-23 16:41:19 +0000
committerDries Buytaert <dries@buytaert.net>2007-08-23 16:41:19 +0000
commitf2ce877d43ce72173a8eaaee5ec76640fe2ab6c5 (patch)
tree471c3df085e6ce44830ece1bf0239026bb4f0f37
parent7b7ab29a22099da05c6e287847561194f9762981 (diff)
downloadbrdo-f2ce877d43ce72173a8eaaee5ec76640fe2ab6c5.tar.gz
brdo-f2ce877d43ce72173a8eaaee5ec76640fe2ab6c5.tar.bz2
- Patch #145218 by profix898, bennybobw, Crell, forngren et al: use href instead of @import for CSS.
-rw-r--r--includes/common.inc8
-rw-r--r--includes/menu.inc4
-rw-r--r--includes/theme.inc6
-rw-r--r--misc/maintenance.tpl.php4
-rw-r--r--modules/book/book.module5
-rw-r--r--themes/garland/page.tpl.php2
6 files changed, 14 insertions, 15 deletions
diff --git a/includes/common.inc b/includes/common.inc
index 3a9aeeb03..366c2b96e 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -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";
}
}
diff --git a/includes/menu.inc b/includes/menu.inc
index 064b04ef7..eafad5831 100644
--- a/includes/menu.inc
+++ b/includes/menu.inc
@@ -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);
diff --git a/includes/theme.inc b/includes/theme.inc
index 4921d3a8d..715183408 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -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.
diff --git a/misc/maintenance.tpl.php b/misc/maintenance.tpl.php
index b04189a23..bd1856041 100644
--- a/misc/maintenance.tpl.php
+++ b/misc/maintenance.tpl.php
@@ -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
diff --git a/modules/book/book.module b/modules/book/book.module
index 3a51bc4c8..2a7c7acfe 100644
--- a/modules/book/book.module
+++ b/modules/book/book.module
@@ -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;
}
diff --git a/themes/garland/page.tpl.php b/themes/garland/page.tpl.php
index 9e4c27d71..bef8aaa92 100644
--- a/themes/garland/page.tpl.php
+++ b/themes/garland/page.tpl.php
@@ -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); ?>>