### Eclipse Workspace Patch 1.0 #P Drupal Head Index: includes/common.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/common.inc,v retrieving revision 1.770 diff -u -r1.770 common.inc --- includes/common.inc 30 May 2008 17:41:51 -0000 1.770 +++ includes/common.inc 3 Jun 2008 23:29:30 -0000 @@ -1579,57 +1579,38 @@ } /** - * Adds a CSS file to the stylesheet queue. + * Adds CSS to the stylesheet queue. * - * @param $path - * (optional) The path to the CSS file relative to the base_path(), e.g., - * /modules/devel/devel.css. - * - * Modules should always prefix the names of their CSS files with the module - * name, for example: system-menus.css rather than simply menus.css. Themes - * can override module-supplied CSS files based on their filenames, and this - * prefixing helps prevent confusing name collisions for theme developers. - * See drupal_get_css where the overrides are performed. - * - * If the direction of the current language is right-to-left (Hebrew, - * Arabic, etc.), the function will also look for an RTL CSS file and append - * it to the list. The name of this file should have an '-rtl.css' suffix. - * For example a CSS file called 'name.css' will have a 'name-rtl.css' - * file added to the list, if exists in the same directory. This CSS file - * should contain overrides for properties which should be reversed or - * otherwise different in a right-to-left display. - * @param $type - * (optional) The type of stylesheet that is being added. Types are: module - * or theme. - * @param $media - * (optional) The media type for the stylesheet, e.g., all, print, screen. - * @param $preprocess - * (optional) Should this CSS file be aggregated and compressed if this - * feature has been turned on under the performance section? - * - * What does this actually mean? - * CSS preprocessing is the process of aggregating a bunch of separate CSS - * files into one file that is then compressed by removing all extraneous - * white space. - * - * The reason for merging the CSS files is outlined quite thoroughly here: - * http://www.die.net/musings/page_load_time/ - * "Load fewer external objects. Due to request overhead, one bigger file - * just loads faster than two smaller ones half its size." - * - * However, you should *not* preprocess every file as this can lead to - * redundant caches. You should set $preprocess = FALSE when: - * - * - Your styles are only used rarely on the site. This could be a special - * admin page, the homepage, or a handful of pages that does not represent - * the majority of the pages on your site. - * - * Typical candidates for caching are for example styles for nodes across - * the site, or used in the theme. + * @param $data + * (optional) If given, the value depends on the $options parameter. + * - 'file': Path to the file relative to base_path(). + * - 'inline': The CSS code that should be placed in the given scope. + * - 'external': The URL to a CSS file that's hosted on an external server. + * @param $options + * (optional) A string for the type ('file', 'inline', 'external'), or an + * array which can have any or all of the following keys: + * - #type + * (optional) The type of CSS that should be added to the page. Allowed + * values are 'file', 'inline' and 'external'. + * - #media + * (optional) The media type for the stylesheet, e.g., all, print, + * screen. + * - #preprocess + * (optional) Whether or not this CSS should be aggregated and compressed + * if this feature has been turned on under the performance section. * @return - * An array of CSS files. + * An array of CSS stylesheets to include - the array has three keys: + * - 'files' + * An array of files keyed by path (the value is the $options that were + * passed in). + * - 'inline' + * An array of CSS code to be added inline (the value is the $options + * that were passed in). + * - 'external' + * An array of CSS URLs to be added to the queue (the value is the + * $options that were passed in). */ -function drupal_add_css($path = NULL, $type = 'module', $media = 'all', $preprocess = TRUE) { +function drupal_add_css($data = NULL, $options = array()) { static $css = array(); global $language; Index: .project =================================================================== RCS file: .project diff -N .project --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ .project 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,11 @@ + + + Drupal Head + + + + + + + +