summaryrefslogtreecommitdiff
path: root/includes
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 /includes
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.
Diffstat (limited to 'includes')
-rw-r--r--includes/common.inc8
-rw-r--r--includes/menu.inc4
-rw-r--r--includes/theme.inc6
3 files changed, 9 insertions, 9 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.