API page: http://api.drupal.org/api/drupal/includes--common.inc/function/drupal_ad...
Describe the problem you have found:
I had no clue what "Type" module versus theme meant until it was stated in IRC that "Module CSS files come first, so theme CSS can override them"
It then made perfect sense that the Designer could overrule my not-so-good-but-okay styles in the theme, while we limped along with the crude basic module version.
Maybe that one line would help somebody else...
I'm just sayin'...
Comment | File | Size | Author |
---|---|---|---|
#8 | 1063636-D6-backport.patch | 900 bytes | TR |
#5 | 1063636.patch | 862 bytes | RobLoach |
#2 | drupal_add_css-1063636.patch | 716 bytes | barbi |
Comments
Comment #1
jhodgdonI don't see a problem with the documentation here. For $type, it says currently:
$type (optional) The type of stylesheet that is being added. Types are: module or theme.
So it does say it is module or theme, and I am not sure what the confusion is about -- wouldn't you know whether you are calling drupal_add_css() from a module or theme?
http://api.drupal.org/api/drupal/includes--common.inc/function/drupal_ge...
This is the function that builds up the CSS lines to put in the HTML page head. That function documents that it puts the module CSS before the theme CSS. drupal_add_css() doesn't really have any role in that process -- it just builds up a list of what needs to be added.
I guess we could put @see drupal_get_css() in the drupal_add_css() doc (and perhaps vice versa). Good project for a novice doc contributor.
Comment #2
barbi CreditAttribution: barbi commentedAdded @see in both the functions - referencing each other.
Comment #3
mr.baileysLooks good to me, although while we are working on the docs for these functions, can we also add a blank line before the
@return
directive (see Doxygen and comments formatting conventions)?Additionally, we'll need to fix this in D8/D7 first and then backport to D6... @barbi, would you mind rolling the patches for D7/D8 too?
Comment #4
jhodgdonThanks mr.baileys -- I didn't notice this was D6 in the original report! Definitely needs fixing in D8/7 first.
Comment #5
RobLoachComment #6
jhodgdonThat looks good! Please commit to d8/7 and then mark as patch/to be ported for d6.
Comment #7
webchickCommitted to 8.x and 7.x. Thanks!
Marking back to 6.x, to be ported.
Comment #8
TR CreditAttribution: TR commentedHere's the D6 backport.
Comment #9
jhodgdonThanks!
Comment #10
Gábor HojtsyCommitted, thank you.