Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
theme system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
3 Jun 2008 at 23:03 UTC
Updated:
10 Nov 2008 at 08:41 UTC
Jump to comment: Most recent file
Comments
Comment #1
robloachA
hook_css_altercould be added to allow modification of CSS being added. Might be overkill though.Comment #2
robloachHere's a patch to start it off:
Comment #3
robloachHas to wait until the drupal_add_js fix goes in.
Comment #4
Susurrus commentedthat issue is also just waiting review. If people could look that issue over and run the associated sinpletests under System, we could get this issue started sooner.
Comment #5
robloachThis patch takes the scope down a bit, just adding the $options parameter to drupal_add_css()....
Comment #6
robloachNeeds update to HEAD.
Comment #7
robloachUpdated to HEAD and added a couple tests hitting drupal_add_css() and drupal_get_css().
Comment #8
mfer commentedsubscribe. I'll test this later in the week.
Comment #9
aaron commentedlooks good. i'll try to test later as well.
Comment #10
mfer commentedI'll jump on the @drewish bandwagon and point out that the test, though only 2 of them, should be two separate test methods.
The common setup code between the two test should go in setUp().
Comment #11
robloachAgreed!
Comment #12
robloachRefactored the tests and added $reset so that we can test it.
Comment #13
mfer commentedIt looks good and passes tests with the exception of the drupal_add_css calls in theme.maintenance.inc. They still need to be updated.
Comment #14
mfer commented@Rob Loach - I'm not planning on touching this patch so I can test it with a clean conscience.
Comment #15
robloachThose actually are okay because the new drupal_add_css()'s $options parameter can be either the type or the $options array. I removed the second parameter anyway.....
Comment #16
mfer commentedI knew those would work the way they were layed out. Just being picky and wanting consistency. This looks good to go.
Comment #17
dries commented- Can we rename '$simpletestcss' to '$css'? We don't glue words together.
- t('Cascading Stylesheets') should be t('Cascading stylesheets') (small s)
- We should probably document the default variables of the different $options.
Comment #18
robloachMakes the changes that Dries brought up in #17.
Comment #19
mfer commented#17 is why Dries is the man when it comes to reviewing patches.
The patch in #18 looks good to me, the tests pass, and it works.
Comment #20
dries commentedCommitted to CVS HEAD. Thanks! :)
Comment #21
robloachAdded to the update documentation: http://drupal.org/node/224333#drupal_add_js_options
The next step is allow inline CSS with drupal_add_css().
Comment #22
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.